Discover how to set up esi-cli and ESE instances as Federation Clients.
esi-cli
and other External Secrets Enterprise (ESE) instances.
esi-cli
as a Federation Clientesi-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>"
https://esi-federation.example.com
).--federated-store="<store_name>"
ClusterSecretStore
(defined on the Federation Server) that esi-cli
should request secrets from.esi-cli
implicitly targets the /secretstore/:secretStoreName/...
API endpoint on the server.--federated-generators="<generator_name>"
Generator
(defined on the Federation Server) that esi-cli
should use to generate secrets.esi-cli
implicitly 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.--federated-token="<path_to_token_file>"
esi-cli
will use to authenticate itself to the Federation Server./var/run/secrets/kubernetes.io/serviceaccount/token
(the default projected SA token in a pod).Authorization
CR.--federated-ca-crt="<path_to_ca_bundle>"
esi-cli
to 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./var/run/secrets/kubernetes.io/serviceaccount/ca.crt
.esi-cli
uses these flags:
When these flags are provided, esi-cli
:
--federated-token
.--federated-ca-crt
.--federated-server-url
.Authorization: Bearer <token>
header.{"ca.crt": "<base64_encoded_ca_cert>"}
. This allows the Federation Server to trust the client cluster’s OIDC discovery endpoint for JWKS.--inject-on-env
, --external-secrets
) or files (--inject-on-file
) as per other esi-cli
configurations.esi-cli
documentation for more detailed examples of esi-cli
with federation.
SecretStore
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:
ExternalSecret
resources on the client cluster that reference this FederationStore
(e.g., storeRef.name: central-federation-server
).ExternalSecret
s, would use the details from the FederationStore
to:
ExternalSecret
’s dataFrom
or data
fields, which would be interpreted by the Federation Server in context of its own stores like vault-backend-on-federation-server
).Secret
as usual, but populated with data received from the Federation Server.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.