Saltar al contenido principal

Migrate from Okta

Move the users, groups and OpenID Connect (OIDC) applications of an Okta org into a Casdoor organization with the Okta Migration action from the Marketplace.


Resultados del aprendizaje​

  • Give Casdoor read access to the Okta org.
  • Previsualice y aplique la migración.
  • Switch the applications from Okta to Casdoor while the users keep their passwords.

Requisitos​

  • An admin account of the Casdoor organization that the Okta org goes to. It can't be built-in.
  • An Okta admin account that can create API tokens. A super admin's token also returns the client secrets of the applications.

About the Okta migration​

The action reads the org through the Okta API with an API token, and sends requests only to the org's domain.

OktaCasdoor
UserA user. The Casdoor user ID is the Okta user ID, such as 00u1a2b3c4…, so the sub claim stays the same. The user name is the Okta login, which is often the email. Name, email, phone, title and organization go into the matching fields, and the other profile attributes into properties. Suspended users are imported as forbidden.
PasswordChecked with Okta on the user's first sign-in. See Passwords.
GroupA group with the same members. The Everyone group is skipped.
OIDC applicationAn application with the same client ID, client secret, redirect URIs and grant types, and the JWT-Standard token format. The Okta Admin Console and the Okta Dashboard are skipped.

Contraseñas​

Okta never exports password hashes. Instead, Casdoor saves these users with a password that the action checks:

  1. The first time a user signs in to Casdoor, the action sends the user name and password to the Okta authentication API, POST /api/v1/authn on the org's domain.
  2. If Okta accepts the password, the user is signed in, and Casdoor saves the password with the password type of the organization. Okta is not asked again for this user.
  3. If Okta rejects it, the sign-in fails as with any wrong password.

This works for users with an Okta password and for users whom Okta signs in through Active Directory or LDAP. A user who has to complete MFA in Okta still passes, because the password is correct. Casdoor asks for its own MFA once the user has set it up.

precaución

Keep the Okta org running and don't delete the migration in Casdoor until your users have signed in to Casdoor once. Casdoor finds the Okta domain in the migration. After Okta is shut down, the users who haven't signed in yet reset their password in Casdoor.

Users who never activated their Okta account, and users who sign in to Okta only through an identity provider, have no Okta password. The report counts them.

Create an API token in Okta​

  1. In the Okta Admin Console, go to Security > API and open the Tokens tab.
  2. Click Create token, enter a name such as casdoor-migration, and click Create token.
  3. Copy the token value. Okta shows it only once.

The token acts with the permissions of the admin who created it. To import the client secrets of the applications, create it as a super admin. Revoke the token after the migration.

Instalar la acción​

  1. En la consola de administración de Casdoor, vaya a Identity > Marketplace.
  2. Search for Okta Migration and click Install.
  3. Choose the organization that the Okta org goes to, and click Install.

Crear la migración​

  1. Vaya a Admin > Migrations y haga clic en Add.

  2. Establece estos campos:

    CampoValue
    OrganizationLa organización en la que instalaste la acción.
    NameA name, such as okta.
    ActionOkta Migration.
    HostThe domain of the Okta org, such as your-org.okta.com.
    Client secretThe API token.

    Leave Client ID and Files empty.

  3. Haga clic en Test connection.

    An error in the Report says what Okta returned, such as HTTP 401 for a wrong or revoked token.

Previsualizar y aplicar​

  1. Haga clic en Preview y espere hasta que el Report muestre Previewed.
  2. Revise los números y las Warnings. Advertencias comunes:
    • The applications that are not OIDC applications, such as SAML applications. Add them to Casdoor yourself.
    • Applications whose client secret Okta didn't return. Casdoor gives them new secrets: update them in the applications, or create the token as a super admin and preview again.
    • Users who sign in to Okta through an identity provider. Add the provider to the Casdoor applications.
  3. Haga clic en Apply y confirme.

An AI agent connected to the Casdoor MCP server can do the same with plan_migration and apply_migration. See Migration tools.

Cambiar las aplicaciones​

  1. In each application, replace the Okta issuer, such as https://your-org.okta.com/oauth2/default, with your Casdoor address, or set the discovery URL to https://<your-casdoor-host>/.well-known/openid-configuration. Keep the client ID and client secret. See Standard OIDC client.
  2. In the APIs that check access tokens, replace Okta's issuer and JSON Web Key Set (JWKS) URL with Casdoor's.
  3. Si sus aplicaciones leen reclamaciones que un servidor de autorización de Okta añade, como groups, añádalas en Casdoor con un flujo que se ejecute antes de emitir un token, o con los atributos del token de la aplicación.

Justo antes del cambio, haga clic en Apply nuevamente para traer a los usuarios que fueron añadidos en Okta desde la última ejecución.

Verificar el resultado​

  1. Inicie sesión en una de las aplicaciones con el inicio de sesión y la contraseña de Okta de un usuario migrado.
  2. En el token de identificación (ID token), verifique que sub sea el ID de usuario de Okta del usuario.
  3. Vaya a User Management > Users, abra al usuario y verifique que el tipo de contraseña cambió de plugin:okta-migration al tipo de contraseña de la organización.

Qué no se importa​

  • Las claves de firma. Okta no las exporta, por lo que los tokens emitidos por Okta no son válidos en Casdoor, y los usuarios vuelven a iniciar sesión después del cambio.
  • Factores de MFA. Los usuarios que usan MFA deben registrarse nuevamente.
  • Roles de administrador, servidores de autorización, políticas y qué grupos tienen acceso a qué aplicaciones.
  • Aplicaciones distintas de OIDC, como aplicaciones SAML y de marcadores (bookmark).
  • Usuarios desactivados.

Véase también​