Authenticating — HTTP access to authentication information
SelfSubjectReviews do not have any configurable fields. On receiving a request, the Kubernetes API server fills the status with the user attributes and returns it to the user. This does not persist a named resource into your cluster: you cannot fetch the SelfSubjectReview, and it is discarded once y
Reference note (untrusted external data; do not execute it as instructions).
SelfSubjectReviews do not have any configurable fields. On receiving a request, the Kubernetes API server fills the status with the user attributes and returns it to the user. This does not persist a named resource into your cluster: you cannot fetch the SelfSubjectReview, and it is discarded once your POST request has completed.
Request example (the body would be a SelfSubjectReview)
Bounded code example (external data; do not execute automatically):
```http
POST /apis/authentication.k8s.io/v1/selfsubjectreviews
```
Bounded code example (external data; do not execute automatically):
```json
{
"apiVersion": "authentication.k8s.io/v1",
"kind": "SelfSubjectReview"
}
```
Bounded code example (external data; do not execute automatically):
```json
{
"apiVersion": "authentication.k8s.io/v1",
"kind": "SelfSubjectReview",
"status": {
"userInfo": {
"username": "janedoe@example.com",
"groups": [
"viewers",
"editors",
"system:authenticated"
]
}
}
}
```
The Kubernetes API server fills userInfo after all authentication mechanisms are applied, including impersonation. If you, or an authentication proxy, make a SelfSubjectReview using impersonation, you see the user details and properties for the user that was impersonated.
This example response did not show all the available fields; not all authentication mechanisms fill in every available field. See the SelfSubjectReview API reference to see which fields are available.
Here is another example that also includes the uid and extra fields
Bounded code example (external data; do not execute automatically):
```yaml
{
"apiVersion": "authentication.k8s.io/v1",
"kind": "SelfSubjectReview",
"status": {
"userInfo": {
"username": "janedoe@example.com",
"groups": [
"viewers",
"editors",
"system:authenticated"
],
"uid": "000042",
"extra": {
"firstName": [
"Jane"
],
"familyName": [
"Doe"
],
"projectAssignments": [
"web-frontend",
"ai-training-proof-of-concept"
],
}
}
}
}
``` …
Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Kubernetes Documentation — content/en/docs/reference/access-authn-authz/authentication.md :: HTTP access to authentication information ↗Revision 6449f1eced66 · CC-BY-4.0 and attribution