Learn how to authenticate SPIRE workloads with Infisical using OpenID Connect (OIDC).
/api/v1/auth/oidc-auth/login
endpoint. If successful,
then Infisical returns a short-lived access token that can be used to make authenticated requests to the Infisical API.
To be more specific:
/api/v1/auth/oidc-auth/login
endpoint.oidc-discovery-provider
container to your SPIRE Server StatefulSet:
https://<spire-oidc-host>/.well-known/openid_configuration
, which Infisical will use to fetch the public keys for JWT-SVID verification.
Creating an identity
https://<spire-server-host>:<port>/.well-known/openid_configuration
https://<spire-server-host>:<port>
spiffe://<trust-domain>/<workload-path>
. For example: spiffe://example.org/workload/api-server
infisical
or your service name). Configure this to match what your workloads use.sub
(SPIFFE ID), aud
(audience), exp
(expiration), and iat
(issued at). You can also configure custom claims if your SPIRE Server includes additional metadata.2592000
equivalent to 30 days): The lifetime for an access token in seconds. This value will be referenced at renewal time.2592000
equivalent to 30 days): The maximum lifetime for an access token in seconds. This value will be referenced at renewal time.0
): The maximum number of times that an access token can be used; a value of 0
implies infinite number of uses.0.0.0.0/0
, allowing usage from any network address.
sub
(SPIFFE ID), aud
(audience), exp
, and iat
. The audience is typically specified when requesting the JWT-SVID (e.g., spire-agent api fetch jwt -audience infisical
).subject
, audiences
, and claims
fields support glob pattern matching; however, we highly recommend using hardcoded SPIFFE IDs whenever possible for better security.Adding an identity to a project
Using JWT-SVID to authenticate with Infisical
7200
seconds which can be adjusted.If an identity access token expires, it can no longer authenticate with the Infisical API. In this case,
a new access token should be obtained by performing another login operation.