-
Notifications
You must be signed in to change notification settings - Fork 50
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
ostree: configurable MTLS config for ostree resolve #975
Conversation
For the record, we want to use the same cert which is used to access RPM content, maybe there already is an ENV variable for that? @croissanne |
d75dffc
to
9505bf9
Compare
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.
The mtls secrets need to be passed in the same way as https://github.com/osbuild/osbuild-composer/blob/main/cmd/osbuild-worker/jobimpl-depsolve.go.
So they're set in the worker config, and then just pass them along to the ostree resolve job.
Good point, amending a change. I am trying hard not to break the API by introducing an option struct, but since the Edit: Fixed tests. |
652d38b
to
56a8132
Compare
46d5ed0
to
3b8187d
Compare
So I changed the code so the API contract is not broken. Tests are passing now, except I think unrelevant ones. |
|
379ffe3
to
4ec713c
Compare
Oh when working on the changes you proposed, I realized I completely missed this input type which maps to the // Input represents the user-provided inputs that will be used to resolve an
// ostree commit ID.
type Input struct {
// URL of the repo where the commit can be fetched.
URL string `json:"url"`
// Ref to resolve.
Ref string `json:"ref"`
// Whether to use RHSM secrets when resolving and fetching the commit.
RHSM bool `json:"rhsm,omitempty"`
} So it was not complete at all, I fixed it. How about this? The solution now properly reads these ENV variables, I hope they are available. |
c1db885
to
2a9348b
Compare
Okay I am breaking the API here dropping the RHSM field, secret and creating a new For the record, I tested the resolver which is present in this repo, works fine with both proxy and MTLS:
Result:
|
So I have rewritten the patch to match the merged |
94bf924
to
d0e28be
Compare
So I have vastly simplified the patch after our discussion on Slack. I am no longer touching |
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.
LGTM! very nice
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.
Thanks! LGTM.
Couple of nitpicks and comments, but nothing worth blocking the PR over. Feel free to implement the suggested changes or ignore them if you don't agree.
Amended all your comments. I can squash into a single commit since I am renaming the function for no reason, it is such a tiny refactoring for a separate commit. Or squash during merge. |
The SBOM error is not related, integration tests are failing that is expected. What is the next step? |
To complete edge service Pulp migration, we need to be able to resolve and download ostree commits from Pulp running behind
console.redhat.com
proxy which only supports MTLS for authentication. I have found that some MTLS support is already present but it does not make much sense why RHSM is used. I cannot figure out a workflow why ostree repo would be published via RHSM cert. I am not aware of any RH ostree content hosted via RH CDN.The patch quite evolved during the review so editing the description so it is more appropriate.