implementing-saml-sso-with-okta
Implement SAML 2.0 Single Sign-On (SSO) using Okta as the Identity Provider (IdP). This skill covers end-to-end configuration of SAML authentication flows, attribute mapping, certificate management, a
What this skill does
# Implementing SAML SSO with Okta ## Overview Implement SAML 2.0 Single Sign-On (SSO) using Okta as the Identity Provider (IdP). This skill covers end-to-end configuration of SAML authentication flows, attribute mapping, certificate management, and security hardening for enterprise SSO deployments. ## When to Use - When deploying or configuring implementing saml sso with okta capabilities in your environment - When establishing security controls aligned to compliance requirements - When building or improving security architecture for this domain - When conducting security assessments that require this implementation ## Prerequisites - Familiarity with identity access management concepts and tools - Access to a test or lab environment for safe execution - Python 3.8+ with required dependencies installed - Appropriate authorization for any testing activities ## Objectives - Configure Okta as a SAML 2.0 Identity Provider - Implement SP-initiated and IdP-initiated SSO flows - Map SAML attributes and configure assertion encryption - Enforce SHA-256 signatures and secure certificate rotation - Test SSO flows with SAML tracer tools - Implement Single Logout (SLO) handling ## Key Concepts ### SAML 2.0 Authentication Flow 1. **SP-Initiated Flow**: User accesses Service Provider -> SP generates AuthnRequest -> Redirect to Okta IdP -> User authenticates -> Okta sends SAML Response -> SP validates assertion -> Access granted 2. **IdP-Initiated Flow**: User authenticates at Okta -> Selects application -> Okta sends unsolicited SAML Response -> SP validates -> Access granted ### Critical Security Requirements - **SHA-256 Signatures**: All SAML assertions must use SHA-256 (not SHA-1) for digital signatures - **Assertion Encryption**: Encrypt SAML assertions using AES-256 to protect attribute values in transit - **Audience Restriction**: Configure audience URI to prevent assertion replay across different SPs - **NotBefore/NotOnOrAfter**: Enforce time validity windows to prevent stale assertion usage - **InResponseTo Validation**: Verify assertion corresponds to the original AuthnRequest ### Okta Application Configuration - **Single Sign-On URL**: The ACS (Assertion Consumer Service) endpoint on the SP - **Audience URI (SP Entity ID)**: Unique identifier for the SP - **Name ID Format**: EmailAddress, Persistent, or Transient - **Attribute Statements**: Map Okta user profile attributes to SAML assertion attributes - **Group Attribute Statements**: Include group membership for RBAC ## Workflow ### Step 1: Create SAML Application in Okta 1. Navigate to Applications > Create App Integration 2. Select SAML 2.0 as the sign-on method 3. Configure General Settings (App Name, Logo) 4. Set Single Sign-On URL (ACS URL) 5. Set Audience URI (SP Entity ID) 6. Configure Name ID Format and Application Username ### Step 2: Configure Attribute Mapping - Map `user.email` to `email` attribute - Map `user.firstName` and `user.lastName` to name attributes - Add group attribute statements for role-based access - Configure attribute value formats (Basic, URI Reference, Unspecified) ### Step 3: Download and Install IdP Metadata - Download Okta IdP metadata XML - Extract IdP SSO URL, IdP Entity ID, and X.509 certificate - Install certificate on SP side for signature validation - Configure SP metadata with ACS URL and Entity ID ### Step 4: Implement SP-Side SAML Processing - Parse and validate SAML Response XML - Verify digital signature using IdP certificate - Check audience restriction, time conditions, and InResponseTo - Extract authenticated user identity and attributes - Create application session based on assertion data ### Step 5: Security Hardening - Enforce SHA-256 for all signature operations - Enable assertion encryption with AES-256-CBC - Configure session timeout and re-authentication policies - Implement SAML artifact binding for sensitive deployments - Set up certificate rotation procedure before expiry ### Step 6: Testing and Validation - Use SAML Tracer browser extension for debugging - Validate SP-initiated and IdP-initiated flows - Test with multiple user accounts and group memberships - Verify SLO functionality - Test certificate rotation without downtime ## Security Controls | Control | NIST 800-53 | Description | |---------|-------------|-------------| | Authentication | IA-2 | Multi-factor authentication through Okta | | Session Management | SC-23 | SAML session lifetime controls | | Audit Logging | AU-3 | Log all SSO authentication events | | Certificate Management | SC-17 | PKI certificate lifecycle management | | Access Enforcement | AC-3 | SAML attribute-based access control | ## Common Pitfalls - Using SHA-1 instead of SHA-256 for SAML signatures - Not validating InResponseTo in SAML responses (replay attacks) - Clock skew between IdP and SP causing assertion rejection - Failing to restrict audience URI allowing assertion forwarding - Not implementing certificate rotation before expiry causes outage ## Verification - [ ] SAML SSO login completes successfully via SP-initiated flow - [ ] IdP-initiated flow correctly authenticates users - [ ] SAML assertions use SHA-256 signatures - [ ] Attribute mapping correctly populates user profile - [ ] Session timeout forces re-authentication - [ ] SLO properly terminates sessions on both IdP and SP - [ ] Certificate rotation tested without service interruption
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.