Skip to main content

Authentication + authorization for Caddy

Who gets in?
You write the rules.

Connect identity, login, and access policies with AuthCrunch. Follow a request below, then build the same flow in Caddy.

A sign-in portal sends an identity through a glass access-policy gateway. Two applications are allowed; a third is denied.
Sign inCheck accessReach apps

Follow a request

Change the visitor. Change the rule. See the decision.GET /

01 / The visitor

Alice's roles
authp/userapp/member

02 / Caddy + AuthCrunch

Your access policy
allow roles authp/admin authp/user

03 / The decision

200 OK

The app is yours to use.

Alice has authp/user. The policy allows the request to reach the app.

An interactive illustration of the walkthrough’s access rules.Run it yourself

Explore the moving parts

What are you working on?​

Choose a part of the flow. Find the guides that move you forward.

Browse all guides

01 / Identity

Start with the people signing in.

Connect local users or an external identity provider. Understand which claims arrive before you grant access.

Explore identity guides

Choose the right starting point

Different apps.
Different ways to sign in.​

A portal with profile pages and a policy that signs users in directly have different responsibilities. Compare the flows before choosing yours.

Understand the login models

Authentication establishes identity.
Your policy decides what that identity may access.

Two ways to protect an app

  1. Sign in through the portalLocal users or an identity provider
  2. Receive an access tokenThe portal records the user's claims
  3. Check access to the appYour policy evaluates those claims

Use a portal for login, local MFA and profile pages. Attach an authorization policy to the protected app.

Understand the moving parts

Keep learning by doing

Start local. Follow the whole request.​

One Caddyfile, two demo users, and an application you can protect.