Okta Golang Management SDK

repository·master·Indexed 42 days ago

https://github.com/okta/okta-sdk-golang

A server-side Go SDK for interacting with the Okta management API. It provides programmatic access to manage users, groups, applications, security factors, API tokens, and authorization servers, including specific APIs for application lifecycle management, SSO SAML metadata, and OAuth 2.0 credentials.

Tokens
425.9K
Snippets
905
Records
1K
Agent score
52%

What's inside Okta

  1. Overview of AuthenticatorAPI

    master
    The AuthenticatorAPI provides methods to manage Okta authenticators and their associated methods or custom AAGUIDs. Operations include creating, retrieving, activating, deactivating, replacing, and deleting authenticators, as well as managing specific authenticator methods and custom AAGUIDs.
  2. Overview of SubscriptionAPI

    master

    The SubscriptionAPI allows you to manage subscriptions for roles and users. You can retrieve specific subscriptions, list all subscriptions for a given entity, subscribe to specific notification types, or unsubscribe from them. All requests are relative to your Okta subdomain.

    ### Available Methods
    
    | Method | HTTP request | Description |
    | ------------- | ------------- | ------------- |
    | **GetSubscriptionsNotificationTypeRole** | **Get** /api/v1/roles/{roleRef}/subscriptions/{notificationType} | Retrieve a subscription for a role |
    | **GetSubscriptionsNotificationTypeUser** | **Get** /api/v1/users/{userId}/subscriptions/{notificationType} | Retrieve a subscription for a user |
    | **ListSubscriptionsRole** | **Get** /api/v1/roles/{roleRef}/subscriptions | List all subscriptions for a role |
    | **ListSubscriptionsUser** | **Get** /api/v1/users/{userId}/subscriptions | List all subscriptions for a user |
    | **SubscribeByNotificationTypeRole** | **Post** /api/v1/roles/{roleRef}/subscriptions/{notificationType}/subscribe | Subscribe a role to a specific notification type |
    | **SubscribeByNotificationTypeUser** | **Post** /api/v1/users/{userId}/subscriptions/{notificationType}/subscribe | Subscribe a user to a specific notification type |
    | **UnsubscribeByNotificationTypeRole** | **Post** /api/v1/roles/{roleRef}/subscriptions/{notificationType}/unsubscribe | Unsubscribe a role from a specific notification type |
    | **UnsubscribeByNotificationTypeUser** | **Post** /api/v1/users/{userId}/subscriptions/{notificationType}/unsubscribe | Unsubscribe a user from a specific notification type |
  3. Manage User Factors with UserFactorAPI

    master

    The UserFactorAPI provides methods to manage multi-factor authentication (MFA) factors for Okta users. You can enroll, activate, retrieve, list, verify, and unenroll factors. All requests are relative to your Okta organization's base URL.

    | Method | HTTP request | Description |
    ------------- | ------------- | -------------
    | **ActivateFactor** | **Post** /api/v1/users/{userId}/factors/{factorId}/lifecycle/activate | Activate a factor |
    | **EnrollFactor** | **Post** /api/v1/users/{userId}/factors | Enroll a factor |
    | **GetFactor** | **Get** /api/v1/users/{userId}/factors/{factorId} | Retrieve a factor |
    | **GetFactorTransactionStatus** | **Get** /api/v1/users/{userId}/factors/{factorId}/transactions/{transactionId} | Retrieve a factor transaction status |
    | **GetYubikeyOtpTokenById** | **Get** /api/v1/org/factors/yubikey_token/tokens/{tokenId} | Retrieve a YubiKey OTP token |
    | **ListFactors** | **Get** /api/v1/users/{userId}/factors | List all enrolled factors |
    | **ListSupportedFactors** | **Get** /api/v1/users/{userId}/factors/catalog | List all supported factors |
    | **ListSupportedSecurityQuestions** | **Get** /api/v1/users/{userId}/factors/questions | List all supported security questions |
    | **ListYubikeyOtpTokens** | **Get** /api/v1/org/factors/yubikey_token/tokens | List all YubiKey OTP tokens |
    | **ResendEnrollFactor** | **Post** /api/v1/users/{userId}/factors/{factorId}/resend | Resend a factor enrollment |
    | **UnenrollFactor** | **Delete** /api/v1/users/{userId}/factors/{factorId} | Unenroll a factor |
    | **UploadYubikeyOtpTokenSeed** | **Post** /api/v1/org/factors/yubikey_token/tokens | Upload a YubiKey OTP seed |
    | **VerifyFactor** | **Post** /api/v1/users/{userId}/factors/{factorId}/verify | Verify a factor |
  4. Manage Log Streams with LogStreamAPI

    master
    The LogStreamAPI provides methods to manage Okta log streams, including creating, retrieving, deleting, and controlling the lifecycle (activating/deactivating) of streams. All requests require authorization via apiToken or oauth2 and are relative to your Okta subdomain.
  5. Manage Authorization Servers with AuthorizationServerAPI

    master

    The AuthorizationServerAPI provides methods to manage Okta Authorization Servers. You can create, retrieve, list, activate, deactivate, delete, and replace authorization servers. All requests are relative to your Okta subdomain.

    // Available methods in AuthorizationServerAPI:
    // - ActivateAuthorizationServer
    // - CreateAuthorizationServer
    // - DeactivateAuthorizationServer
    // - DeleteAuthorizationServer
    // - GetAuthorizationServer
    // - ListAuthorizationServers
    // - ReplaceAuthorizationServer
  6. Manage Realm Assignments with RealmAssignmentAPI

    master

    The RealmAssignmentAPI provides methods to manage realm assignments in Okta. You can create, retrieve, list, execute, activate, deactivate, delete, or replace realm assignments. All requests require a valid context.Context and appropriate authorization (API Token or OAuth2).

    // Summary of available methods:
    // - ActivateRealmAssignment(ctx, assignmentId)
    // - CreateRealmAssignment(ctx).Body(body)
    // - DeactivateRealmAssignment(ctx, assignmentId)
    // - DeleteRealmAssignment(ctx, assignmentId)
    // - ExecuteRealmAssignment(ctx).Body(body)
    // - GetRealmAssignment(ctx, assignmentId)
    // - ListRealmAssignmentOperations(ctx)
    // - ListRealmAssignments(ctx)
    // - ReplaceRealmAssignment(ctx, assignmentId).Body(body)
  7. Manage Groups with GroupAPI

    master

    The GroupAPI provides methods to manage Okta groups, including creating, deleting, retrieving, and listing groups, as well as managing group memberships and assigned applications. All requests are relative to https://subdomain.okta.com and require authorization via apiToken or oauth2.

    // Available methods in GroupAPI:
    // AddGroup(ctx).Group(group).Execute()
    // AssignUserToGroup(ctx, groupId, userId).Execute()
    // DeleteGroup(ctx, groupId).Execute()
    // GetGroup(ctx, groupId).Execute()
    // ListAssignedApplicationsForGroup(ctx, groupId).After(after).Limit(limit).Execute()
    // ListGroupUsers(ctx, groupId).Execute()
    // ListGroups(ctx).Execute()
    // ReplaceGroup(ctx, groupId).Group(group).Execute()
    // UnassignUserFromGroup(ctx, groupId, userId).Execute()
  8. Manage API Service Integration Instances

    master

    The ApiServiceIntegrationsAPI provides methods to manage API service integration instances and their associated secrets. This includes creating, retrieving, deleting, and listing instances, as well as managing the lifecycle of secrets (creating, activating, deactivating, and deleting) within those instances.

    Available operations:

    • CreateApiServiceIntegrationInstance: Create a new instance.
    • GetApiServiceIntegrationInstance: Retrieve a specific instance.
    • DeleteApiServiceIntegrationInstance: Delete an instance.
    • ListApiServiceIntegrationInstances: List all instances.
    • CreateApiServiceIntegrationInstanceSecret: Create a secret for an instance.
    • ActivateApiServiceIntegrationInstanceSecret: Activate a secret.
    • DeactivateApiServiceIntegrationInstanceSecret: Deactivate a secret.
    • DeleteApiServiceIntegrationInstanceSecret: Delete a secret.
    • ListApiServiceIntegrationInstanceSecrets: List secrets for an instance.
  9. Manage Custom Pages with CustomPagesAPI

    master

    The CustomPagesAPI allows you to manage customized and preview versions of Okta pages, including error pages, sign-in pages, and sign-out settings for specific brands.

    Available operations include:

    • Delete: DeleteCustomizedErrorPage, DeleteCustomizedSignInPage, DeletePreviewErrorPage, DeletePreviewSignInPage.
    • Get: GetCustomizedErrorPage, GetCustomizedSignInPage, GetDefaultErrorPage, GetDefaultSignInPage, GetErrorPage, GetPreviewErrorPage, GetPreviewSignInPage, GetSignInPage, GetSignOutPageSettings, ListAllSignInWidgetVersions.
    • Replace: ReplaceCustomizedErrorPage, ReplaceCustomizedSignInPage, ReplacePreviewErrorPage, ReplacePreviewSignInPage, ReplaceSignOutPageSettings.
  10. Manage Application Provisioning Connections via ApplicationConnectionsAPI

    master
    The ApplicationConnectionsAPI allows you to manage the default provisioning connection for an Okta application. This includes activating, deactivating, retrieving, updating, and verifying connections, as well as retrieving JWKS for the connection. All requests are relative to your Okta subdomain.