avionix.kube.authentication

class avionix.kube.authentication.BoundObjectReference(name, uid=None, api_version=None)
Parameters
  • name (str) – Name of the referent.

  • uid (Optional[str]) – UID of the referent.

  • api_version (Optional[str]) – API version of the referent.

class avionix.kube.authentication.TokenRequest(metadata, spec, api_version=None)
Parameters
class avionix.kube.authentication.TokenRequestSpec(audiences, bound_object_ref, expiration_seconds)
Parameters
  • audiences (List[str]) – Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.

  • bound_object_ref (BoundObjectReference) – BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server’s TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.

  • expiration_seconds (int) – ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the ‘expiration’ field in a response.

class avionix.kube.authentication.TokenReview(metadata, spec, api_version=None)
Parameters
class avionix.kube.authentication.TokenReviewSpec(audiences, token)
Parameters
  • audiences (List[str]) – Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.

  • token (str) – Token is the opaque bearer token.

class avionix.kube.authentication.UserInfo(extra, groups, username, uid=None)
Parameters
  • extra (dict) – Any additional information provided by the authenticator.

  • groups (List[str]) – The names of groups this user is a part of.

  • username (str) – The name that uniquely identifies this user among all active users.

  • uid (Optional[str]) – A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.