Skip to content

✨ darkone.service.idm

Kanidm (identity manager) DNF Service.

Online backup: one dump per night, 7 kept in /var/lib/kanidm/backups (services.kanidm.server.settings.online_backup). Restorable only by the same kanidm minor version: an upgrade still needs a cold copy.

Sub-modules (idm/):

  • replication.nix: multi-zone read-only replication, HCS to zone gateways;
  • provision.nix: OAuth2 clients (template registry), groups and persons.

Automatic, derived from where idm is declared:

  • idm on the HCS only, or on a gateway without HCS: one instance;
  • on the HCS and >= 1 zone gateway: the HCS supplies (WriteReplica), each idm gateway consumes.

Two-step bootstrap: just apply generates every replication certificate (gateways stay WriteReplicaNoUI), then just idm-sync-certs + just apply adds the partners and flips the gateways to ReadOnlyReplica.

Every OIDC-capable service module contributes a client template to darkone.service.idm.oauth2; one client is provisioned per (template, instance), merged by clientId across zones. Never on a replication consumer: it mirrors the HCS.

  • enable bool Enable local SSO with Kanidm
darkone.service.idm.enable = false;
  • oauth2 attrs OAuth2/OIDC client templates contributed by service modules. Kanidm provisions one client per matching entry in network.services, with clientId = dnfLib.oauth2ClientName.
    • enable bool Whether to provision OAuth2 clients for this template.
    • clientName nullOr str Override the kanidm client name. Defaults to dnfLib.oauth2ClientName.
    • displayName str Human-readable name shown on the kanidm consent screen.
    • imageFile path Application icon. Re-uploaded on every kanidm-provision run.
    • redirectPaths listOf str OAuth2 redirect paths (one per accepted callback URL).
    • landingPath str Auto-connect entry point path on the service.
    • enableLegacyCrypto bool Allow legacy JWT signing algorithms (eg. RS256).
    • allowInsecureClientDisablePkce bool Disable PKCE on the client (only for clients that do not implement it).
    • preferShortUsername nullOr bool Use the short username (no domain) in the preferred_username claim.
    • extra attrs Extra attributes merged into the provisioned client (claimMaps, etc).
darkone.service.idm = {
oauth2.enable = true;
oauth2.clientName = null;
oauth2.displayName = null;
oauth2.imageFile = null;
oauth2.redirectPaths = [ ];
oauth2.landingPath = "/";
oauth2.enableLegacyCrypto = false;
oauth2.allowInsecureClientDisablePkce = false;
oauth2.preferShortUsername = null;
oauth2.extra = { };
};
  • replication raw Replication facts of this node.
darkone.service.idm.replication = { inherit isMainReplica isReplConsumer; };

Source: modules/service/idm.nix 🡕