-
Notifications
You must be signed in to change notification settings - Fork 3
Forward OAuth tokens to Uyuni server #33
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
Conversation
569de2b to
a8ba578
Compare
ycedres
left a comment
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!
jordimassaguerpla
left a comment
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.
Do I understand correctly that we cannot have oauth in mcp if oauth is not in mlm?
Do I understand correctly that, prior to this PR, we can have oauth in mcp but not in mlm?
If I understand correctly, this is a regression and will "break" what we had until mlm oauth support is released.
If that is the case, could we somehow make it backward compatible and not break/create a regression? Maybe some env variable to control the mlm authentication?
|
As discussed in the slack, it is a security design decision to only support oauth if oauth is supported in mlm. Thus, forget my previous comments. |
| fastmcp_ctx = ctx.fastmcp_context | ||
| auth_header = fastmcp_ctx.request_context.request.headers['authorization'] | ||
| token = None | ||
| if auth_header: |
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.
could we add a config variable that controls if auth is expected for mlm? Could be we have a token for the mcp authorization but mlm does not yet support it..
Extracts the JWT token from the requests, logs into Uyuni server using the token instead of user/pass. The token auth uses the new
/manager/api/oicdLoginendpoint. The rest of the flow is done using the usual session key from Uyuni.Notes:
oicdLoginendpoint will be introduced in MLM 5.1.2 (expected early 2026)UYUNI_AUTH_SERVERis not configured.Related PR in the Uyuni repo: uyuni-project/uyuni#11084
Fixes https://github.com/SUSE/spacewalk/issues/28483