Skip to content

AndrewCopeland/conjur-authn-k8s-client

 
 

Repository files navigation

conjur-authn-k8s-client

Available images:

What's inside ?

The Conjur Kubernetes authenticator client is designed to have a light footprint both in terms of storage and memory consumption. It has very few components:

  • A static binary for the authenticator
  • The sleep binary from busybox for debugging
  • The tar binary from busybox to meet the requirement of the authentication service

Configuration

The client is configured entirely through environment variables. These are listed below.

Using conjur-authn-k8s-client with Conjur OSS

Are you using this project with Conjur OSS? Then we strongly recommend choosing the version of this project to use from the latest Conjur OSS suite release. Conjur maintainers perform additional testing on the suite release versions to ensure compatibility. When possible, upgrade your Conjur version to match the latest suite release; when using integrations, choose the latest suite release that matches your Conjur version. For any questions, please contact us on Discourse.

Orchestrator

  • MY_POD_NAME: Pod name (see downwards API)
  • MY_POD_NAMESPACE: Pod namespace (see downwards API)
  • CONTAINER_MODE: Set this to init to run as an init container that will exit after performing authentication. All other values (including blank) will cause the container to run as a sidecar.

Conjur

  • CONJUR_VERSION: Conjur version ('4' or '5', defaults to '5'). Must use a string value in the manifest due to YAML parsing not handling integer values well.
  • CONJUR_ACCOUNT: Conjur account name
  • CONJUR_AUTHN_URL: URL pointing to authenticator service endpoint
  • CONJUR_AUTHN_LOGIN: Host login for pod e.g. namespace/service_account/some_service_account
  • CONJUR_SSL_CERTIFICATE: Public SSL cert for Conjur connection
  • CONJUR_TOKEN_TIMEOUT: Timeout for fetching a new token (defaults to 6 minutes). In most cases, this variable should not be modified. The value should be in a format that can be parsed with time.ParseDuration (e.g "6m0s")

Flow:

The client's process logs its flow to stdout and stderr.

  • Exponential backoff is exercised when an error occurs
  • Client will re-login when certificate has expired
  1. Client goes through login by presenting certificate signing request (CSR) -> Server (authn-k8s running inside the appliance) injects signed client certificate out of band into requesting pod
  2. Client picks up signed client certificate, deletes it from disk and uses to authenticator via mutual TLS -> Server responds with auth token (retrieved via authn-local) encrypted with the public key of the client.
  3. Client decrypts the auth token and writes it to to the shared memory volume (/run/conjur/access-token)
  4. Client proceeds to authenticate time and time again

Contributing

We welcome contributions of all kinds to this repository. For instructions on how to get started and descriptions of our development workflows, please see our contributing guide.

About

Authentication sidecar for Conjur Kubernetes integration.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.0%
  • Shell 5.2%
  • Dockerfile 4.8%