executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
zero-trust-identityAdvanced Zero Trust Identity, OIDC/SAML Mechanics, and JWT Validation
Independent GitHub snapshot · Automated classification · Original documentation governs
Zero Trust assumes hostility at all network boundaries, mandating explicit verification of identity and device context for every access request. This reference details the underlying mechanisms of primary identity federations and token validations.
OIDC is an identity layer built on top of the OAuth 2.0 protocol. The Authorization Code Flow (often with PKCE) is the gold standard for secure authentication.
/authorize) with response_type=code, a client_id, redirect_uri, scope=openid, and state/nonce/code_challenge.redirect_uri with an authorization code and the state parameter for CSRF mitigation./token), exchanging the code and code_verifier (PKCE) for an ID Token (JWT) and an Access Token.JWTs (JSON Web Tokens) encapsulate claims in a compact, URL-safe format. Validation of the signature is paramount to prevent token forgery.
alg (algorithm) is expected (e.g., preventing algorithm substitution attacks where alg is changed from RS256 to HS256, forcing the RS to use the public key as a symmetric HMAC secret).Header.Payload string using the specified algorithm and appropriate key, then strictly compare it against the signature appended to the token.exp (expiration), iss (issuer), and aud (audience).SAML relies on XML and SOAP/HTTP POST bindings. It is heavily utilized in legacy enterprise SSO.
<AuthnRequest>, signs it, deflates it, base64 encodes it, and redirects the user to the IdP.<samlp:Response> containing <saml:Assertion> elements (Attributes, Authentication context). The assertion (and often the entire response) is digitally signed (XML Signature) using the IdP's private key.%%{init: {"theme": "default", "flowchart": {"useMaxWidth": true}}}%%
flowchart TD
User([User Agent]) -->|1. Request Access| RP[Relying Party / Client]
RP -->|2. Redirect to IdP| IdP[Identity Provider]
User -->|3. Authenticate| IdP
IdP -->|4. Auth Code| RP
RP -->|5. Token Exchange| IdP
IdP -->|6. ID Token + Access Token| RP
RP -->|7. API Request + JWT| RS[Resource Server]
RS -->|8. Fetch JWKS| JWKS[IdP JWKS Endpoint]
JWKS -->|9. Public Key| RS
RS -->|10. Validate RS256 Signature| RS
RS -->|11. Resource Response| RP
style IdP fill:#f9f,stroke:#333,stroke-width:2px
style RS fill:#bbf,stroke:#333,stroke-width:2px
style RP fill:#bfb,stroke:#333,stroke-width:2px