Import from a file

--from config imports a realm from a FerrisKey-native description file. The format is detected from the extension: .yaml, .yml, or .toml. No external system or credentials are involved.

ferris-ctl realm import --from config --file realm.yaml

Preview without writing anything:

ferris-ctl realm import --from config --file realm.yaml --dry-run -o yaml

Format

A description has a name and optional settings, roles, clients, and users sections.

name: acme

settings:
  access_token_lifetime: 300
  refresh_token_lifetime: 1800
  user_registration_enabled: true
  forgot_password_enabled: true

roles:
  - name: admin
    description: Realm administrators
    permissions:
      - realm:manage
  - name: viewer
    description: Read-only access

clients:
  - client_id: web-app
    name: Web Application
    client_type: public
    public_client: true
    redirect_uris:
      - https://app.acme.test/callback
      - https://app.acme.test/*
  - client_id: backend
    name: Backend Service
    client_type: confidential
    service_account_enabled: true
    direct_access_grants_enabled: true
    roles:
      - name: service-reader
        description: Service-scoped read role

users:
  - username: alice
    email: alice@acme.test
    firstname: Alice
    lastname: Doe
    email_verified: true
    roles:
      - admin
  - username: bob
    email: bob@acme.test
    roles:
      - viewer

Settings

All settings are optional; omitted fields keep the FerrisKey default.

FieldDescription
default_signing_algorithmToken signing algorithm
access_token_lifetimeAccess token TTL (seconds)
refresh_token_lifetimeRefresh token TTL (seconds)
id_token_lifetimeID token TTL (seconds)
temporary_token_lifetimeTemporary token TTL (seconds)
user_registration_enabledAllow self-registration
forgot_password_enabledEnable the forgot-password flow
remember_me_enabledEnable “remember me”
magic_link_enabled / magic_link_ttlMagic-link login and its TTL
passkey_enabledEnable passkeys
compass_enabledEnable the Compass module
email_verification_enabledRequire email verification
email_verification_ttl_hoursEmail verification link TTL (hours)

Roles, clients, users

  • roles: name, optional description, optional permissions list.
  • clients: client_id, optional name, client_type (public / confidential / system), public_client, service_account_enabled, direct_access_grants_enabled, protocol, enabled, redirect_uris, and per-client roles.
  • users: username, optional email, firstname, lastname, email_verified, and a roles list referencing realm role names.

Passwords are not in the blueprint

User credentials are never part of an import. Users are created without a password; set one afterward via the admin console or a recovery flow.