Passkey Configuration REST API¶
This API provides a way to manage the global passkey authentication configuration through REST, without regenerating directory.xml and without restarting the server.
It is implemented by PasskeyRestHandler and persists settings under /security/config/passkeyconfig. After a successful update, the passkey authenticator reloads its runtime configuration.
The work on this feature was implemented in #11405.
Configuration¶
Passkey Configuration REST API is a sub-module of Administration_REST_API. To use it, the global REST API must be enabled. Please see Administration_REST_API.
Add Permissions for the Passkey Configuration REST API¶
To access this API, grant ACL permissions for the endpoint family:
<node class="container" name="security">
<node class="container" name="acl">
<node class="container" name="webservice">
<!-- GET /admin/config/passkey -->
<node class="container" name="000210">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:GET:/admin/config/passkey"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="restAdmin"/>
</node>
</node>
<!-- PUT /admin/config/passkey -->
<node class="container" name="000211">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:PUT:/admin/config/passkey"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="restAdmin"/>
</node>
</node>
</node>
</node>
</node>
For the definition of admin-rest FWD user, see Administration_REST_API.
By setting these ACL entries, you allow:
| Method | Path | Description | Body Required |
|---|---|---|---|
GET |
/admin/config/passkey |
Get the current passkey configuration | No |
GET |
/admin/config/passkey?includeSecrets=true |
Get the current passkey configuration including secret values | No |
PUT |
/admin/config/passkey |
Update one or more passkey configuration fields and reload runtime configuration | Yes |
Request Object Reference¶
The request body is a JSON object used by PUT. All fields are optional; only fields present in the request are updated.
Passkey Fields¶
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
Boolean | No | Enables or disables passkey authentication. Accepts JSON booleans or textual true/false values. |
passkeyPlugin |
String | No | Fully-qualified PasskeySsoAuthenticator implementation class. If unset, the default implementation is used. |
challengeTtlSec |
Integer | No | Challenge lifetime, in seconds. Runtime uses at least 30 seconds. |
rpId |
String | No | WebAuthn relying-party identifier. Default is localhost. |
origins |
String | No | Comma-separated list of allowed WebAuthn origins. Default is https://localhost:7443. |
totpEncryptionKey |
String | No | Secret key used for TOTP data encryption. This value is redacted by default in GET responses. |
SMTP Fields¶
These SMTP fields are part of the same passkey configuration resource. They are used by passkey setup and verification e-mails.
| Field | Type | Required | Description |
|---|---|---|---|
smtpHost |
String | No | SMTP server host name or IP address. |
smtpPort |
String | No | SMTP server port. Stored as text to match the mail subsystem configuration. |
smtpConnType |
String | No | SMTP connection security mode. Accepted values are UNENCRYPTED, STARTTLS_WHEN_AVAILABLE, STARTTLS_REQUIRED, and SSL. Hyphenated forms such as STARTTLS-REQUIRED are also accepted. |
smtpUser |
String | No | SMTP authentication user. |
smtpPassword |
String | No | SMTP authentication password. This value is redacted by default in GET responses. |
mailFrom |
String | No | Sender address for passkey/TOTP setup verification e-mails. |
mailSubject |
String | No | Subject for passkey/TOTP setup verification e-mails. |
Notes:
- Unknown fields are rejected.
- Text fields are trimmed. Blank strings are stored as
null. nullremoves an existing configured value.PUTcreates/security/config/passkeyconfigif the node does not exist.- Successful
PUTrequests callPasskeySsoAuthenticator.reloadConfigFromDirectory(). smtpConnTypedefaults toUNENCRYPTEDat runtime if unset or invalid in the directory.GETredactssmtpPasswordandtotpEncryptionKeyby returningsmtpPasswordConfiguredandtotpEncryptionKeyConfiguredunlessincludeSecrets=trueis supplied.
API Routes¶
The Passkey Configuration REST API has the following capabilities:
- Authentication: login/logout are provided by the main module. See Administration_REST_API.
- Read configuration: retrieve current passkey and SMTP configuration values.
- Update configuration: update only the submitted fields.
- Runtime reload: on successful
PUT, runtime passkey configuration is reloaded.
Get Passkey Configuration¶
Retrieve the passkey configuration by performing a GET request at /admin/config/passkey.
Header must include a valid FwdSessionId token.
Show example - include secret values
Show example - no configuration node
Update Passkey and SMTP Configuration¶
Update passkey or SMTP configuration by performing a PUT request at /admin/config/passkey.
Header must include a valid FwdSessionId token.
- The request body must be a JSON object.
- Only submitted fields are changed.
- Secret values can be cleared by submitting
null. - Runtime passkey configuration is reloaded after a successful update.
Show example - update SMTP fields only
Show example - clear optional values
Show example - failure (unknown field)
Show example - failure (invalid connection type)