Choose a method
The quickest way to start is basic authentication with
datumctl alb:
How it works
Authentication is configured with an Envoy GatewaySecurityPolicy. The policy names what it protects, such as a load balancer’s route, and how people sign in. Datum sends the policy to Envoy in every location, and Envoy enforces it on every request:
- Basic authentication checks a username and password against an
htpasswdlist stored in a Secret. A request without valid credentials gets401 Unauthorized. - OIDC redirects people without a session to an identity provider, such as Google or Auth0. Envoy validates the token the provider returns, then sets a session cookie so later requests go straight through.
Secrets must be labeled to reach the edge
Each method stores a credential in a Secret: anhtpasswd list for basic authentication, or a client secret for OIDC. Datum doesn’t send Secrets to the edge unless you ask it to, so that unrelated Secrets in your project are never copied. To make a Secret available to your load balancer, give it this label:
Check authentication
To see whether a load balancer has basic authentication, rundatumctl alb describe ALB_NAME. To see every SecurityPolicy in your project, run datumctl get securitypolicies.
To confirm that a protected load balancer rejects anonymous requests, request it without credentials:
401. OIDC returns 302, a redirect to the sign-in page.
For more, see the troubleshooting section of each guide.