AshAuthentication.Strategy.KubernetesServiceAccount.Api (AshAuthentication.Kubernetes v0.1.0)

Copy Markdown View Source

HTTP access to the API server (TokenReview, JWKS) from the strategy's api options:

  • :api — base URL, default https://kubernetes.default.svc;
  • :token_file — this application's own (projected) service-account token, sent as the Bearer; reread on each request so kubelet rotation applies. Required for TokenReview; optional for JWKS;
  • :ca_file — CA bundle for the API server (e.g. kube-root-ca.crt);
  • :issuer — :oidc_jwks: the expected iss, default https://kubernetes.default.svc.cluster.local;
  • :jwks_uri — :oidc_jwks: default <api>/openid/v1/jwks;
  • :jwks_ttl — :oidc_jwks: milliseconds keys are cached, default 300000;
  • :jwks_refetch_ms — :oidc_jwks: minimum milliseconds between refetches for an unknown kid, default 30000;
  • :req_options — extra Req options (tests: plug:).

Summary

Functions

Whether url is on the API server itself (same scheme, host and port as api): only then is this application's own token sent with a request, so a jwks_uri pointing at another issuer never receives it.

Functions

api_server?(config, url)

@spec api_server?(keyword(), String.t()) :: boolean()

Whether url is on the API server itself (same scheme, host and port as api): only then is this application's own token sent with a request, so a jwks_uri pointing at another issuer never receives it.