Auditing Idp Initiated Flow Trustのロゴ

Auditing Idp Initiated Flow Trust

組織
UnboundCompute
auditing-idp-initiated-flow-trust

IdP起点のシングルサインオンで、アプリケーションが要求していない未承諾のアサーションに置かれる信頼を監査します。対応するリクエストがなく、紐付けるリクエスト状態もないまま、サービスプロバイダーが受け入れるIdP起点のSAMLレスポンス、攻撃者が取得してリプレイしたり、被害者に送って攻撃者が指定したアカウントにログインさせたりできる未承諾アサーション、リダイレクト先として信頼されるRelayState値によるオープンリダイレクト、audienceが設定されていない、または広すぎるため本来対象ではないサービスプロバイダーが受け入れてしまうアサーション、同じアサーションを複数回利用できるリプレイ防止策の欠如(一回限りの使用設定がない、または有効期限が緩い)を対象とします。アプリケーションが要求していないログインアサーションを受け入れ、その未承諾アサーションの検証がセキュリティ境界となる場合に使用してください。未承諾またはリプレイされたアサーションがソースで、意図しない認証済みセッションがシンクです。リクエストとの紐付け、audience、またはリプレイ防止策が欠けていることが脆弱性です。

概要

公開者UnboundCompute
リポジトリsecurity-agent-skills
スキル名auditing-idp-initiated-flow-trust
スター
27
フォーク
8
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    UnboundComputeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Auditing Idp Initiated Flow Trust」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-idp-initiated-flow-trust
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをその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-idp-initiated-flow-trust .claude/skills/auditing-idp-initiated-flow-trust
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAuditing Idp Initiated Flow Trustを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAuditing Idp Initiated Flow Trustを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Auditing Idp Initiated Flow Trustは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Auditing IdP-initiated flow trust: an unsolicited login has no request to anchor it, so validate everything else

In service-provider-initiated single sign-on the application starts the flow, so it has a request on file to bind the returning assertion to: a request id it can require the response to reference, and request state it can check. IdP-initiated single sign-on removes that anchor. Login begins at the identity provider and the application receives an assertion it never asked for, with no matching request, no InResponseTo to check, and no request state to compare against. Everything the request would have pinned down, that this response answers a login this browser started, must now be validated some other way, and often is not. An unsolicited assertion an attacker captures can be replayed, or delivered to a victim, to log a browser into an attacker-chosen account. A RelayState value trusted as a redirect target becomes an open redirect or drops the user into an attacker-controlled context after login. An assertion with no audience restriction, or one too wide, is accepted by a service provider it was never meant for. And without a replay defense, one-time-use, a tight expiry, a consumed-assertion cache, the same assertion logs in again and again. The audit treats an unsolicited assertion as untrusted, checks its signature, audience, timing, and single-use, and refuses to trust RelayState as a destination. You audit this by capturing an IdP-initiated assertion and trying to replay it, redirect with it, or use it at the wrong service provider.

When to use

  • An application accepts IdP-initiated single sign-on: an unsolicited SAML assertion (or similar) with no matching service-provider request.
  • The assertion may be accepted with no request binding, no or a too-wide audience, or no replay defense.
  • RelayState may be trusted as a redirect target.

Scope check

Test IdP-initiated flows only against applications and identity providers you own or are authorized to assess, with test accounts. Capturing and replaying assertions logs into real sessions, so use test identities and never replay an assertion or log into an account that is not yours. If you can't name the authorization, stop.

The loop

  1. Establish how an unsolicited assertion is validated first. Name what the service provider checks on an IdP-initiated assertion with no request to anchor it: signature and trusted issuer, audience restriction, timing (NotBefore, NotOnOrAfter), single-use enforcement, and how RelayState is handled. This is the false-positive killer: a service provider that verifies the signature and issuer, enforces a narrow audience, checks tight timing, consumes each assertion once, and treats RelayState only as a validated internal target is behaving correctly. Name the intended validation, then test each check.

  2. Test replay and single-use. Capture a valid IdP-initiated assertion and submit it a second time. Confirm the service provider enforces single-use (a consumed-assertion cache plus a tight expiry window) so a captured assertion cannot be replayed. An unsolicited assertion with no replay defense logs in again every time it is submitted, and can be delivered to a victim's browser.

  3. Test audience restriction. Examine the assertion's audience and try to use it at a different service provider or endpoint. Confirm the audience is present and narrow so the assertion is accepted only by its intended service provider. A missing or too-wide audience lets an assertion minted for one application log in to another.

  4. Test RelayState handling. Set RelayState to an external URL and to an attacker-controlled path and confirm the service provider does not redirect to it. RelayState must be treated as an opaque token mapping to a validated internal destination, not as a redirect target. A trusted RelayState is an open redirect that lands the post-login user in an attacker-controlled context.

  5. Test signature, issuer, and timing. Confirm the assertion's signature is verified against the trusted identity provider's key, the issuer is on the allowlist, and NotBefore and NotOnOrAfter are enforced with little clock skew. Try an assertion from an untrusted issuer, an unsigned or altered one, and an expired one, and confirm each is rejected. A weak signature, issuer, or timing check accepts an assertion it should not.

  6. Confirm and record. Confirm with test accounts by replaying a captured assertion, using one at the wrong service provider, redirecting through RelayState, or logging in with an assertion from an untrusted issuer or past its window, without touching real accounts. Kill the lead if the service provider verifies signature and issuer, enforces a narrow audience and tight timing, consumes each assertion once, and treats RelayState only as a validated internal target. Record the unsolicited or replayed assertion, the unintended authenticated session, and the missing request binding, audience, or replay defense.

Where IdP-initiated trust leaks

  • No replay defense. An unsolicited assertion with no single-use enforcement or a loose expiry replays every time it is submitted and can be delivered to a victim.
  • Missing or too-wide audience. An assertion with no audience restriction, or one covering more than its intended service provider, is accepted where it was never meant to be used.
  • Trusted RelayState. RelayState treated as a redirect target is an open redirect that lands the post-login user in an attacker-controlled destination.
  • Weak signature or issuer check. Accepting an unsigned, altered, or untrusted-issuer assertion lets an attacker mint the login directly.
  • Loose timing. A wide validity window or generous clock skew widens the replay window and accepts stale assertions.

Worked example (a confirm and a kill)

Confirm. A service provider accepts IdP-initiated SAML responses, does not track consumed assertions, uses a generous validity window, and redirects the user to the RelayState value after login. On a test account, a captured assertion is replayed twice and logs in both times, and setting RelayState to an external URL redirects the authenticated user off-site, because there is no single-use enforcement and RelayState is trusted as a destination. Confirmed assertion replay and open redirect in IdP-initiated flow, high, remediation = enforce single-use with a consumed-assertion cache and a tight expiry, and treat RelayState as an opaque token mapping to a validated internal target, never as a redirect URL.

Kill. The service provider verifies the signature against the trusted issuer, enforces a narrow audience so the assertion works only here, checks NotBefore and NotOnOrAfter with minimal skew, consumes each assertion once so a replay is rejected, and maps RelayState only to a validated internal destination. A replayed assertion fails, one for another service provider is refused, and an external RelayState does not redirect. Killed, kill_reason = "unsolicited assertions are signature- and issuer-verified, audience- and time-restricted, single-use, and RelayState is a validated internal target; no assertion replays, crosses service providers, or redirects off-site."

Rationalizations to reject

  • "There is no request because the IdP starts it." → That is exactly why the other checks must be strict; with no request to anchor the assertion, audience, timing, and single-use are the only binding left.
  • "The assertion is signed." → A signed assertion still replays if it is not single-use and still works elsewhere if its audience is wide; verify signature and audience and replay defense, not signature alone.
  • "RelayState is just where to send them." → A trusted RelayState is an open redirect; map it to a validated internal destination and never redirect to its raw value.
  • "The assertion expires quickly." → A short expiry narrows but does not close the replay window; enforce single-use with a consumed-assertion cache on top of the expiry.
  • "Our IdP is trusted." → Confirm the issuer allowlist and signature verification actually enforce that; a weak check accepts an assertion from an issuer you never trusted.

Executing this in practice

You need how the service provider validates an unsolicited assertion (signature, issuer, audience, timing, single-use) and how it handles RelayState. With test accounts, capture an IdP-initiated assertion and replay it, use it at another service provider, drive RelayState to an external target, and submit untrusted-issuer and expired assertions. Reading the assertion-consumption code shows the intended validation; a replayed, cross-provider, or redirecting assertion shows what the validation omits.

Related

  • auditing-saml-and-oidc-federation-trust - the general assertion validation; IdP-initiated flow is the case where the request anchor is absent and the other checks must carry the whole binding.
  • auditing-jit-provisioning-and-role-mapping - an unsolicited assertion often triggers JIT provisioning; the two combine when an IdP-initiated login creates an account.
  • auditing-sso-logout-and-session-revocation - the teardown side of the session an unsolicited assertion creates; both concern sessions the application did not fully originate.
  • auditing-cors-and-cross-origin-trust - a redirected post-login user landing in an attacker-controlled cross-origin context is that skill's concern; RelayState-as-redirect is where the two meet.
  • FINDING-SCHEMA.md - source = the unsolicited or replayed assertion, sink = the unintended authenticated session, evidence = the missing request binding, audience, or replay defense.

よくある質問

AIスキル「Auditing Idp Initiated Flow Trust」では何ができますか?

IdP起点のシングルサインオンで、アプリケーションが要求していない未承諾のアサーションに置かれる信頼を監査します。対応するリクエストがなく、紐付けるリクエスト状態もないまま、サービスプロバイダーが受け入れるIdP起点のSAMLレスポンス、攻撃者が取得してリプレイしたり、被害者に送って攻撃者が指定したアカウントにログインさせたりできる未承諾アサーション、リダイレクト先として信頼されるRelayState値によるオープンリダイレクト、audienceが設定されていない、または広すぎるため本来対象ではないサービスプロバイダーが受け入れてしまうアサーション、同じアサーションを複数回利用できるリプレイ防止策の欠如(一回限りの使用設定がない、または有効期限が緩い)を対象とします。アプリケーションが要求していないログインアサーションを受け入れ、その未承諾アサーションの検証がセキュリティ境界となる場合に使用してください。未承諾またはリプレイされたアサーションがソースで、意図しない認証済みセッションがシンクです。リクエストとの紐付け、audience、またはリプレイ防止策が欠けていることが脆弱性です。

TypingMindでAuditing Idp Initiated Flow Trustを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Auditing Idp Initiated Flow Trustはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAuditing Idp Initiated Flow Trustをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-idp-initiated-flow-trustを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Auditing Idp Initiated Flow Trustを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Auditing Idp Initiated Flow Trustで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAuditing Idp Initiated Flow Trustを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Auditing Idp Initiated Flow Trust」は無料ですか?

はい。UnboundComputeがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇