gangway

by Helm

Helm chartv1.1.0App v3.2.0

An application that can be used to easily enable authentication flows via OIDC for a kubernetes cluster.

About this chart

gangway

gangway is an application that can be used to easily enable authentication flows via OIDC for a kubernetes cluster.

TL;DR

helm install gabibbo97/gangway \
  --set config.apiServerURL='https://api.example.com:6443' \
  --set config.authorizeURL='https://auth.example.com/auth' \
  --set config.tokenURL='https://auth.example.com/token' \
  --set config.clientSecret='superSecret' \
  --set config.sessionSecurityKey='superSecure'

Introduction

This chart deploys a Gangway authentication server

IMPORTANT SECURITY ADVICE

You MUST set a config.sessionSecurityKey

Configuration options

ParameterDescriptionDefault
trustedCA.contentSpecify inline a CA certificate``
trustedCA.secretNameSpecify the CA certificate secret name``
config.clusterNameThe name of the cluster to show on the generated KUBECONFIGk8s
config.apiServerURLThe kubernetes API server urlhttp://example.com:6443
config.authorizeURLThe OIDC IDP Authorization URLhttp://example.com/auth
config.tokenURLThe OIDC IDP Token URLhttp://example.com/token
config.audienceThe OIDC IDP Userinfo URLhttp://example.com/userinfo
config.clientIDThe OIDC Client IDgangway
config.clientSecretThe OIDC Client secretgangway
config.redirectURLThe redirect URL, will be defaulted to first configured ingress if absent``
config.scopesThe OIDC scopes that will be requested['openid','email','profile','offline_access']
config.usernameClaimThe OIDC username claimname
config.emailClaimThe OIDC username claimemail
config.sessionSecurityKeyThe cookie security keyverySecureKey
existingSecretSpecify an existing secret containing clientSecret and sessionSecurityKey``

Use of a selfsigned certificate / custom CA

In order to use a selfsigned certificate / custom CA, one can either:

  • set trustedCA.content to the contents of the certificate
  • set trustedCA.secretName to the name of a secret inside the gangway namespace

Easy generation of the session security key

tr -dc a-zA-Z0-9 < /dev/urandom | head -c 32; echo ''

Deploy gangway with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gangway on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgangway is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply