Skip to main content
A load balancer can require people to prove who they are before a request ever reaches your origin. Envoy checks every request at the edge, in every Datum location, so your app doesn’t need to change and unauthenticated traffic never reaches it.

Choose a method

The quickest way to start is basic authentication with datumctl alb:

How it works

Authentication is configured with an Envoy Gateway SecurityPolicy. 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 htpasswd list stored in a Secret. A request without valid credentials gets 401 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.
Authentication runs alongside the web application firewall. A request has to pass both before it reaches your origin.

Secrets must be labeled to reach the edge

Each method stores a credential in a Secret: an htpasswd 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:
Without this label, Envoy receives the policy but not the Secret, and every request to the load balancer returns 500 instead of asking people to sign in. datumctl alb auth set adds the label for you.

Check authentication

To see whether a load balancer has basic authentication, run datumctl 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:
Basic authentication returns 401. OIDC returns 302, a redirect to the sign-in page. For more, see the troubleshooting section of each guide.
Last modified on October 23, 2026