Skip to content

Check MaaS Admin Access

GET /api/v1/is-maas-admin

GET /maas/api/v1/is-maas-admin

Checks whether the requesting user has MaaS admin privileges by performing a SelfSubjectAccessReview against the maasauthpolicies resource in the models-as-a-service namespace. Returns allowed: true only for users who can create MaaSAuthPolicy resources (i.e. cluster/MaaS admins). Token resolution priority:

  1. Authorization: Bearer <token> — used by the ODH dashboard backend; correctly substituted with the impersonated user's token when the ODH dev impersonation feature (DEV_IMPERSONATE_USER) is active.

  2. x-forwarded-access-token — fallback for standalone federated dev mode where the rspack proxy injects the real user's token directly.

Authorization

Responses

Status Description Response body
200 OK

Access check result

object

application/json

400 Bad Request

Bad Request (missing authentication token)

ErrorResponse

application/json

500 Internal Server Error

Internal Server Error

ErrorResponse

application/json

200 OK response body

Property Type Required Description
data object No
data.allowed boolean Yes

Whether the user has MaaS admin access

Example request

curl -X GET "/maas/api/v1/is-maas-admin" \
  -H "Authorization: Bearer $TOKEN"

Example response

200 OK, application/json

{
  "data": {
    "allowed": true
  }
}