Skip to content

Expose admin status and impersonation over HTTP - #5863

Merged
jessegeens merged 3 commits into
masterfrom
admin-http
Oct 19, 2026
Merged

jessegeens merged 3 commits into
masterfrom
admin-http

Conversation

@gmgigi96

@gmgigi96 gmgigi96 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Adds an admin HTTP service so clients that only speak the public HTTPS surface (like the cernbox CLI) can use the user-facing part of the Admin API:

  • GET /admin/status → {"admin": bool}, backed by a new CheckAdmin RPC. It mints nothing and is not audited.
  • POST /admin/impersonate {"user": "...", "reason": "..."} → {"token": "..."}. It calls RequestAdmin and then Impersonate on the server, so the admin token never reaches the client. Both steps are audited as before; reason is optional.

Impersonation tokens no longer share admin_ttl (15m). They last as long as a normal sign-in, or impersonation_ttl if set, so transfers made as the impersonated user can finish.

Client side: cernbox/cernbox-cli#1

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
gmgigi96 changed the base branch from kerberos-auth to master October 2, 2026 13:33
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 jessegeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)

@jessegeens
jessegeens merged commit d5067f6 into master Oct 19, 2026
26 checks passed
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.

3 participants