Logo de Auditing Idp Initiated Flow Trust

Auditing Idp Initiated Flow Trust

Organização
UnboundCompute
auditing-idp-initiated-flow-trust

Audite o logon único iniciado pelo provedor de identidade em busca de confiança em uma asserção não solicitada pelo aplicativo: uma resposta SAML iniciada pelo IdP que o provedor de serviço aceita sem uma solicitação correspondente, deixando-a sem vínculo com o estado da solicitação; uma asserção não solicitada capturada por um invasor e reproduzida ou enviada a uma vítima para fazer login em uma conta escolhida pelo invasor; um valor de RelayState confiável como destino de redirecionamento, que se torna um redirecionamento aberto; uma asserção sem audiência ou com uma audiência ampla demais, aceita por um provedor de serviço ao qual não se destinava; e a ausência de proteção contra repetição (sem uso único ou com expiração fraca), que permite usar a mesma asserção mais de uma vez. Use quando um aplicativo aceitar uma asserção de login que não solicitou e a validação dessa asserção não solicitada for o limite de segurança. A asserção não solicitada ou reproduzida é a origem, a sessão autenticada indevida é o destino, e a ausência de vínculo com a solicitação, de audiência ou de proteção contra repetição é a vulnerabilidade.

Visão geral

Publicado porUnboundCompute
Repositóriosecurity-agent-skills
Nome da habilidadeauditing-idp-initiated-flow-trust
Estrelas
27
Forks
8
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por UnboundCompute no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Auditing Idp Initiated Flow Trust no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-idp-initiated-flow-trust
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Auditing Idp Initiated Flow Trust em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Auditing Idp Initiated Flow Trust automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Auditing Idp Initiated Flow Trust não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Perguntas frequentes

O que a habilidade de IA Auditing Idp Initiated Flow Trust faz?

Audite o logon único iniciado pelo provedor de identidade em busca de confiança em uma asserção não solicitada pelo aplicativo: uma resposta SAML iniciada pelo IdP que o provedor de serviço aceita sem uma solicitação correspondente, deixando-a sem vínculo com o estado da solicitação; uma asserção não solicitada capturada por um invasor e reproduzida ou enviada a uma vítima para fazer login em uma conta escolhida pelo invasor; um valor de RelayState confiável como destino de redirecionamento, que se torna um redirecionamento aberto; uma asserção sem audiência ou com uma audiência ampla demai...

Por que usar Auditing Idp Initiated Flow Trust no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Auditing Idp Initiated Flow Trust é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Auditing Idp Initiated Flow Trust no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-idp-initiated-flow-trust. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Auditing Idp Initiated Flow Trust?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Auditing Idp Initiated Flow Trust?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Auditing Idp Initiated Flow Trust com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Auditing Idp Initiated Flow Trust é gratuita?

Sim. A habilidade é publicada no GitHub por UnboundCompute sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇