Logo Auditing Oauth Token Audience And Scope Trust

Auditing Oauth Token Audience And Scope Trust

Tổ chức
UnboundCompute
auditing-oauth-token-audience-and-scope-trust

Kiểm tra cách máy chủ tài nguyên tin cậy token truy cập OAuth để phát hiện những trường hợp nhầm lẫn đáng ra phải bị từ chối: token được cấp cho một đối tượng nhận nhưng lại được dịch vụ khác chấp nhận; phạm vi quyền bị hiểu rộng hoặc hẹp hơn thực tế, khiến token cho phép thực hiện thao tác không được cấp quyền; nhầm lẫn giữa bên phát hành token hoặc máy chủ ủy quyền, khiến một bên chấp nhận token từ nhà phát hành khác; và máy chủ tài nguyên chỉ xác minh chữ ký mà không kiểm tra đối tượng nhận, nhà phát hành hoặc phạm vi quyền. Áp dụng cho kiến trúc OAuth và bearer token, trong đó token truy cập cấp quyền gọi giữa ứng dụng khách, máy chủ ủy quyền và một hoặc nhiều máy chủ tài nguyên. Dùng khi máy chủ tài nguyên chấp nhận bearer token và việc kiểm tra đối tượng nhận, nhà phát hành cùng phạm vi quyền là ranh giới bảo vệ. Token gửi sai đối tượng nhận hoặc vượt quá phạm vi quyền là nguồn; thao tác tài nguyên mà token truy cập được là đích; còn lỗi là thiếu bước xác thực đối tượng nhận, nhà phát hành hoặc phạm vi quyền.

Tổng quan

Nhà phát hànhUnboundCompute
Kho mãsecurity-agent-skills
Tên kỹ năngauditing-oauth-token-audience-and-scope-trust
Sao
27
Bản fork
8
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được UnboundCompute công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Auditing Oauth Token Audience And Scope Trust trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-oauth-token-audience-and-scope-trust
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Auditing Oauth Token Audience And Scope Trust trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Auditing Oauth Token Audience And Scope Trust ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Auditing Oauth Token Audience And Scope Trust với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Câu hỏi thường gặp

Kỹ năng AI Auditing Oauth Token Audience And Scope Trust làm được gì?

Kiểm tra cách máy chủ tài nguyên tin cậy token truy cập OAuth để phát hiện những trường hợp nhầm lẫn đáng ra phải bị từ chối: token được cấp cho một đối tượng nhận nhưng lại được dịch vụ khác chấp nhận; phạm vi quyền bị hiểu rộng hoặc hẹp hơn thực tế, khiến token cho phép thực hiện thao tác không được cấp quyền; nhầm lẫn giữa bên phát hành token hoặc máy chủ ủy quyền, khiến một bên chấp nhận token từ nhà phát hành khác; và máy chủ tài nguyên chỉ xác minh chữ ký mà không kiểm tra đối tượng nhận, nhà phát hành hoặc phạm vi quyền. Áp dụng cho kiến trúc OAuth và bearer token, trong đó token tru...

Vì sao nên dùng Auditing Oauth Token Audience And Scope Trust trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Auditing Oauth Token Audience And Scope Trust là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Auditing Oauth Token Audience And Scope Trust trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-oauth-token-audience-and-scope-trust. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Auditing Oauth Token Audience And Scope Trust?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Auditing Oauth Token Audience And Scope Trust với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Auditing Oauth Token Audience And Scope Trust với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Auditing Oauth Token Audience And Scope Trust có miễn phí không?

Có. Kỹ năng này được UnboundCompute phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇