-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed re-trigger job issue when public key deleted #2385
Conversation
rchikatw
commented
Jan 12, 2024
•
edited
Loading
edited
- fixed re-trigger job issue when the public key deleted
- formatted the logger in a proper format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few comments mostly asking for clarity on a few things. I'd also like to see anything that's not directly related to the problem solution (like the util function and the csv-merger changes) in a separate commit, but if that's not common practice in this part of the project I'm all right with leaving it as one commit.
137afe0
to
270454e
Compare
69ebda0
to
da4b74d
Compare
10448b2
to
570da08
Compare
@rchikatw why aren't we setting a controller reference on the secrets and using an |
4d333be
to
1de667e
Compare
@jarrpa Regarding the separation into separate PRs. From my point of view, a PR needs to be a complete contribution not to be dependent on some code that needs to be reviewed somewhere else. Because of that, I would claim that a separate PR is an overkill but I do agree that it makes sense to separate these parts into different commits under the same PR, similar to what I ask when we have vendor changes. |
Just to note, I poked at the whole pointer-to-value thing and effectively came to a similar conclusion to yours... with one catch: there's already a k8s library for this: https://pkg.go.dev/k8s.io/utils/ptr I find its implementation more elegant (and more complete), so I'd like to move to that. I submitted a draft PR to showcase its usage. I based it on this PR, so as soon as this one merges I'll mark mine as no longer a draft. |
/retest |
@rchikatw What is the reason you choose to use different formats for marshaling of private and public keys? You use PKCS1 for the private key: And PKIX for the public key: |
A good catch actually but I never faced any issues while onboarding the application cluster. I did generate the token several times and onboarded the application cluster. But let me try once changing x509.MarshalPKIXPublicKey -> x509.MarshalPKCS1PublicKey I found the reason why I am using PKIX for marshaling the public key, when a new OnboardConsumer RPC call to onboard a new OCS application cluster happens it parses the public key using the ParsePKIXPublicKey so i have used the same for the public key. refer here and there is no function marshell private key using PKIX |
But in that case shouldn't we just align the server code to use PKCS1 as well? P.S According to this PCIX was designed to be used for key certificates. It encodes an identity as well as encryption. I think we should align all of our code to use PKCS1. That means both private and public keys |
Yes that solves the problem if we used PKCS1 at both places (Client & provider) and for both the keys, Let me do that and verify |
Signed-off-by: rchikatw <[email protected]>
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leelavg, nb-ohad, rchikatw The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
35ac7ee
into
red-hat-storage:main
/cherrypick release-4.15 |
/cherrypick fusion-hci-4.14 |
@leelavg: new pull request created: #2438 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@leelavg: #2385 failed to apply on top of branch "fusion-hci-4.14":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |