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

Make impersonation play nice with subdomains. #5004

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

vadimberezniker
Copy link
Member

If the user is impersonating group X, but tries to access subdomain for group Y then don't enable impersonation on requests for subdomain Y so that subdomain Y can be accessed normally.

This PR slightly changes the semantics of how the frontend communicates impersonation information to the backend. Prior to this change, the frontend would set an impersonation target and would assume that impersonation was in effect. Now, the frontend still sets the impersonation target but now the backend informs the frontend whether impersonation is actually in effect via the GetUser response.

Fixes https://github.com/buildbuddy-io/buildbuddy-internal/issues/2779

Related issues: N/A

If the user is impersonating group X, but tries to access subdomain for group Y then don't enable impersonation on requests for subdomain Y so that subdomain Y can be accessed normally.

This PR slightly changes the semantics of how the frontend communicates impersonation information to the backend. Prior to this change, the frontend would set an impersonation target and would assume that impersonation was in effect.
Now, the frontend still sets the impersonation target but now the backend informs the frontend whether impersonation is actually in effect via the GetUser response.

Fixes buildbuddy-io/buildbuddy-internal#2779
@vadimberezniker vadimberezniker merged commit 3b52f89 into master Oct 12, 2023
9 of 11 checks passed
@vadimberezniker vadimberezniker deleted the impersonate_subdomain branch October 12, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants