Get started
Docs menu

Migrating

Migrating from authentik

On this page

Introduction

When you move from authentik to Signari, people should keep signing in with the password they already have. Applications should keep working, with as few changes as you can manage.

signari import authentik reads a dumpdata export from authentik, and writes it into one Signari organisation. People keep their password hashes, authenticator devices and passkeys. OAuth2 and Security Assertion Markup Language (SAML) applications keep the client IDs and secrets they hold.

You export on the authentik host, then run the import from the command line. It previews by default, and writes only with -apply.

Export and import an installation

Export authentik's models with dumpdata, read its installation ID from its database, then preview the import before you apply it:

Shell# On the authentik host:ak dumpdata authentik_core.user authentik_core.group authentik_core.usergroup \  authentik_core.groupparentagenode authentik_core.source authentik_core.usersourceconnection \  authentik_core.provider authentik_core.application authentik_providers_oauth2.oauth2provider \  authentik_providers_saml.samlprovider authentik_stages_authenticator_totp.totpdevice \  authentik_stages_authenticator_webauthn.webauthndevice > authentik.json# and, in authentik's database, its installation ID:#   SELECT id FROM authentik_install_id ORDER BY id LIMIT 1;# Here — preview first, it writes nothing:signari import authentik -file authentik.json -org <org-uuid> -install-id <id>signari import authentik -file authentik.json -org <org-uuid> -install-id <id> -apply

People sign in with the password they already had, without a reset.

A version of authentik that lacks one of those models keeps its data in an older shape, and dumpdata refuses to name the model. Leave it out of the command. The older shapes are read too: a person's ak_groups list, a group's single parent, and redirect URIs kept as newline-separated text.

The preview is the import itself, run in a transaction that is rolled back. Its report is therefore what the import would do: who already exists, which links resolve, which groups are renamed. It used to count every person as created.

What comes across

Each kind of record in the export becomes something in Signari. In the table below, authenticator apps that show a time-based one-time password (TOTP) are TOTP devices. WebAuthn devices are passkeys and security keys. An authentik "provider" becomes an application here. A "source" is an identity provider that people signed in through, and a link to one becomes a link to a provider registered here:

In authentikHere
UsersPeople, with their password hash, display name and UUID (see below). Inactive users are skipped. Service accounts are skipped, since they sign in with tokens, and outpost accounts are left behind as authentik's own
Groups and who is in themGroups. A name becomes a name such as Domain Admins → Domain-Admins, and each rename is listed. Groups here do not nest, so the members of a group are also made members of every group above it, as authentik counts them
TOTP devicesThe same seed, digits and period, HMAC-SHA1 as authentik uses, with the last step used, sealed under the person's key. One per person; an unconfirmed device is left behind. Needs SIGNARI_ROOT_KEY
WebAuthn devicesSaved under the relying party ID each was registered with, each key checked as a COSE key. Needs -install-id (see below) and a deployment that serves the same relying party ID
Links to a sourceKept, where a provider with the same slug as the source is registered here first. A person whose only way in is such a link is imported with no password
AttributesWritten where the organisation declares an attribute of that name, when the value is text
OAuth2 providersClients with the client ID and secret they hold, named after their application, with the grants Signari implements, the strict redirect URIs and the post-logout ones
SAML providersService providers, keyed by the audience, with the HTTPS ACS URL, the NameID format and each person's persistent NameID (see below)

Everything else is named in the report under not carried, with the reason. That includes:

  • A group's superuser flag and attributes.
  • Links to sources not registered here.
  • Attributes nobody declared.
  • Property mappings.
  • The implicit, hybrid and password grants.
  • Regular-expression redirect URIs, the URIs people return to after signing out, and SAML signing settings.
  • Providers of other kinds.

Every record of a model the import does not read is counted by model.

A SAML provider is skipped and named when it states no audience, because the audience is the entity ID that a request is matched by. It is also skipped when a property mapping makes its NameID, or when its NameID comes from a directory attribute. Brought across with another NameID, every account at the SAML application would be keyed on a subject it has never seen.

The whole file is read before any person's groups are resolved, because records reference each other by primary key, in no particular order.

What applications know people by

An application keys its accounts on what the provider sends it. If that value changes at cutover, the application treats every person as a new account. Three such values come across:

  • The subject. An account here sends its ID as sub, and an imported person is given their authentik UUID as that ID. A provider whose subject mode is user_uuid therefore keeps sending the same subject. authentik's default mode, hashed_user_id, cannot be sent from here. Nor can the modes based on the username, email or UPN, a Windows domain sign-in name. The report names each client that used one of them. The application can then be re-keyed or re-linked before cutover.
  • The passkey's handle. authentik registers every passkey under a handle (userHandle) it derives from the person's ID and its installation ID. Both kinds of sign-in refuse a passkey whose handle is not the account's. With -install-id, an imported person is given that handle. Without it, their passkeys are left behind and named, since sign-in would refuse them.
  • The persistent NameID. authentik makes this from the same value. So with -install-id, each person's NameID is kept for every SAML application that is sent persistent NameIDs. Without it, the report says so for each provider.

Each of these is kept only when nobody here holds it. A person already here, matched by address, keeps the ID they have. They take the handle only if none of their passkeys here was registered under the handle they have. The report names every person whose subject, handle or NameID could not be kept.

authentik can serve several organisations, which it calls "tenants". With them enabled, a non-default one derives these values from its own ID, not from the installation ID. Pass that ID instead.

A provider with no signing key signs its ID tokens with HS256, under the client secret. Here they are signed with ES256, and published at the JSON Web Key Set (JWKS) URI. The report names each such client, because its application must accept that.

Why the passwords come across

authentik is a Django application, and its settings do not set PASSWORD_HASHERS. So Django's defaults apply. The first of those, the one used whenever a password is set, is PBKDF2PasswordHasher. It hashes with Password-Based Key Derivation Function 2 (PBKDF2), and stores this format:

Textpbkdf2_sha256$<iterations>$<salt>$<base64 hash>

internal/passwords has verified that format from the beginning, because it is common to a great deal of Python software. So an imported person's password verifies as it is on their first sign-in. It is replaced with Argon2id in the same transaction, so the foreign hash is kept only until that first sign-in.

Why a dumpdata file and not the API

authentik's REST API never returns password hashes, because Django does not expose them. dumpdata is Django's own documented management command, and the portable export that does include them.

The census comes first

Before its totals, the import's report prints a census of the password formats it found, and names each person it skipped:

Text  password formats found    pbkdf2_sha256, Django default (verifiable)     3    unusable (federated or never set)              1  users:   2 created, 0 updated, 2 skipped  ...  skipped user:   gone@authentik.test (inactive in authentik)  skipped user:   sso@authentik.test (password format "unusable (federated or    never set)" cannot be verified here, and no link to a source registered    here; they must use recovery or delegated sign-in)

The census shows how many people can sign in with the password they have, which decides whether a cutover needs a password reset. So it prints before the totals.

Whether a format is verifiable comes from passwords.CanVerify, not from a second list in the importer. A first version kept its own prefixes and got one wrong. It tested for argon2 where the stored form is $argon2id$, so an importable hash was reported as unrecognised.

"Verifiable" also means affordable. A hash whose own parameters cost more than sign-in will spend is skipped and named, with the parameter that is too high:

  • More than 10 million PBKDF2 iterations.
  • 2^20 phpass or Drupal 7 rounds.
  • A bcrypt cost of 15.
  • A million SHA-crypt rounds.
  • An Argon2id or scrypt hash needing more memory than the 512 MiB the process allows for all verifications together.
  • An imported scrypt hash needing more than 256 MiB.

Sign-in refuses the same hash, before doing any work, through the same check. The importer used to ask only whether the format was known. So such an account was imported, and then refused at every attempt.

What is deliberately not imported

Some records are left out on purpose:

  • Inactive people, named in the skip list. Importing them as active would re-enable accounts that were turned off.

  • People with no usable password (!, Django's marker for federated-only accounts) and no link to a source registered here. They are named, rather than imported without a credential as accounts that cannot be signed in to.

  • The rest of authentik's own model: tokens, flows, stages, policies and the like. Their records are counted in the report by model.

  • is_superuser on a group. Groups come across, and the flag does not, because there is nothing here for it to mean. Signari has no group-conferred superuser. Capabilities attach to a group individually (see 0070_impersonation.sql: "A capability on a group rather than a role system"). So there is no single switch that reproduces what authentik's flag did.

    Dropping it fails closed. A group of authentik administrators arrives as an ordinary group, and nobody gains privilege by being migrated. So after a migration, nobody is an administrator by virtue of their old group membership. Grant whatever capabilities those groups need before you decommission the authentik instance. Otherwise you would have to go back to it to find out what they were.

Migration state

Imported people land as migration_state = 'pending', with is_current = false on the credential. That is what routes them through the migration path, rather than treating a Django hash as a current one.

When the rehash happens at a person's first sign-in, migration_state becomes complete and migrated_at is stamped. A person who never signs in stays pending, with the Django hash.

migration_source_id stays NULL, because there was no delegated source: the hash came across in an export.

Other versions of authentik

The importer reads authentik's models as they were in its source when the importer was written. It has not yet been run against an export from a live authentik deployment.

A version that renames a field will show people in the skip list, rather than importing them without a credential. A record that does not parse is counted in the report. The preview prints what the import would do and writes nothing, so run it without -apply first.

Issuer aliasing, for the applications you cannot reconfigure

An application verifies the iss claim it was configured with. Pointing DNS at Signari changes that string, and every such application breaks at once.

A client can instead carry an issuer alias: a legacy issuer this deployment also claims. Its tokens are minted under that old value, rather than under the deployment's own issuer. So the application moves with a Domain Name System (DNS) change, instead of a code change.

Signari's own userinfo and introspection accept both. A database trigger validates the alias at write time against the instance's registered aliases. So a value that reaches the token path is one this deployment has registered.

Register the old issuer as an alias, pin the application's client to it, list the aliases, and retire one when the move is done:

Shellsignari instance add-alias -alias https://auth.example.com/application/o/wiki -retire-after 2026-12-31signari client set-issuer-alias -client-id wiki -alias https://auth.example.com/application/o/wikisignari instance aliasessignari instance retire-alias -alias https://auth.example.com/application/o/wiki

It is for cutover, not for serving several organisations permanently, so give an alias a -retire-after. Aliases are read per request. One registered is accepted from the next request. One past its retirement is refused from the next, and pinned clients are minted under the deployment's own issuer from then on.

Changed Signari v0.2