Repository navigation
Expose admin status and impersonation over HTTP - #5863
Merged
Merged
Conversation
gmgigi96
requested review from
diocas,
glpatcern,
jessegeens and
rawe0
as code owners
October 2, 2026 13:30
Clients that only speak the public HTTPS surface cannot reach the Admin API, which is gRPC on its own listener. A new admin HTTP service gives them the part they need: GET /admin/status says whether the caller is an admin, and POST /admin/impersonate returns a token acting as another user. Impersonate steps the caller up and impersonates in one request, so the admin token never leaves the server; both steps are audited as before, with a reason if the client gives one. Status is backed by a new CheckAdmin RPC that mints nothing, so asking leaves no audit trail. Impersonation tokens no longer share the admin token's lifetime. An impersonated session is used like any other, long transfers included, and fifteen minutes cut those off. They now last as long as a token from signing in, or impersonation_ttl.
gmgigi96
added a commit
to cernbox/cernbox-cli
that referenced
this pull request
Oct 2, 2026
The admin HTTP service is now its own reva pull request on master (cs3org/reva#5863), independent of Kerberos authentication (#5827). This environment needs both until they are merged, so it builds a branch that joins them.
gmgigi96
added a commit
to cernbox/cernbox-cli
that referenced
this pull request
Oct 2, 2026
The admin HTTP service is now its own reva pull request on master (cs3org/reva#5863), independent of Kerberos authentication (#5827). This environment needs both until they are merged, so it builds a branch that joins them.
jessegeens
approved these changes
Oct 16, 2026
jessegeens
left a comment
Contributor
There was a problem hiding this comment.
As discussed in person, approved, but I would prefer for this endpoint to be blocked in nginx by default, except for some whitelisted clients (e.g. the cbox-mon machine)
diocas
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
adminHTTP service so clients that only speak the public HTTPS surface (like thecernboxCLI) can use the user-facing part of the Admin API:GET /admin/status→{"admin": bool}, backed by a newCheckAdminRPC. It mints nothing and is not audited.POST /admin/impersonate{"user": "...", "reason": "..."}→{"token": "..."}. It callsRequestAdminand thenImpersonateon the server, so the admin token never reaches the client. Both steps are audited as before;reasonis optional.Impersonation tokens no longer share
admin_ttl(15m). They last as long as a normal sign-in, orimpersonation_ttlif set, so transfers made as the impersonated user can finish.Client side: cernbox/cernbox-cli#1