An identity-aware proxy is a reverse proxy that signs people in before any request reaches your app, checks every request against who the person is and the rules you set, and passes the app a signed token that says who they are, in a header. Strangers never reach the app. An app that checks the header can sign the person in from it, and an app that doesn't keeps its own login behind the proxy.
An app behind LocalCan Access received the token decoded below after a real sign-in, with every other header it got. Forged headers sent from outside, and the few lines that check the token, come after it.
What is an identity-aware proxy?
It sits where a reverse proxy sits, in front of a web app. The sign-in can be Google, Microsoft or your company's identity provider, and the rules can name an email domain, a group or exact people. A plain reverse proxy forwards every request, and an identity-aware one forwards only those from a signed-in person the rules allow.
Google uses the name for its Identity-Aware Proxy on Google Cloud, which signs a JWT into the x-goog-iap-jwt-assertion header (Google's signed headers docs↗). Many other identity-aware proxies pass a signed JWT too, each in a header of its own, and some pass plain headers such as Remote-User.
A VPN puts a device on a network, and the device can then reach apps on that network. An identity-aware proxy decides per app and per request, and people use an ordinary browser. Some identity-aware proxies also decide by the device. Access decides by who the person is and each app's rules.
Access is an identity-aware proxy that LocalCan runs, in Preview. A small connector next to your app holds the only connection to LocalCan, one CNAME record points your hostname at LocalCan, and people sign in with Google, Microsoft, GitHub or your own OIDC provider (quick start).
What does the proxy hand the app after sign-in?
On November 23, 2026, I put a small app behind Access on a test setup. It answers every request with the headers it received, in order, and with the person from the identity header. Then I opened the app's address and signed in as a test user, Dana Reyes, at a test identity provider over OIDC, where she is in a group called Platform-Team. The commands and numbers come from my own runs.
The browser went to the identity provider's sign-in form and, after it, straight back to the app. This is the list of headers from the app's answer for the page load (the app prints the token's first 20 characters and its length):
"Host: e2e-app.example.com",
"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/148.0.7778.96 Safari/537.36",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Accept-Encoding: gzip, deflate, br, zstd",
"Cache-Control: max-age=0",
"Lc-Access-Jwt-Assertion: eyJhbGciOiJSUzI1NiIs… (958 characters)",
"Priority: u=0, i",
"Sec-Ch-Ua: \"Chromium\";v=\"148\", \"HeadlessChrome\";v=\"148\", \"Not/A)Brand\";v=\"99\"",
"Sec-Ch-Ua-Mobile: ?0",
"Sec-Ch-Ua-Platform: \"macOS\"",
"Sec-Fetch-Dest: document",
"Sec-Fetch-Mode: navigate",
"Sec-Fetch-Site: cross-site",
"Sec-Fetch-User: ?1",
"Upgrade-Insecure-Requests: 1",
"X-Forwarded-For: 192.168.107.0",
"X-Forwarded-Host: e2e-app.example.com",
"X-Forwarded-Port: 443",
"X-Forwarded-Proto: https",
"X-Real-Ip: 192.168.107.0"
The browser sent most of these. LocalCan added six:
Lc-Access-Jwt-Assertion, the identity token, 958 characters long here. The header isLC-Access-Jwt-Assertionin the docs, and header names are case-insensitive.X-Forwarded-ForandX-Real-Ip, the visitor's IP address. Here it is the test setup's own network address.X-Forwarded-Host,X-Forwarded-PortandX-Forwarded-Proto, the address the person opened.
LocalCan also adds LC-IPCountry with the visitor's country. It leaves the header out when it can't tell the country, as here, where the address is a private one (headers LocalCan adds, which Access apps get too).
The page load was marked cross-site because the browser arrived from the identity provider's redirect. It was a GET, so the token came along. LocalCan leaves the token off a request that can change something, such as a POST, when it comes from another site, including a sibling subdomain, so a page there can't act as the person (when the app gets it).
What is in the identity token?
The token is a signed JWT, three base64url parts joined by dots: a header, a payload of claims, and a signature over both (RFC 7519↗). This one, decoded, header first, then the payload:
{
"alg": "RS256",
"kid": "60zTMcXcYHgtLKii5D98JxX0uXZpHfE7V8wBmC_JPSE",
"typ": "JWT"
}
{
"iss": "http://localhost:3000/access/t/team_vFy2ZnKpDaxh",
"aud": "app_3FtR2mgOdP8i",
"sub": "bd094536-af71-4c11-91c5-626f227199ec",
"sid": "6bba0e2f-7b3d-4451-90bb-6960a8cc0e85",
"jti": "stX_f5TOab_zVQOrsj6MrQ",
"iat": 1795453346,
"nbf": 1795453316,
"exp": 1795453946,
"idp": "oidc:idp_OlHgoefz4s83",
"email": "dana@example.com",
"email_verified": true,
"name": "Dana Reyes",
"groups": [
"platform-team"
]
}
The header says the token is signed with RS256 by a key that belongs to your team, and kid names that key. The payload's claims, from the identity header docs:
| Claim | What it tells the app |
|---|---|
iss | Your team's issuer. In production it is https://access.localcan.com/t/ followed by your team's ID. The test setup ran its own on a local address. |
aud | The app the token is for. Checking it means a token for another of your team's apps is refused. |
sub | The person's ID in your team, the same at every sign-in with the same method. The same person signing in with another method gets another sub. |
email, email_verified | Only when the sign-in method gave an address LocalCan counts, and then email_verified is always true. |
name | The name the sign-in method gave, when there is one. |
idp | How the person signed in: google, microsoft, github, or oidc: and your connection's ID, as here. |
groups | Groups from your own identity provider, in lowercase: Platform-Team arrived as platform-team. Google, Microsoft and GitHub sign-ins carry none. |
sid, jti | The session's ID and the token's own ID. |
iat, nbf, exp | Issued at, valid from and expiry. Here exp is 600 seconds after iat and nbf 30 seconds before it, for clock skew. A token lives 10 minutes at most, and LocalCan sends a fresh one while the person is active. |
Which headers can the app trust?
With Dana's session, I sent the app four headers a client shouldn't be able to set: an unsigned identity token claiming to be admin@example.com, a Remote-User header, a made-up X-Forwarded-For and a country. The call ran against the test setup, so the hostname is e2e-app.example.com and the command carries -k, plus a --connect-to to reach the test server, left out here. The session cookie was in session-cookie.txt, and the output is trimmed to the headers the app received:
$ curl -sk -H @session-cookie.txt -H 'LC-Access-Jwt-Assertion: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6ImFkbWluQGV4YW1wbGUuY29tIn0.' -H 'Remote-User: admin@example.com' -H 'X-Forwarded-For: 203.0.113.7' -H 'LC-IPCountry: US' https://e2e-app.example.com/whoami
{
"received": [
"Host: e2e-app.example.com",
"User-Agent: curl/8.15.0",
"Accept: */*",
"Lc-Access-Jwt-Assertion: eyJhbGciOiJSUzI1NiIs… (958 characters)",
"Remote-User: admin@example.com",
"X-Forwarded-For: 192.168.107.0",
"X-Forwarded-Host: e2e-app.example.com",
"X-Forwarded-Port: 443",
"X-Forwarded-Proto: https",
"X-Real-Ip: 192.168.107.0",
"Accept-Encoding: gzip"
],
The forged token never reached the app. LocalCan removes every LC-Access-* header a client sends and sets its own, so the app got LocalCan's signed token for Dana, and its check returned Dana (identity header). LocalCan also sets X-Forwarded-For, X-Real-IP and LC-IPCountry itself, so the ones a client sends don't reach the app (headers LocalCan adds).
Remote-User: admin@example.com arrived as sent. LocalCan doesn't set or remove the identity headers other sign-in proxies use, such as Remote-User, X-WEBAUTH-USER or X-Auth-Request-*, so any of them can come from a person's browser or script. Sign people in only from the signed token, after checking it, and turn off every setting in your app that trusts a plain identity header, such as Grafana's [auth.proxy].
Without a session, a real token copied from Dana's request and sent back as a header got LocalCan's 401, and the app received nothing (the output is trimmed to the lines that matter):
$ curl -sk -i -H @real-token.txt https://e2e-app.example.com/whoami
HTTP/2 401
content-type: application/json
server: LocalCan
www-authenticate: LocalCan-Access
x-localcan-auth: login
{"error":"authentication_required","login":"/.localcan/access/login"}
Some requests reach the app without an identity header: always a script with a service token, always a public path such as a health check or a webhook, and a request from another site that can change something. In the run, the first two arrived without one, even with a real token added to the service-token call and with Dana's session on the public path. Treat a request without the header as nobody.
With any identity-aware proxy, a plain header that names a user is safe only while nothing but the proxy can reach the app and the proxy removes the client's copy. If one of those slips, a forged or altered signed token still fails the check, and a copied real one works only until it expires, 10 minutes at most here.
How does the app check the token?
Check the signature against your team's public keys, then the issuer, the audience and the expiry. The keys are published at the issuer followed by /.well-known/jwks.json. This is the Node.js check from the identity header docs, with jose↗:
import { createRemoteJWKSet, jwtVerify } from 'jose'
const issuer = 'https://access.localcan.com/t/team_xxxxxxxxxxxx'
const audience = 'app_xxxxxxxxxxxx'
const jwks = createRemoteJWKSet(new URL(`${issuer}/.well-known/jwks.json`))
// The signed-in person, or null when the request has no identity header.
export async function viewer(request) {
const token = request.headers.get('lc-access-jwt-assertion')
if (!token) return null
const { payload } = await jwtVerify(token, jwks, { issuer, audience, algorithms: ['RS256'] })
return payload
}
The test app ran this function as written, with the test setup's issuer and audience. Then I checked Dana's token four ways: as received, with the email changed in the payload, as another app would check it, and as of one second after exp:
the token as received: verified, sub bd094536-af71-4c11-91c5-626f227199ec, email dana@example.com
the email changed in the payload: ERR_JWS_SIGNATURE_VERIFICATION_FAILED: signature verification failed
checked by another app (audience app_otherapp0000): ERR_JWT_CLAIM_VALIDATION_FAILED: unexpected "aud" claim value
checked one second after exp: ERR_JWT_EXPIRED: "exp" claim timestamp check failed
Answer a request whose token fails any check with 401, never with the person signed in. The identity header docs have the same check in Python with PyJWT. Both libraries cache the keys and fetch them again when a token names a key they don't have. LocalCan publishes a new key at least a day before it signs with it, and keeps a retired key published for 7 days.
Some apps do this check themselves. Grafana signs people in from the token with its built-in JWT sign-in, as the Grafana SSO post shows. Apps that don't read the header, such as Metabase, n8n, Umami and Open WebUI, keep their own login behind Access, as the Open WebUI SSO post shows, and strangers still never reach their login page.
What does the proxy see?
An identity-aware proxy is in the path of every request, and it has to end HTTPS to read cookies and set headers, so it sees each request in plaintext. LocalCan's servers end HTTPS for your hostname, pass each request on to the connector, and stream the app's response back without keeping any of it.
The servers in front of your app log one line per request, with the method, host, path, the names of query parameters but not their values, the status, the duration and the visitor's IP address. A sign-in, a sign-out, a refused request or a service-token call adds a line with the outcome, the host and the IP address, plus the token's ID for a service-token call (never its secret). They never log other headers, cookies, user agents or any part of a body, so the identity token stays out of the logs too (what LocalCan can see). Each sign-in is also recorded in your team's access log, with the person's email address, IP address and browser, and kept 90 days.
What happens when someone leaves?
Access checks with the sign-in method only when someone signs in. Suspending a person in Google Workspace, Microsoft Entra, GitHub or your identity provider stops their next sign-in, and a session they already have keeps working until it ends. To end it sooner, block them or select Sign out of every app under People, and their sessions end within 2 minutes. A shorter Sign people out after setting narrows the window (people, blocks and sign-out).
What happens if LocalCan's sign-in service can't be reached?
People already signed in keep working for up to 60 minutes after their last successful check, and new sign-ins wait until the sign-in service is back (how fast a change takes effect). The identity header stops sooner, when the current token expires, after 10 minutes at most (identity header). An app that signs people in from the header then sees requests without it, and treats them as nobody.
When do you need an identity-aware proxy?
When a web app on your server should open only for your team, or for a few named people outside it, from a browser anywhere: a Grafana or Metabase, an n8n, an admin panel your team built. If the app is already public and its own sign-in is all you need, or everyone who uses it is on one network already, you may not need one.
You can run an open-source identity-aware proxy yourself. It costs nothing to license, and you host it, keep it patched, expose it to the internet and set up its DNS and certificates. With Access, LocalCan runs that part: a small connector next to the app holds the only connection to LocalCan, outbound, and DNS stays with your provider. Access is in Preview and priced per app: Starter is $29 a month for 3 apps, every tier includes unlimited viewers under fair use, and you can set up 3 apps before you pay (Access pricing).
How do you put an identity-aware proxy in front of your app?
The steps follow the quick start, which also lists what to have first: Access on your team, an owner or admin account with two-factor sign-in, a Linux server that reaches the app, and a hostname on a domain you control.
1. Add the app. In the dashboard, open LocalCan Access → Apps, select Add app and choose a preset (Metabase OSS, Umami, Grafana, n8n) or Your own app. Enter the hostname people will open and the app's address as the connector reaches it, such as http://localhost:3000. Creating the app shows the connector key once, so copy it before you close the dialog.
2. Run the connector next to the app. It runs on Linux, with Docker, Docker Compose or systemd. With Docker, save the key in a file the connector's user owns, then start the connector on your app's Docker network:
sudo install -d -m 0755 /etc/localcan
sudo install -m 0400 -o 65532 -g 65532 /dev/stdin /etc/localcan/connector.key
# paste the key, press Enter, then Ctrl-D
docker run -d --name localcan-connector --restart unless-stopped \
--network <your app's network> \
-v localcan-connector:/data \
-v /etc/localcan/connector.key:/run/secrets/connector_key:ro \
-e LOCALCAN_CONNECTOR_KEY_FILE=/run/secrets/connector_key \
ghcr.io/localcan/connector:1
Then close the other ways in, such as a published port, so the hostname is the only path to the app and every request carries LocalCan's headers.
3. Point the hostname at LocalCan. The app's Domain section shows a CNAME target that ends in .cname.localcan.dev. Add a CNAME record from your hostname to it at your DNS provider. LocalCan gets the certificate from Let's Encrypt once the record resolves and the connector is connected.
4. Choose who may sign in. A new app lets nobody in. Add a rule under Who may sign in: a Google Workspace domain, a Microsoft tenant, exact email addresses, or a group from your own OIDC provider (sign-in methods and rules).
5. Open the address. LocalCan sends you to your sign-in method and back. Grafana and apps that check the identity header sign people in from it. For them, copy the issuer, the audience and the key set URL from the app's Identity header section into the check above, or into Grafana's settings from the identity header docs, and the app checks the same kind of token Dana's request carried. Metabase, Umami and n8n keep their own login behind Access, so for them this step ends at signing in.
