mirror of
https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git
synced 2026-06-12 14:14:56 +03:00
3.4 KiB
3.4 KiB
SAML SSO Implementation Workflows
Workflow 1: SP-Initiated SSO Flow
User -> Service Provider -> Okta IdP -> User Authenticates -> Okta -> Service Provider -> User
Detailed Steps:
- User accesses protected resource on Service Provider
- SP checks for existing session - none found
- SP generates SAML AuthnRequest with:
- Issuer (SP Entity ID)
- AssertionConsumerServiceURL
- NameIDPolicy (email format)
- RequestID (for InResponseTo validation)
- SP redirects user to Okta SSO URL with base64-encoded AuthnRequest
- Okta authenticates user (credentials, MFA if configured)
- Okta generates SAML Response containing:
- Signed assertion with SHA-256
- Subject NameID (user identifier)
- Conditions (NotBefore, NotOnOrAfter, AudienceRestriction)
- AuthnStatement (authentication context)
- AttributeStatement (mapped user attributes)
- Okta POSTs SAML Response to SP ACS URL
- SP validates SAML Response:
- Verify XML signature against Okta certificate
- Check InResponseTo matches original request ID
- Validate time conditions (with clock skew tolerance)
- Verify audience restriction matches SP Entity ID
- Check authentication context class
- SP extracts user identity and attributes
- SP creates local session and grants access
Workflow 2: IdP-Initiated SSO Flow
Steps:
- User logs into Okta dashboard
- User clicks on application tile
- Okta generates unsolicited SAML Response (no InResponseTo)
- Okta POSTs to SP ACS URL
- SP validates assertion (no InResponseTo check)
- SP creates session
Security Note:
IdP-initiated SSO is less secure because it cannot validate InResponseTo, making it more susceptible to replay attacks. Use SP-initiated flow when possible.
Workflow 3: Certificate Rotation
Steps:
- Generate new X.509 certificate in Okta (Admin > Settings > Security)
- Download new certificate (do not yet set as active)
- Install new certificate on SP alongside existing certificate
- Configure SP to accept assertions signed with either certificate
- Activate new certificate in Okta
- Monitor for authentication failures
- After validation period, remove old certificate from SP
- Update SAML metadata on both sides
Timeline:
- Day 0: Generate new certificate and distribute to SP team
- Day 1-7: SP installs new certificate (dual-cert mode)
- Day 8: Activate new certificate in Okta
- Day 8-14: Monitor authentication logs for failures
- Day 15: Remove old certificate from SP
Workflow 4: Single Logout (SLO)
Steps:
- User initiates logout at SP
- SP generates SAML LogoutRequest
- SP sends LogoutRequest to Okta SLO endpoint
- Okta terminates IdP session
- Okta sends LogoutRequest to all other SPs in session
- Each SP terminates local session
- Okta sends LogoutResponse to initiating SP
- SP confirms logout to user
Workflow 5: Troubleshooting Authentication Failures
Diagnostic Steps:
- Install SAML Tracer browser extension
- Reproduce the failed SSO attempt
- Capture the SAML AuthnRequest and Response
- Check for common issues:
- Signature Invalid: Certificate mismatch or SHA-1 vs SHA-256
- Audience Mismatch: SP Entity ID doesn't match Okta config
- Time Condition Failed: Clock skew > configured tolerance
- NameID Format Mismatch: SP expects different format
- Missing Attributes: Attribute mapping not configured
- Review Okta System Log for error details
- Verify SP metadata matches Okta configuration