Logotipo de Auditing Idp Initiated Flow Trust

Auditing Idp Initiated Flow Trust

Organización
UnboundCompute
auditing-idp-initiated-flow-trust

Audita el inicio de sesión único iniciado por el proveedor de identidad para detectar confianza en una aserción no solicitada por la aplicación: una respuesta SAML iniciada por el IdP que el proveedor de servicios acepta sin una solicitud correspondiente y, por tanto, sin un estado de solicitud al que vincularla; una aserción no solicitada que un atacante captura y reproduce, o envía a una víctima para que inicie sesión en una cuenta elegida por el atacante; un valor RelayState que se acepta como destino de redirección y da lugar a una redirección abierta; una aserción sin audiencia o con una audiencia demasiado amplia, aceptada por un proveedor de servicios para el que no estaba destinada; y la ausencia de protección contra la repetición (sin uso único o con una caducidad poco estricta), que permite usar una aserción más de una vez. Úsala cuando una aplicación acepte una aserción de inicio de sesión que no ha solicitado y la validación de esa aserción no solicitada sea el límite de seguridad. La aserción no solicitada o reproducida es el origen; la sesión autenticada no deseada es el destino; y el fallo consiste en no vincular la solicitud, validar la audiencia o protegerse contra la repetición.

Descripción general

EditorUnboundCompute
Repositoriosecurity-agent-skills
Nombre de la habilidadauditing-idp-initiated-flow-trust
Estrellas
27
Forks
8
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por UnboundCompute en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Auditing Idp Initiated Flow Trust en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-idp-initiated-flow-trust
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese 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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Auditing Idp Initiated Flow Trust en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Auditing Idp Initiated Flow Trust automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Auditing Idp Initiated Flow Trust no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu 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.

Preguntas frecuentes

¿Qué hace la habilidad de IA Auditing Idp Initiated Flow Trust?

Audita el inicio de sesión único iniciado por el proveedor de identidad para detectar confianza en una aserción no solicitada por la aplicación: una respuesta SAML iniciada por el IdP que el proveedor de servicios acepta sin una solicitud correspondiente y, por tanto, sin un estado de solicitud al que vincularla; una aserción no solicitada que un atacante captura y reproduce, o envía a una víctima para que inicie sesión en una cuenta elegida por el atacante; un valor RelayState que se acepta como destino de redirección y da lugar a una redirección abierta; una aserción sin audiencia o con u...

¿Por qué usar Auditing Idp Initiated Flow Trust en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Auditing Idp Initiated Flow Trust está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Auditing Idp Initiated Flow Trust en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-idp-initiated-flow-trust. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Auditing Idp Initiated Flow Trust?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Auditing Idp Initiated Flow Trust?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Auditing Idp Initiated Flow Trust con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Auditing Idp Initiated Flow Trust?

Sí. UnboundCompute la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇