Skip to main content
Reference

Environment variables

Environment variables that gatekeeper reads or that affect its behavior.

Gatekeeper variables

VariableDescriptionDefault
GATEKEEPER_CONFIGPath to gatekeeper.yaml. Used when --config flag is not provided.

Credential source variables

These variables are referenced by credential source configs in gatekeeper.yaml. They are not read directly by gatekeeper itself — they are read when the corresponding source type is configured.

VariableUsed byDescription
name from source.varenv sourceThe credential value. Must be set and non-empty.
name from source.private_key_envgithub-app sourcePEM-encoded RSA private key for GitHub App authentication.
name from source.client_secret_envtoken-exchange sourceOAuth client secret for the STS endpoint.

AWS variables

Used by the aws-secretsmanager credential source via the AWS SDK default credential chain.

VariableDescription
AWS_ACCESS_KEY_IDAWS access key ID
AWS_SECRET_ACCESS_KEYAWS secret access key
AWS_SESSION_TOKENAWS session token (for temporary credentials)
AWS_REGIONDefault AWS region
AWS_DEFAULT_REGIONFallback AWS region (used if AWS_REGION is unset)
AWS_PROFILENamed profile from ~/.aws/credentials

The region field in the source config takes precedence over these environment variables.


GCP variables

Used by the gcp-secretmanager credential source via Application Default Credentials.

VariableDescription
GOOGLE_APPLICATION_CREDENTIALSPath to a service account key JSON file

When unset, the GCP SDK uses the metadata server (on GCE/GKE) or gcloud application-default credentials.


OpenTelemetry variables

Gatekeeper initializes OTLP HTTP exporters for traces, metrics, and logs. All configuration uses standard OpenTelemetry environment variables. When no OTEL_EXPORTER_OTLP_ENDPOINT is set, the exporters default to localhost:4318 (OTLP/HTTP).

VariableDescription
OTEL_EXPORTER_OTLP_ENDPOINTBase URL for the OTLP collector (e.g., http://localhost:4318)
OTEL_EXPORTER_OTLP_HEADERSHeaders for OTLP requests (e.g., Authorization=Bearer token)
OTEL_EXPORTER_OTLP_PROTOCOLProtocol (http/protobuf is used by default)
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTOverride endpoint for traces only
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTOverride endpoint for metrics only
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTOverride endpoint for logs only
OTEL_RESOURCE_ATTRIBUTESAdditional resource attributes (e.g., deployment.environment=production)
OTEL_SERVICE_NAMEOverride the service name (default: gatekeeper)

Gatekeeper registers the following OTel resource attributes at startup:

AttributeValue
service.namegatekeeper
service.versionBuild version (from -ldflags -X main.version)

Metrics

MetricTypeDescription
proxy.request.durationHistogram (seconds)Duration of proxy requests
proxy.request.countCounterTotal number of proxy requests
proxy.credential.injectionsCounterTotal number of credential injections
proxy.policy.denialsCounterTotal number of policy denials

Client-side variables

These variables are set on the client side (inside the container), not on the gatekeeper process. They direct HTTP traffic through the proxy.

VariableDescription
HTTP_PROXYProxy URL for HTTP requests (e.g., http://127.0.0.1:8080)
HTTPS_PROXYProxy URL for HTTPS requests (e.g., http://127.0.0.1:8080)
NO_PROXYComma-separated list of hosts that bypass the proxy

When proxy.auth_token is configured, include the token in the proxy URL:

export HTTPS_PROXY=http://user:my-secret-token@127.0.0.1:8080