The External Secrets Enterprise Edition is product suite is a premium product.
It requires a specific subscription. Contact us for more information.
esi-cli and other External Secrets Enterprise Edition instances.
esi-cli as a Federation Client
esi-cli is designed to seamlessly integrate with an ESI Federation Server. It uses specific command-line flags to direct its secret requests to the federation server instead of looking for ExternalSecret resources in the local Kubernetes cluster.
Key Flags for esi-cli Federation Mode:
-
--federated-server-url="<URL>"- Required to enable federation mode.
- Specifies the full HTTP(S) URL of the ESI Federation Server (e.g.,
https://esi-federation.example.com).
-
--federated-store="<store_name>"- The name of the
ClusterSecretStore(defined on the Federation Server) thatesi-clishould request secrets from. - When used,
esi-cliimplicitly targets the/secretstore/:secretStoreName/...API endpoint on the server.
- The name of the
-
--federated-generators="<generator_name>"- The name of the
Generator(defined on the Federation Server) thatesi-clishould use to generate secrets. - When used,
esi-cliimplicitly targets the/generators/:generatorNamespace/:generatorKind/:generatorName/...API endpoint on the server. The namespace and kind are often inferred or configured alongside the generator name on the server or client.
- The name of the
-
--federated-token="<path_to_token_file>"- Specifies the file path to the Kubernetes Service Account (SA) token that
esi-cliwill use to authenticate itself to the Federation Server. - Defaults to
/var/run/secrets/kubernetes.io/serviceaccount/token(the default projected SA token in a pod). - The Service Account associated with this token must be authorized on the Federation Server via an
AuthorizationCR.
- Specifies the file path to the Kubernetes Service Account (SA) token that
-
--federated-ca-crt="<path_to_ca_bundle>"- Specifies the file path to the CA certificate bundle.
- This CA bundle is used by
esi-clito verify the TLS certificate of the Federation Server. It’s also sent to the Federation Server, which uses it to securely fetch the JWKS (public keys) from the client cluster’s token issuer to validate the client’s SA token. - Defaults to
/var/run/secrets/kubernetes.io/serviceaccount/ca.crt.
esi-cli uses these flags:
When these flags are provided, esi-cli:
- Reads the SA token from
--federated-token. - Reads the CA certificate from
--federated-ca-crt. - Constructs a request to the appropriate endpoint on the
--federated-server-url. - Includes the SA token in the
Authorization: Bearer <token>header. - Includes the client’s CA certificate (base64 encoded) in the request body, typically as
{"ca.crt": "<base64_encoded_ca_cert>"}. This allows the Federation Server to trust the client cluster’s OIDC discovery endpoint for JWKS. - Receives secret data and injects it as environment variables (
--inject-on-env,--external-secrets) or files (--inject-on-file) as per otheresi-cliconfigurations.
esi-cli documentation for more detailed examples of esi-cli with federation.
ESE as a Federation Client
An External Secrets Enterprise Edition instance, typically running in a different Kubernetes cluster, can also act as a client to a central ESI Federation Server. This allows a distributed ESE setup where one ESE instance (the client) offloads the actual secret fetching from backend stores to another ESE instance (the Federation Server). Configuration Method: This is generally achieved by creating a special type ofSecretStore or ClusterSecretStore on the client ESE instance. This custom store resource would encapsulate the necessary configuration to connect and authenticate to the remote Federation Server.
Conceptual FederationStore (Example Kind):
While the exact CRD specification might vary, a hypothetical FederationStore on the client ESE instance could look like this:
FederationStore is defined on the client ESE instance:
- You would create
ExternalSecretresources on the client cluster that reference thisFederationStore(e.g.,storeRef.name: central-federation-server). - The client ESE controller, when processing these
ExternalSecrets, would use the details from theFederationStoreto:- Authenticate to the specified Federation Server URL using the configured client-side Service Account token.
- Request the secret data (e.g., by passing through the
ExternalSecret’sdataFromordatafields, which would be interpreted by the Federation Server in context of its own stores likevault-backend-on-federation-server).
- The client ESE then creates the local Kubernetes
Secretas usual, but populated with data received from the Federation Server.
The precise implementation details and CRD for configuring an ESE instance as a federation client (e.g., the
FederationStore kind) should be referred to in the specific ESE version documentation. The concept remains: abstracting the connection to the Federation Server within a store definition.