New — Iris AI drafts your firewall, routing & rate-limit rules. Explore AI features →
Changelog
Security

Your app gets who signed in, not their password or API key

ngris removes the password, access token or API key it checked before your app gets the request, and the signed token tells your app which key called.

Your app gets who signed in, not their password or API key

When a script called your app with an access token, or a partner with an API key, ngris checked the credential and passed it on as it came. Your app got a secret it didn't need, one that could end up in its logs. And for an API key, your app couldn't tell which key had called.

Now ngris removes the credential it checked, and the signed X-Ngris-Signature token says who called. Above is the request Acme Labs' console gets from its status page bot: the bot's access token is gone, and the token and headers name the bot.

The Credentials card in Your app: Pass credentials to your app and Pass the sign-in cookie to your app, both off
An app that does read the credential itself can have it back: turn on Pass credentials to your app, and it gets the one ngris checked.
The API keys section of api.example.com: the note that X-Ngris-Signature names the key in its api_key claim, and three keys, each with its ID under its name
Acme Labs' public API at api.example.com gives each partner its own key. The ID under a key's name is the one your app finds in the token, so it can tell Northwind's calls from the iOS app's.

The public API has no sign-in, so a request the Northwind key let in carries this in its token:

json
{
  "sub": "01a1f0cf-55c6-79e9-9983-0024706adb07",
  "auth_method": "api_key",
  "api_key": {
    "id": "01a1f0cf-55c6-79e9-9983-0024706adb07",
    "name": "Partner: Northwind integration"
  }
}

What changed

  • The credential stays at the edge. A password or access token sent in Authorization or X-Tunnel-Token, and an API key from the header, query parameter or cookie the key check reads, are removed before the request reaches your app. The rest of the request arrives as sent.
  • Pass credentials to your app. A switch in Your app, off unless you turn it on, for an app that still reads the credential.
  • Which key called. The signed token has an api_key claim with the key's id and name. With sign-in off, the token's sub is the key's ID and its auth_method is api_key.
  • A new key has a new ID. When you replace a partner's key, map the new ID to them.

Get started

  1. Open the endpoint's Sign-in & access tab, then Your app.
  2. Under The request your app receives, pick a user to see what your app gets from them.
  3. Leave Pass credentials to your app off, unless your app checks the credential itself.
  4. In your app, verify X-Ngris-Signature and read who called from it: api_key.id names the key.
  5. Read the docs: Passwords, tokens and keys and The signed token.

Read the docs

Ask an AI to summarise this page
Deploy
App hosting Edge functions Domains & certificates
Connect
Secure tunnels API gateway Multi-region edge
Protect
Bot protection & challenge WAF & firewall Edge login
Observe & AI
Monitoring Inspector & replay Iris AI MCP server AI Gateway
Developers
Developer tools Docs ngrok policy converter Blog Changelog
Compare
Ngris vs ngrok Ngris vs Cloudflare Tunnel Ngris vs Vercel Ngris vs Netlify Expose localhost guide
More
Solutions Pricing Enterprise Sign in Get Started Free