GLAuth is a lightweight LDAP server for development, home use, or CI.
This Helm chart allows you to deploy GLAuth in a Kubernetes cluster with your backend of choice, either as internal cluster infrastructure (e.g., mated to Keycloak in an OIDC environment) or exposed outside your cluster as a high availability authentication server.
helm repo add glauth https://nnstd.github.io/helm-glauth
helm install my-glauth glauth/glauthThis chart bootstraps a GLAuth deployment on a Kubernetes cluster using the Helm package manager.
- Kubernetes 1.19+
- Helm 3.2.0+
- PV provisioner support in the underlying infrastructure (if persistence is enabled)
- Added support of PostgresOperator for database creation and secret management.
- Refactored the chart to cover all the configuration options.
To install the chart with the release name my-glauth:
helm install my-glauth glauth/glauthThe command deploys GLAuth on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
To uninstall/delete the my-glauth deployment:
helm delete my-glauthThe command removes all the Kubernetes components associated with the chart and deletes the release.
| Name | Description | Value |
|---|---|---|
replicaCount |
Number of GLAuth replicas to deploy | 1 |
nameOverride |
String to partially override common.names.name | "" |
fullnameOverride |
String to fully override common.names.fullname | "" |
| Name | Description | Value |
|---|---|---|
image.repository |
GLAuth image repository | ghcr.io/nnstd/glauth |
image.tag |
GLAuth image tag (immutable tags are recommended) | v2.4.44 |
image.pullPolicy |
GLAuth image pull policy | IfNotPresent |
imagePullSecrets |
GLAuth image pull secrets | [] |
| Name | Description | Value |
|---|---|---|
config.debug |
Enable debug mode | false |
config.systemLogging |
Enable system logging | false |
config.structuredLogging |
Enable structured logging | false |
| Name | Description | Value |
|---|---|---|
config.users |
Array of users for config backend (used only when backend.type is "config") | [] |
config.groups |
Array of groups for config backend (used only when backend.type is "config") | [] |
| Name | Description | Value |
|---|---|---|
config.storage.size |
Size of the persistent volume for GLAuth data | 20G |
config.storage.className |
Storage class name for the persistent volume | "" |
config.storage.accessMode |
Access mode for the persistent volume | "" |
config.storage.existingClaim |
Use an existing PVC for GLAuth data | false |
| Name | Description | Value |
|---|---|---|
config.ldap.enabled |
Enable LDAP service | true |
config.ldap.listen |
Listen address for LDAP (default: "0.0.0.0:3893") | "" |
| Name | Description | Value |
|---|---|---|
config.ldaps.enabled |
Enable LDAPS service | false |
config.ldaps.listen |
Listen address for LDAPS (default: "0.0.0.0:3894") | "" |
config.ldaps.cert |
Path to the certificate file for LDAPS | "" |
config.ldaps.key |
Path to the key file for LDAPS | "" |
| Name | Description | Value |
|---|---|---|
config.api.enabled |
Enable API service | true |
config.api.internals |
Enable internal API for debugging application performance | true |
config.api.tls |
Whether to enable TLS for API | false |
config.api.listen |
Listen address for the API (default: "0.0.0.0:5555") | "" |
config.api.cert |
Path to the certificate file for API TLS | "" |
config.api.key |
Path to the key file for API TLS | "" |
| Name | Description | Value |
|---|---|---|
config.behaviors.ignoreCapabilities |
Ignore all capabilities restrictions | false |
config.behaviors.limitFailedBinds |
Enable "fail2ban" type backoff mechanism | true |
config.behaviors.numberOfFailedBinds |
How many failed login attempts before ban | 3 |
config.behaviors.periodOfFailedBinds |
Time window for failed login attempts (seconds) | 10 |
config.behaviors.blockFailedBindsFor |
Ban duration (seconds) | 60 |
config.behaviors.pruneSourceTableEvery |
Clean learnt IP addresses every N seconds | 600 |
config.behaviors.pruneSourcesOlderThan |
Clean learnt IP addresses not seen in N seconds | 600 |
| Name | Description | Value |
|---|---|---|
config.backend.type |
Backend type for GLAuth (config or database) | database |
config.backend.file |
Custom configuration file name (stored in ConfigMap) | "" |
config.backend.baseDN |
Base DN for LDAP structure | dc=glauth,dc=com |
config.backend.nameFormat |
Name format for LDAP entries | cn |
config.backend.groupFormat |
Group format for LDAP entries | ou |
config.backend.anonymousDSE |
Enable anonymous DSE for clients like SSSD | false |
config.backend.sshKeyAttr |
SSH key attribute name (e.g., 'ipaSshPubKey' for IPA compatibility) | "" |
| Name | Description | Value |
|---|---|---|
config.database.engine |
Database engine (sqlite or postgres) | sqlite |
| Name | Description | Value |
|---|---|---|
config.database.sqlite.shell |
Enable SQLite shell pod for database management | false |
| Name | Description | Value |
|---|---|---|
config.database.postgres.connectionString |
PostgreSQL connection string (required when createResources is false) | "" |
config.database.postgres.createResources |
Create PostgreSQL CRD resources (Postgres and PostgresUser) | false |
config.database.postgres.secretName |
Secret name for PostgreSQL credentials | postgres-user |
config.database.postgres.existingSecretName |
Existing secret name created by PostgreSQL operator | "" |
| Name | Description | Value |
|---|---|---|
service.name |
GLAuth service name | glauth |
service.type |
GLAuth service type | NodePort |
service.ports |
GLAuth service ports configuration | See values.yaml |
| Name | Description | Value |
|---|---|---|
serviceAccount.create |
Specifies whether a ServiceAccount should be created | true |
serviceAccount.name |
The name of the ServiceAccount to use | "" |
serviceAccount.annotations |
Additional Service Account annotations | {} |
| Name | Description | Value |
|---|---|---|
podAnnotations |
Annotations for GLAuth pods | {} |
podSecurityContext |
GLAuth pods' Security Context | {} |
securityContext |
GLAuth containers' Security Context | {} |
| Name | Description | Value |
|---|---|---|
ingress.enabled |
Enable ingress record generation for GLAuth | false |
ingress.className |
IngressClass that will be used to implement the Ingress | "" |
ingress.annotations |
Additional annotations for the Ingress resource | {} |
ingress.hosts |
An array with hosts and paths | See values.yaml |
ingress.tls |
TLS configuration for the Ingress | [] |
| Name | Description | Value |
|---|---|---|
resources |
The resources limits and requests for the GLAuth containers | {} |
| Name | Description | Value |
|---|---|---|
autoscaling.enabled |
Enable Horizontal POD autoscaling for GLAuth | false |
autoscaling.minReplicas |
Minimum number of GLAuth replicas | 1 |
autoscaling.maxReplicas |
Maximum number of GLAuth replicas | 100 |
autoscaling.targetCPUUtilizationPercentage |
Target CPU utilization percentage | 80 |
| Name | Description | Value |
|---|---|---|
nodeSelector |
Node labels for GLAuth pods assignment | {} |
tolerations |
Tolerations for GLAuth pods assignment | [] |
affinity |
Affinity for GLAuth pods assignment | {} |
The current configuration philosophy is to remain fully compatible with the config files already supported by GLAuth. In the future, GLAuth may be adapted to read Kubernetes secrets, etc. However, this would grow the project's code base quite significantly.
GLAuth supports two main backend types:
- Config Backend: Uses a simple configuration file with embedded users and groups
- Database Backend: Uses SQLite or PostgreSQL for storing user and group data
When using the config backend, users and groups are defined directly in the values.yaml file:
config:
backend:
type: config
users:
- name: "johndoe"
givenname: "John"
sn: "Doe"
mail: "[email protected]"
uidnumber: 5001
primarygroup: 5501
passsha256: "6478579e37aff45f013e14eeb30b3cc56c72ccdc310123bcdf53e0333e3f416a"
capabilities:
- action: "search"
object: "*"
groups:
- name: "users"
gidnumber: 5501User Configuration Options:
name: Username (required)givenname: First namesn: Surname/last namemail: Email addressuidnumber: Unique user ID number (required)primarygroup: Primary group ID (required)loginShell: User's login shellhomeDir: User's home directorypasssha256: SHA256 hashed passwordpassappsha256: Array of SHA256 hashed application passwordspassappbcrypt: Array of bcrypt hashed application passwordssshkeys: Array of SSH public keysotpsecret: OTP secret for 2FAyubikey: YubiKey identifiercapabilities: Array of user capabilities (action and object)
Group Configuration Options:
name: Group name (required)gidnumber: Unique group ID number (required)includegroups: Array of group IDs to include in this group
When using SQLite as the backend:
config:
backend:
type: database
database:
engine: sqlite
sqlite:
shell: true # Enable shell pod for database managementSetting shell: true creates a companion pod that allows you to manage the SQLite database:
kubectl exec -it glauth-sqlite-client -- sqlite3 /root/db/gl.dbFor PostgreSQL backend with external database:
config:
backend:
type: database
database:
engine: postgres
postgres:
connectionString: "host=my-postgres-host port=5432 dbname=glauth user=glauth password=secretpassword sslmode=require"
createResources: falseFor PostgreSQL backend with PostgreSQL Operator:
config:
backend:
type: database
database:
engine: postgres
postgres:
createResources: true
secretName: "postgres-user"GLAuth exposes three main ports:
- 3893: LDAP (unencrypted)
- 3894: LDAPS (encrypted)
- 5555: Web interface/API
The default service configuration uses NodePort:
service:
type: NodePort
ports:
- name: ldap
internal: 3893
external: 3893
node: 30389
- name: ldaps
internal: 3894
external: 3894
node: 30636
- name: web
internal: 5555
external: 5555
node: 30555To enable LDAPS, you need to provide certificates:
config:
ldaps:
enabled: true
cert: "/path/to/glauth.crt"
key: "/path/to/glauth.key"Generate a certificate with:
openssl req -x509 -newkey rsa:4096 -keyout glauth.key -out glauth.crt -days 365 -nodes -subj '/CN=`hostname`'GLAuth uses persistent volumes to store:
- Configuration files
- SQLite databases (when using SQLite backend)
- SSL certificates for LDAPS
Configure persistence using the config.storage section:
config:
storage:
size: 20G
className: "fast-ssd"
accessMode: "ReadWriteOnce"GLAuth includes built-in security features:
- Failed Login Protection: Implements a "fail2ban" style mechanism
- Rate Limiting: Configurable thresholds and ban durations
- IP Address Management: Automatic cleanup of learned IP addresses
Configure these via the config.behaviors section.
For production deployments, consider:
- Using LDAPS (port 3894) instead of plain LDAP
- Configuring proper network policies
- Using secrets for database credentials
- Disabling the SQLite shell pod when not needed
- Enabling TLS for the API endpoint
- Pod not starting: Check resource limits and node capacity
- Database connection issues: Verify connection string and network policies
- LDAP authentication failures: Check user configuration and base DN settings
- Persistence issues: Verify storage class and PVC creation
# Check pod status
kubectl get pods -l app=glauth
# View logs
kubectl logs -l app=glauth
# Check service endpoints
kubectl get svc glauth
# Test LDAP connectivity (if using NodePort)
ldapsearch -x -H ldap://node-ip:30389 -b "dc=glauth,dc=com"
# Access SQLite shell (if enabled)
kubectl exec -it glauth-sqlite-client -- sqlite3 /root/db/gl.dbWhen upgrading, review the changelog and:
- Check for breaking changes in configuration
- Update your
values.yamlif using custom configurations - Consider backup of your data before upgrading
- Test in a non-production environment first
config:
backend:
type: config
users:
- name: "admin"
givenname: "Administrator"
sn: "User"
mail: "[email protected]"
uidnumber: 5001
primarygroup: 5501
passsha256: "6478579e37aff45f013e14eeb30b3cc56c72ccdc310123bcdf53e0333e3f416a"
capabilities:
- action: "search"
object: "*"
- name: "user1"
givenname: "Regular"
sn: "User"
mail: "[email protected]"
uidnumber: 5002
primarygroup: 5502
passsha256: "6478579e37aff45f013e14eeb30b3cc56c72ccdc310123bcdf53e0333e3f416a"
groups:
- name: "admins"
gidnumber: 5501
- name: "users"
gidnumber: 5502config:
backend:
type: database
database:
engine: sqlite
sqlite:
shell: true
storage:
size: 10Giconfig:
backend:
type: database
database:
engine: postgres
postgres:
connectionString: "host=postgres.example.com port=5432 dbname=glauth user=glauth password=secret sslmode=require"
createResources: falseconfig:
ldaps:
enabled: true
cert: "/app/config/tls.crt"
key: "/app/config/tls.key"
storage:
size: 5GiContributions are welcome! Please feel free to submit a Pull Request.
This Helm chart is licensed under the Apache 2.0 license.
For support and questions: