List everything a user can reach
GET/users/:username/effective-assignments
Returns every access path a user has, resolved: the AWS permission sets they can assume, the custom applications they can open, and the groups those inherited entitlements come through. Direct grants and group-inherited ones are merged into one answer, each entry saying which kind it is.
This is the endpoint to call before deleting a user, and the one to call to answer "what can this person actually do".
Three things to get right when reading the body:
countcountsassignmentsonly. It is not the total number of entitlements; the applications are not in it.assignmentsisnullwhen it is empty, whileapplicationAssignmentsandgroupsare[]. Three arrays, two different ways of saying "nothing", in one object. Guard the first against null.- The two
assignmentTypefields do not use the same words. Underassignmentsan inherited entry saysindirect; underapplicationAssignmentsit saysgroup. Handle each where it appears.
There is no pagination. The response grows with the user's access, and every entitlement comes back in one body.
A user who does not exist gets a 200, not a 404. The group lookup
that would have failed is caught and treated as "no groups", so an
unknown username (or a username misspelt, or an email address sent
where a username belongs) returns a perfectly well-formed empty answer
that is indistinguishable from a real user with no access. Confirm the user
exists with GET /users/{username} before reading an empty result as
meaningful.
Request
Responses
- 200
- 401
- 403
- 404
- 500
The user's resolved access. Also what an unknown user returns; see the note above.
Authentication failed: the X-API-Token header was missing, malformed,
expired or not recognised.
This response is text/plain, not JSON. It is written by
http.Error in the authentication middleware, which runs before any
handler and therefore before anything that would build a JSON envelope.
A client that unconditionally JSON-parses response bodies will fail on
this one, so check the status code first.
The token is valid, but it is not allowed to act on this tenant.
An API token is minted inside one tenant and stays bound to it for life.
Sending it to a path whose tenant segment names a different tenant is
refused here, in middleware, before the operation runs, so this says
nothing about the resource you asked for, only about which tenant the
path named. Check the tenant server variable against the console the
token was created in.
No tenant matches the tenant segment of the request path. A user who does not exist is not reported here; that is a 200 with empty results.
The permission set assignments could not be read from the database. Failures in the application and group lookups are not reported here: those are absorbed, and the response comes back 200 with the corresponding entries missing.