Logo van Auditing Oauth Token Audience And Scope Trust

Auditing Oauth Token Audience And Scope Trust

Organisatie
UnboundCompute
auditing-oauth-token-audience-and-scope-trust

Controleer hoe een resource server OAuth-toegangstokens vertrouwt en of die tokens worden afgewezen wanneer dat nodig is: een token dat voor de ene doelgroep is uitgegeven, maar door een andere service wordt geaccepteerd; een scope die ruimer of beperkter wordt opgevat dan bedoeld, waardoor een token toegang geeft tot een bewerking waarvoor het geen rechten heeft; verwarring tussen tokenuitgevers of autorisatieservers, waarbij een token van de ene uitgever wordt geaccepteerd door een partij die een andere vertrouwt; en een resource server die de handtekening valideert, maar niet de doelgroep, uitgever of scope controleert. Dit geldt voor OAuth- en bearer-tokenarchitecturen waarin een toegangstoken een aanroep tussen een client, een autorisatieserver en een of meer resource servers autoriseert. Gebruik dit wanneer een resource server bearer-tokens accepteert en de controles van doelgroep, uitgever en scope de beveiligingsgrens vormen. Het token dat voor de verkeerde doelgroep wordt aangeboden of buiten de scope valt, is de bron; de resourcebewerking waartoe het toegang geeft, is het doel; en de ontbrekende controle van doelgroep, uitgever of scope is de kwetsbaarheid.

Overzicht

UitgeverUnboundCompute
Repositorysecurity-agent-skills
Skillnaamauditing-oauth-token-audience-and-scope-trust
Sterren
27
Forks
8
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door UnboundCompute op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Auditing Oauth Token Audience And Scope Trust in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-oauth-token-audience-and-scope-trust
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-oauth-token-audience-and-scope-trust .claude/skills/auditing-oauth-token-audience-and-scope-trust
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Auditing Oauth Token Audience And Scope Trust in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Auditing Oauth Token Audience And Scope Trust automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Auditing Oauth Token Audience And Scope Trust niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Auditing OAuth token audience and scope trust: a token is only good for what it was issued for

A bearer access token is a claim with a precise domain: it was issued by a particular authorization server, for a particular audience, carrying a particular scope, and it authorizes only what those three agree on. A resource server that checks the signature but not the audience, issuer, and scope is trusting a token far beyond what it was minted for. The confusions are specific and common. A token issued for service A is presented to service B, and if B does not verify the audience it accepts A's token as its own. A scope is treated as coarser than it is, or a missing-scope check lets any valid token reach a privileged operation. A token from a different authorization server is honored by a party that only meant to trust one issuer. Each is a token used outside its domain. The audit checks that every token is validated against the audience, issuer, and scope the operation requires, not merely that it is a well-formed, signed token. You audit this by testing whether a token good for one thing is accepted for another.

When to use

  • A resource server accepts OAuth or bearer access tokens to authorize calls.
  • Multiple services or audiences accept tokens, and the audience or issuer may not be verified per service.
  • Scopes gate operations, and the resource server may not check the specific scope each operation requires.

Scope check

Test token trust only against services you own or are authorized to assess, on non-production tokens and accounts. Presenting tokens across audiences exercises real authorization, so use non-production credentials and never use a confused token to reach real data. If you can't name the authorization, stop.

The loop

  1. Establish each operation's required token domain first. Name, per operation, the audience, issuer, and scope a token must have to be authorized: this service as the audience, the trusted authorization server as the issuer, the specific scope for the action. This is the false-positive killer: a resource server that verifies all three on every call authorizes exactly the tokens it should. Name the required domain, then test what the server actually accepts.

  2. Check audience validation. Determine whether the resource server verifies that the token's audience is itself. Present a token minted for a different service or audience and confirm it is rejected. A server that accepts a token whose audience is another service is honoring credentials issued for someone else, which is the core audience-confusion bug.

  3. Check issuer validation and mix-up. Confirm the resource server verifies the token issuer against the specific authorization server it trusts, and that in a multi-issuer or federated setup a token from one issuer is not honored where another was intended. A party that trusts issuer X but validates only that the token is signed by some known key can be given a token from issuer Y.

  4. Check scope enforcement per operation. For each operation, confirm the server checks the exact scope the action requires rather than accepting any valid token or treating a broad scope as covering everything. Test whether a token with a read scope reaches a write operation, or a token with an unrelated scope reaches a privileged one. Missing or coarse scope checks let a token exceed its grant.

  5. Check token binding and reuse. Where applicable, confirm the token cannot be replayed to a different audience or reused past its intended context: audience restriction, sender constraint, and expiry are honored. A token that is valid, signed, and unexpired but usable anywhere is a bearer secret with no domain, so the binding checks are part of the boundary.

  6. Confirm and record. Confirm by presenting a token outside its domain, a cross-audience token accepted by the wrong service, a wrong-issuer token honored, or an insufficient-scope token reaching a privileged operation, on non-production accounts and without touching real data. Kill the lead if the resource server verifies audience, issuer, and per-operation scope on every call and honors token binding and expiry. Record the misused token, the resource-operation sink, and the missing audience, issuer, or scope validation.

Where token trust leaks

  • Unvalidated audience honors another's token. A resource server that does not check the audience accepts a token minted for a different service as its own.
  • Unvalidated issuer enables mix-up. Trusting any known signer rather than the specific authorization server lets a token from the wrong issuer through.
  • Missing scope checks exceed the grant. Accepting any valid token, or treating a broad scope as universal, lets a token reach an operation it was not granted.
  • A signed token is not an authorized token. Signature validity proves origin, not that the token is for this audience, this issuer, and this scope.
  • An unbound token is a portable secret. A token with no audience restriction, sender constraint, or honored expiry can be replayed wherever a bearer token is accepted.

Worked example (a confirm and a kill)

Confirm. Two internal services accept tokens from the same authorization server, and service B validates the token signature and expiry but not the audience. A token minted for service A, obtained legitimately by a client, is presented to service B and accepted, letting the client reach service B operations it was never granted. Confirmed audience confusion across resource servers, high, remediation = validate the audience on every resource server so each accepts only tokens minted for itself, verify the issuer against the specific authorization server, and check the exact scope each operation requires.

Kill. Each resource server verifies that the token audience is itself, that the issuer is the specific authorization server it trusts, and that the token carries the exact scope the requested operation requires, and it honors audience restriction and expiry. A token minted for another service, from another issuer, or lacking the operation's scope is rejected. Killed, kill_reason = "audience, issuer, and per-operation scope verified on every call with honored binding and expiry; a token is accepted only for exactly what it was issued for."

Rationalizations to reject

  • "The token is signed and valid." → Signature validity is origin, not domain; confirm the audience, issuer, and scope match this operation, or a valid token is accepted outside its grant.
  • "Both services use the same auth server." → Same issuer is not same audience; without an audience check service A's token works on service B.
  • "Any valid token means they are authenticated." → Authentication is not authorization; check the specific scope each operation requires, not merely that a token is present.
  • "We trust our issuer." → Confirm you validate the specific issuer, not just any known signer; a multi-issuer setup enables a mix-up otherwise.
  • "Tokens expire quickly." → Expiry limits the window, not the domain; an unbound token is usable at any audience for its lifetime.

Executing this in practice

You need, per operation, the required audience, issuer, and scope, and what the resource server actually validates on each call. For each service, present a cross-audience token, a wrong-issuer token, and an insufficient-scope token, and observe what is accepted. Reading the token-validation code shows the intended domain checks; a token accepted outside its domain shows whether they hold.

Related

  • auditing-jwt-verification-and-key-trust - the token-verification mechanics beneath this; algorithm and key confusion undermine the same audience and issuer claims this skill checks.
  • auditing-saml-and-oidc-federation-trust - the federation companion; assertion and issuer trust are the identity-layer version of audience and issuer validation.
  • hunting-broken-object-level-authorization - once a token is accepted, whether it may act on the specific object is the next authorization question this pairs with.
  • mapping-service-account-impersonation-chains - tokens that cross audiences are one way an identity reaches beyond its intended scope; the two maps meet at token exchange.
  • FINDING-SCHEMA.md - source = the token presented to the wrong audience or beyond its scope, sink = the resource operation it reaches, evidence = the missing audience, issuer, or scope validation.

Veelgestelde vragen

Wat doet de AI-skill Auditing Oauth Token Audience And Scope Trust?

Controleer hoe een resource server OAuth-toegangstokens vertrouwt en of die tokens worden afgewezen wanneer dat nodig is: een token dat voor de ene doelgroep is uitgegeven, maar door een andere service wordt geaccepteerd; een scope die ruimer of beperkter wordt opgevat dan bedoeld, waardoor een token toegang geeft tot een bewerking waarvoor het geen rechten heeft; verwarring tussen tokenuitgevers of autorisatieservers, waarbij een token van de ene uitgever wordt geaccepteerd door een partij die een andere vertrouwt; en een resource server die de handtekening valideert, maar niet de doelgroe...

Waarom Auditing Oauth Token Audience And Scope Trust gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Auditing Oauth Token Audience And Scope Trust bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Auditing Oauth Token Audience And Scope Trust in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-oauth-token-audience-and-scope-trust. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Auditing Oauth Token Audience And Scope Trust gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Auditing Oauth Token Audience And Scope Trust gebruiken?

Zoveel als je wilt. Je kunt Auditing Oauth Token Audience And Scope Trust gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Auditing Oauth Token Audience And Scope Trust gratis?

Ja. Deze skill is door UnboundCompute op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇