agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/security/okta/SKILL.md

okta

Skill15 starsChanged 42 days agoMITView on GitHub

Expert Okta identity cloud assistance covering workforce identity, customer identity (CIAM), SAML, and API authorization servers. Use when configuring Okta SSO, managing enterprise directories, or securing APIs.

  • Reads credentials
  • Installs packages

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Custom Authorization Servers for Customer APIs: Keep workforce and customer authentication configurations strictly segregated.

    line 129

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Okta

Okta is the enterprise standard for Identity and Access Management (IAM). While Auth0 (owned by Okta) targets developers/B2C, "Okta Workforce Identity" targets employee access and large B2B integrations.

When to Use

  • Enterprise Workforce Identity: Centralizing employee single sign-on, lifecycle provisioning, and multi-factor authentication.
  • Customer Identity and Access Management (CIAM): Deploying scalable customer authentication backed by Okta Customer Identity Cloud.
  • B2B SAML / WS-Fed Enterprise Federation: Federating customer Active Directory or Okta instances into your SaaS platform.
  • Zero-Trust Network Access & Device Trust: Enforcing device posture checks and context-aware access policies.

Quick Start

npm install @okta/okta-react @okta/okta-auth-js
import { Security, LoginCallback } from "@okta/okta-react";
import { OktaAuth } from "@okta/okta-auth-js";

const oktaAuth = new OktaAuth({
  issuer: "https://{yourOktaDomain}/oauth2/default",
  clientId: "{clientId}",
  redirectUri: window.location.origin + "/login/callback",
});

function App() {
  return (
    <Security oktaAuth={oktaAuth}>
      <Route path="/login/callback" component={LoginCallback} />
      <SecureRoute path="/protected" component={MyProtectedPage} />
    </Security>
  );
}

Core Concepts

Okta Application Models & Sign-On Policies

Applications in Okta represent integration targets with distinct security policies:

[ User Directory (Okta Universal Directory) ]
        ├── [ App: AWS IAM Federation (SAML 2.0) ]
        ├── [ App: Internal Engineering Portal (OIDC + PKCE) ]
        └── [ App: Salesforce (SAML + SCIM Provisioning) ]

Okta JWT Token Verification via Okta JWT Verifier

Validates tokens issued by Okta Authorization Servers:

import OktaJwtVerifier from "@okta/jwt-verifier";

const oktaJwtVerifier = new OktaJwtVerifier({
  issuer: "https://my-company.okta.com/oauth2/default",
  clientId: "0oa1234567890abcdef",
  assertClaims: {
    "groups.includes": "Engineering",
  },
});

export async function verifyOktaToken(authHeader: string) {
  const token = authHeader.replace("Bearer ", "");
  const jwt = await oktaJwtVerifier.verifyAccessToken(token, "api://default");
  return jwt.claims;
}

SCIM 2.0 Automated User Provisioning

Synchronizes user creation, updates, and deprovisioning from Okta to downstream apps automatically:

POST /scim/v2/Users HTTP/1.1
Host: api.mysaas.com
Authorization: Bearer <scim_token>
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "userName": "alice@company.com",
  "name": { "givenName": "Alice", "familyName": "Smith" },
  "active": true
}

Common Patterns

Custom Authorization Server Policy and Scope Enforcement

Problem: Multi-tenant APIs require restricting token issuance to specific organizational scopes and claims.

Solution: Validate custom Okta scopes on inbound API requests:

import { OktaJwtVerifier } from "@okta/jwt-verifier";

const oktaJwtVerifier = new OktaJwtVerifier({
  issuer: "https://mycompany.okta.com/oauth2/default",
  assertClaims: {
    aud: "api://default",
    cid: process.env.OKTA_CLIENT_ID,
  },
});

export async function verifyOktaScope(token: string, requiredScope: string) {
  const jwt = await oktaJwtVerifier.verifyAccessToken(token, "api://default");
  if (!jwt.claims.scp || !jwt.claims.scp.includes(requiredScope)) {
    throw new Error("Insufficient scope privileges");
  }
  return jwt;
}

Best Practices

Do:

  • Use Custom Authorization Servers for Customer APIs: Keep workforce and customer authentication configurations strictly segregated.
  • Implement SCIM Deprovisioning: Ensure deactivated employees in Okta are immediately revoked across all downstream SaaS platforms.
  • Enforce FIDO2 / WebAuthn Factors: Prioritize phishing-resistant Fast IDentity Online (FIDO2) authenticators over SMS OTP.
  • Cache Public Keys (JWKS) Gracefully: Use built-in verifier caching to avoid hitting Okta rate limits on token validation.

Don't:

  • Hardcode API tokens with Super Admin permissions: Create granular service accounts with least-privilege administrative roles.
  • Allow unencrypted HTTP endpoints in Okta App redirect URIs: Enforce HTTPS on all registered redirect destinations.
  • Disable rate limit alerts: Monitor Okta System Log webhooks for security alerts and rate limit warnings.

Troubleshooting

ErrorCauseSolution
403 ForbiddenUser not appointed to App.Assign the User or Group to the Application in Okta Console.
Clock SkewServer time mismatch.Ensure servers utilize NTP; JWT validation allows ~2 min skew.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.