-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: add validate oidc token call to zaas client #3897
Conversation
Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: Pablo Hernán Carle <[email protected]>
1b6a635
to
5531a3e
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.
it would be great to have some integration test
Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: Pablo Hernán Carle <[email protected]>
….com/zowe/api-layer into reboot/feat/validate-oidc-zaasclient
Thanks, added |
Signed-off-by: Pablo Hernán Carle <[email protected]>
Quality Gate passedIssues Measures |
* | ||
* This method supports simple boolean validation against Zowe v2 and v2 as of v3.0 | ||
* | ||
* A successful validation means the token was created using the same settings as found in the target API Mediation Layer. |
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.
Perhaps this is non-standard for Java API doc, but should it be explicitly stated that "successful validation" means that ZaasOidcValidationResults.isValid()
is true?
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.
It can be added to the javadoc description, no problem with that
* This method supports simple boolean validation against Zowe v2 and v2 as of v3.0 | ||
* | ||
* A successful validation means the token was created using the same settings as found in the target API Mediation Layer. | ||
* This version does not validate if the OIDC token is mapped to a user if the API Mediation Layer is running on the z platform. |
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.
What does this mean exactly? If a token is mapped to a mainframe user, isValid()
will be false? Does a service still have access to the OIDC token if the user is mapped?
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.
What I wanted to clarify with this is the fact that currently the API ML will say:
isValid()
:true
if the OIDC token queried by the Zaas Client was issued by the OIDC provider that is configured in the queried API ML instance. The current implementation in the server side doesn't check if the token is mapped.isValid()
:false
if the OIDC token is not generated by the OIDC provider or if API ML is not enabled to handle OIDC tokens.
Regarding whether a service has access to the OIDC token if the user is mapped or not, I think it's unrelated to this change, as this simply enables services using the ZaasClient to query. So it will depend on the service's setup.
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.
Got it thanks.
I think it's unrelated to this change, as this simply enables services using the ZaasClient to query.
It is unrelated. I was merely curious.
Description
Add method in ZaasClient to use /oidc/validate endpoint in API Mediation Layer.
This implementation targets v3 Zowe, currently supporting only a boolean response (token is a valid OIDC token issued by the target API Mediation Layer's configured OIDC provider)
Type of change
Checklist: