Skip to content
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

fix(permissions): respond with 401 when authz check fails #692

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

ebaron
Copy link
Member

@ebaron ebaron commented Sep 28, 2021

This updates the Exception cause check to account for Exceptions that may be nested within two ExecutionExceptions. I didn't use ExceptionUtils.getRootCause because KubernetesClientException may have a cause of its own.

Fixes: #691

@andrewazores
Copy link
Member

Needs backport label?

Copy link
Member

@andrewazores andrewazores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'd like to come back around and refactor this at some point so that there are no Kubernetes details leaked into this abstract handler, but that's a task for later.

@ebaron ebaron merged commit f66c583 into cryostatio:main Sep 28, 2021
mergify bot pushed a commit that referenced this pull request Sep 28, 2021
ebaron added a commit that referenced this pull request Sep 28, 2021
(cherry picked from commit f66c583)

Co-authored-by: Elliott Baron <ebaron@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authorization check failure results in Internal Server Error
2 participants