provision command group¶
The provision command group bootstraps tenant services in {{ product_name }}. Its dss subcommand provisions one of a tenant's DSS (eIDAS) signing service instances in one step. A tenant may run several DSS instances (for example an EU and a CH signer), each identified by a --name that is unique per tenant and defaults to dss. The number of instances a tenant may hold is capped by the dss.quota license (assigned separately with tenant license assign; a tenant with no dss.quota claim may hold one instance). Provisioning assigns the dss feature license (idempotent — shared across all the tenant's instances), records the per-instance key-profile quota and the HSM user-partition the tenant will generate keys on, creates the DSS bootstrap record, and returns a one-time bootstrap shared secret the dss-proxy presents on first contact.
Its hsm subcommand group manages the global DSS HSM partition registry — the catalog of deployed Securosys Primus HSM user-partitions the DSS signer uses (Primus is the only supported HSM here because it provides SKA, authorization keys linked to signing keys). A partition holds SKA keys shared by many tenants. provision dss --hsm-partition-user must reference a partition that already exists in this registry.
Remote command — host profile and login required
alpine-admin-cli is a remote gRPC client. Every provision subcommand contacts the server, so you must first create a host profile with profile hosts create and authenticate with profile authn login. Select a non-default profile for a single invocation with the global -p/--profile option placed before the command path.
The bootstrap secret is shown only once
The shared secret is generated by the server and returned in the command reply once; only a hash is stored. Capture it — together with the returned module_uuid — when you run provision dss. If it is lost, regenerate it with provision dss reset-key --module-uuid <module_uuid> — the old secret stops working.
Commands in this group¶
| Command | Purpose | Anchor |
|---|---|---|
provision dss |
Provision a tenant's DSS signing service | #provision-dss |
provision dss reset-key |
Regenerate a tenant's DSS bootstrap secret | #provision-dss-reset-key |
provision hsm create |
Register a Securosys Primus HSM partition | #provision-hsm-create |
provision hsm update |
Update a registered HSM partition | #provision-hsm-update |
provision hsm delete |
Delete an HSM partition (if unused by any DSS) | #provision-hsm-delete |
provision hsm list |
Search the HSM partition registry | #provision-hsm-list |
provision hsm backup |
Back up one HSM partition (incl. secrets) to a file | #provision-hsm-backup |
provision hsm restore |
Restore an HSM partition from a backup file | #provision-hsm-restore |
Typical workflow¶
- Register the deployed Securosys Primus partition once with
provision hsm create(find existing ones withprovision hsm list). - Find the tenant UUID with
tenant search. - If the tenant needs more than one DSS instance, entitle the instance cap first with
tenant license assign -n dss.quota -V <n>(a tenant with nodss.quotaclaim may hold one instance). - Provision each DSS instance with
provision dss, giving it a--name(unique per tenant; defaults todss), a per-instance key-profile quota, and the registered HSM user-partition. - Record the one-time bootstrap secret and the
module_uuidfrom each reply and hand them to that instance's dss-proxy deployment. - Confirm the entitlements with
tenant license list. - If an instance's secret is ever lost, regenerate it with
provision dss reset-key --module-uuid <module_uuid>.
Group help¶
provision dss¶
Provision one of a tenant's DSS (eIDAS) signing service instances. The command assigns the dss feature license (idempotent across the tenant's instances), enforces the tenant's dss.quota instance cap, and creates a named DSS service-module instance (the anchor to which JWT signing keys are later bound at onboarding) plus the t_dss bootstrap record — storing a hash of a server-generated one-time secret, the per-instance key-profile quota, and the HSM user-partition — linked to that instance. It returns the plaintext secret once, along with the module instance UUID (module_uuid) you use to reference this instance later. The active-signing-keys table starts empty; the dss-proxy registers keys as it generates them.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-u, --uuid |
UUID of the tenant |
-k, --dss-key-profile |
Per-instance key-profile quota: a positive integer (1..n) |
-P, --hsm-partition-user |
HSM user-partition the tenant generates signing keys on |
Optional options¶
Show optional options
| Option | Default | Description |
|---|---|---|
-n, --name |
dss |
DSS instance name, unique per tenant (lets a tenant run several DSS instances) |
-f, --out-format |
YAML |
Output format: JSON or YAML |
Validation rules
--dss-key-profilemust be a positive integer (1..n); it is stored per instance on the DSS record.--namemust be unique per tenant. Provisioning a second instance with a name that already exists is rejected withA DSS instance named '<name>' already exists for tenant '<tenant>'.--hsm-partition-usermust not be blank and must match apartition_useralready registered withprovision hsm create(enforced by a foreign key ont_dss). Provisioning with an unregistered partition is rejected withUnknown HSM partition '<user>'.- The tenant's
dss.quotalicense caps how many DSS instances it may hold (default 1 when nodss.quotaclaim is assigned). Exceeding it is rejected withDSS instance quota exceeded. Raise it withtenant license assign -n dss.quota -V <n>.
Example¶
# second instance for a tenant already entitled to dss.quota >= 2
bin/admin.sh provision dss \
-u 6f1d2c3b-4a5e-6789-0abc-def012345678 \
-n dss-eu \
-k 3 \
-P crypto-user-1 \
-f json
provision dss reset-key¶
Regenerate the bootstrap shared secret of one specific DSS instance, selected by its --module-uuid (the module_uuid returned by provision dss). Because a tenant may run several DSS instances, the module uuid identifies which one to reset — resetting is not tenant-wide. A fresh secret is generated, its hash replaces that instance's stored one, and the used date is cleared so that instance's dss-proxy can onboard again. The reply returns the new secret once, together with the instance identity (tenant, module and dss uuids, the instance name and its HSM user-partition) so you can reconfigure the right proxy.
reset-key also revokes the instance's current authentication key
Resetting an instance revokes its currently registered proxy authentication key — the proxy must re-onboard with a fresh key, and the old key can no longer authenticate signing calls. reset-key therefore doubles as the per-instance key-revocation path when a proxy key is lost or feared compromised (a self-service key rollover requires signing with the current key, so it cannot recover a lost one). Revocation is durable but not instantaneous: the signing authenticator caches verifying material for a few seconds per backend process.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-u, --uuid |
UUID of the tenant |
-m, --module-uuid |
UUID of the DSS service-module instance to reset (from provision dss) |
Optional options¶
Show optional options
| Option | Default | Description |
|---|---|---|
-f, --out-format |
YAML |
Output format: JSON or YAML |
Validation rules
--module-uuidmust not be blank.- The tenant must already have that DSS instance provisioned; otherwise the reset is rejected with
No DSS instance '<module_uuid>' provisioned for tenant '<tenant>'.
Example¶
bin/admin.sh provision dss reset-key \
-u 6f1d2c3b-4a5e-6789-0abc-def012345678 \
-m mod-019f1c... \
-f json
provision hsm create¶
Register a deployed Securosys Primus HSM user-partition in the global DSS partition registry. The --partition-user is the unique SKA crypto user a tenant DSS later references via provision dss --hsm-partition-user. You must supply the partition's Primus host(s) with -H/--host (at least one, repeatable) — they are the endpoints the signer connects to. Proxy credentials, the validation cron and the HSM integrity key are optional; when the cron is omitted the server applies its default schedule.
The PIN is verified against the HSM before it is stored
Before persisting the partition, the server logs in to it with the supplied --partition-pin (over the given host(s), using the proxy credentials if provided) to prove the PIN is correct. A wrong PIN, an unreachable HSM, or an admin service that has no hsm pool configured all fail closed — the partition is not registered. This means the partition must be reachable from the admin service at registration time, and the admin service must be configured with an hsm block (see Deployment).
One-time setup PIN is converted to the permanent user secret
Securosys issues a freshly created partition a one-time setup PIN, printed as five dash-separated groups of five characters (for example nP3UL-gRQHh-DwxUY-8GKxp-yqdrZ). When the value you pass to --partition-pin is in that setup-PIN format, the verifying login derives the partition's permanent user secret and stores that instead — the one-time setup PIN is never persisted. Supply an already-permanent PIN and it is stored unchanged (after the same verifying login). Either way, subsequent logins use the stored permanent secret.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-N, --name |
Partition display name |
-P, --partition-user |
Unique HSM SKA crypto user (partition user) |
--partition-pin |
Partition PIN (a one-time setup PIN or a permanent user secret) |
-H, --host |
Primus host as host:port[:weight] — at least one required, repeatable (weight defaults to 100) |
Optional options¶
Show optional options
| Option | Default | Description |
|---|---|---|
--proxy-user |
— | Proxy user |
--proxy-pin |
— | Proxy PIN |
-c, --validation-cron |
server default | Validation cron schedule |
--integrity-key |
— | HSM integrity-key alias that signs the timestamp of SKA sign authorizations |
--integrity-algorithm |
server default | Integrity-key signature algorithm (for example SHA256withECDSA) |
-f, --out-format |
YAML |
Output format: JSON or YAML |
Validation rules
--name,--partition-userand--partition-pinmust not be blank and each must be at most 255 characters.- At least one
--hostis required (a partition with no hosts is unusable); each host's port must be1..65535and an omitted weight defaults to100. --partition-useris unique; registering a partition whose user already exists is rejected.- The supplied PIN is verified by a login to the partition; a wrong PIN or unreachable HSM is rejected and nothing is stored.
- The reply never includes the PIN fields (nor the derived permanent user secret).
Example¶
bin/admin.sh provision hsm create \
-N "primus-zrh-1" \
-P crypto-user-1 \
--partition-pin "nP3UL-gRQHh-DwxUY-8GKxp-yqdrZ" \
-H primus-a.example.internal:2300 \
-H primus-b.example.internal:2300:50 \
--integrity-key dss-integrity \
--integrity-algorithm SHA256withECDSA \
-f json
provision hsm update¶
Update a registered HSM partition, selected by its immutable --partition-user. Only the fields you supply change; the --partition-user itself cannot be changed. Hosts and the integrity key are not updatable here — re-register (or restore) the partition to change those.
Changing the PIN re-verifies it against the HSM
When you supply --partition-pin, the new PIN is verified by a login to the partition (using the partition's stored hosts and its effective proxy credentials — a proxy credential changed in the same update takes precedence) before it is persisted, and a one-time setup PIN is converted to the permanent user secret, exactly as for create. An update that does not change the PIN performs no HSM login.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-P, --partition-user |
Partition user selecting the partition to update |
Optional options¶
Show optional options
| Option | Default | Description |
|---|---|---|
-N, --name |
— | New display name |
--partition-pin |
— | New partition PIN |
--proxy-user |
— | New proxy user |
--proxy-pin |
— | New proxy PIN |
-c, --validation-cron |
— | New validation cron |
-f, --out-format |
YAML |
Output format: JSON or YAML |
Validation rules
- At least one mutable field must be supplied, otherwise the command fails before contacting the server.
- An unknown
--partition-useris rejected withUnknown HSM partition '<user>'.
Example¶
provision hsm delete¶
Delete a registered HSM partition by --partition-user. The shared registry is only affected by this command — deleting a tenant DSS leaves its partition in place. A partition that is still referenced by any tenant DSS cannot be deleted.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-P, --partition-user |
Partition user selecting the partition to delete |
Optional options¶
Show optional options
| Option | Default | Description |
|---|---|---|
-f, --out-format |
YAML |
Output format: JSON or YAML |
Validation rules
- The partition must exist; otherwise the delete is rejected.
- If any tenant DSS still references the partition, the delete is rejected with
HSM partition '<user>' is in use by a tenant DSS(thet_dssforeign key isON DELETE RESTRICT).
Example¶
provision hsm list¶
Search the DSS HSM partition registry. Supports a search term (-q), search mode (-m), and pagination (-n/-s) via the shared query options. The secret PIN fields are never returned by the search.
Syntax¶
Optional options¶
Show optional options
| Option | Default | Description |
|---|---|---|
-q, --query |
(all) | Search term matched against uuid, name and partition user |
-m, --query-mode |
ILIKE |
Search mode: ILIKE, PLAIN or WEB |
-n, --page-number |
1 |
Page number |
-s, --page-size |
25 |
Page size |
-f, --out-format |
YAML |
Output format: JSON or YAML |
Example¶
provision hsm backup¶
Back up a single HSM partition to a binary protobuf (.pb) file (or Base64 to the console).
The backup contains the partition secrets
Unlike the search, a backup includes the partition PIN and proxy PIN so the partition can be restored elsewhere. Store the output securely and treat it as a secret.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-P, --partition-user |
Partition user selecting the partition to back up |
-o, --output-file or -s, --print-to-screen |
Exactly one output destination (file path, or Base64 to console) |
Example¶
provision hsm restore¶
Restore an HSM partition from a .pb backup. The partition is upserted by partition_user: a new partition is created, or an existing one is overwritten with the backup's values (including the secret PINs and the hosts in the blob).
Restore also verifies the PIN against the HSM
Like create, restore logs in to the partition (over the hosts in the blob) to verify the PIN before persisting, and converts a one-time setup PIN carried in an older backup to the permanent user secret. The target HSM must therefore be reachable from the admin service, which must have an hsm block configured. A wrong PIN or unreachable HSM fails closed and restores nothing.
Syntax¶
Required options¶
| Option | Description |
|---|---|
-i, --input-file |
Path to the .pb backup file |
Example¶
Deployment: HSM reachability¶
Because provision hsm create, update (when the PIN changes) and restore all verify the PIN with a real login, the admin service must be able to reach the Securosys Primus partition and must be configured with an hsm pool-tuning block, for example:
hsm {
threadsPerKey = 2
queueCapacityPerKey = 128
daemonThreads = true
prestartCoreThreads = false
threadNamePrefix = "admin-hsm-"
}
If the hsm block is absent, these commands fail closed with a configuration error rather than storing an unverified PIN. The block tunes the shared partition worker pool only; the partition's connection details (user, PIN, proxy and hosts) come from the command options, not configuration.
Standard CLI options, including the global -p/--profile selector, are documented in Global options.
FAQ¶
What does provision dss create?
It assigns the dss feature license to the tenant (idempotent — shared across the tenant's instances), enforces the tenant's dss.quota instance cap, and creates a named DSS service-module instance (returned as module_uuid) plus the DSS bootstrap record — linked to that instance — with a one-time shared secret, a per-instance key-profile quota and the HSM user-partition, returning the plaintext secret once. A tenant may run several DSS instances, each with its own name, secret and allowed key set. The active-signing-keys table starts empty and is filled in by the dss-proxy as it generates keys. JWT public keys are bound to the module instance later, at onboarding.
How many DSS instances can a tenant have?
A tenant may run several DSS instances, each identified by a --name that is unique per tenant (default dss). The count is capped by the dss.quota license: a tenant with no dss.quota claim may hold one instance. Raise the cap with tenant license assign -n dss.quota -V <n>; provision dss enforces it and rejects an over-quota request with DSS instance quota exceeded. Each instance carries its own bootstrap secret, key-profile quota and set of onboarded JWT keys, so instances are fully isolated.
Where is the bootstrap secret stored?
Only a hash of the secret is stored, so the plaintext cannot be recovered. The secret is returned in the command reply exactly once; capture it then. If it is lost, run provision dss reset-key to issue a new one.
What is the HSM user-partition for?
It records the Securosys Primus HSM partition (SKA crypto user) on which the tenant will generate its DSS signing keys. It must already be registered with provision hsm create; provision dss validates it against the registry. The dss-proxy uses it when generating keys; the keys themselves are created later by the dss-proxy, not by provision dss.
Why must the HSM partition be registered first?
The DSS signer uses only Securosys Primus HSMs because they support SKA (authorization keys linked to signing keys). Deployed partitions are catalogued once with provision hsm create; a foreign key on the DSS record (ON DELETE RESTRICT) guarantees a tenant can only point at a real, deployed partition and that a partition still in use cannot be deleted. The catalog is global — one partition holds SKA keys shared by many tenants — so deleting a tenant DSS never removes the partition.
Does an HSM partition backup contain secrets?
Yes. provision hsm list never returns the PIN fields, but provision hsm backup deliberately includes the partition PIN and proxy PIN so the partition can be restored elsewhere with provision hsm restore. Store backup files securely.
Why does provision hsm create need to reach the HSM?
Because it verifies the PIN before storing it. provision hsm create (and restore, and update when the PIN changes) logs in to the partition over the supplied host(s) to prove the --partition-pin is correct. A wrong PIN, an unreachable HSM, or an admin service without an hsm pool block all fail closed — nothing is stored. The admin service must therefore reach the Primus partition and be configured with an hsm block.
What happens to a one-time setup PIN when I register a partition?
Securosys prints a freshly created partition a one-time setup PIN as five dash-separated groups of five characters (e.g. nP3UL-gRQHh-DwxUY-8GKxp-yqdrZ). When --partition-pin is in that format, the verifying login derives the partition's permanent user secret and stores that — the setup PIN itself is never persisted. Pass an already-permanent PIN and it is stored unchanged. Either way the reply never returns the PIN.
Do provision commands need a host profile and login?
Yes. Every provision subcommand is a remote gRPC call, so you must first create a host profile with profile hosts create and authenticate with profile authn login.