8.5. Enrollment policies¶
The scope enrollment defines what happens during enrollment either by an administrator or during the user self enrollment.
Enrollment policies take the realms, the client (see Policies) and the user settings into account.
Technically enrollment policies control the use of the REST API Token endpoints and especially the init and assign methods.
Technically the decorators in API Policies are used.
The following actions are available in the scope enrollment:
8.5.1. max_token_per_realm¶
type: integer
This is the maximum allowed number of tokens in the specified realm.
privacyIDEA checks only the realm of this policy, not the user and the resolver.
Note
If you have several realms with realm admins and you imported a pool of hardware tokens, you can thus limit the consumed hardware tokens per realm.
Note
If there are multiple matching policies, the highest maximum allowed number of tokens among the matching policies is enforced. Policy priorities are ignored.
Added in version 2.0.
8.5.2. max_token_per_user¶
type: integer
Limit the maximum number of tokens per user in this realm.
There are also token type specific policies to limit the number of tokens of a specific token type that a user is allowed to have assigned.
Note
If you do not set this action, a user may have unlimited tokens assigned.
Note
If there are multiple matching policies, the highest maximum allowed number of tokens among the matching policies is enforced. Policy priorities are ignored.
Added in version 2.0.
8.5.3. max_active_token_per_user¶
type: integer
Limit the maximum number of active tokens per user.
There are also token type specific policies
(<type>_max_active_token_per_user) to limit the number of
active tokens of a specific token type.
Note
Inactive tokens will not be taken into account. The limit is also checked when a disabled token is enabled again.
Added in version 3.1.
8.5.4. tokenissuer¶
type: string
This sets the issuer label for a newly enrolled smartphone token. This policy takes a fixed string to add additional information about the issuer of the soft token.
You can use the tags {user}, {realm}, {serial}, {givenname}
and {surname} in the issuer label.
Default: privacyIDEA
Note
A good idea is to set this to the instance name of your privacyIDEA installation or the name of your company.
Added in version 2.9.
8.5.5. tokenlabel¶
type: string
This sets the label for a newly enrolled smartphone token.
Possible tags to be replaced are {user}, {realm}, {serial},
{givenname} and {surname}.
The default behavior is to use the serial number.
Note
This is useful to identify the token in the Authenticator App.
Warning
If you are only using {user} as tokenlabel and you
enroll the token without a user, this will result in an invalid QR code,
since it will have an empty label.
You should rather use a label like "{user}@{realm}",
which would result in "@".
Added in version 2.0.
8.5.6. appimageurl¶
type: string
With this action the administrator may specify the URL to a token image which is included in the
QR code during enrollment (key in otpauth URL: image). It is used by the privacyIDEA Authenticator
and some other smartphone apps like FreeOTP (supported file formats: PNG, JPG and GIF).
Added in version 3.0.
8.5.7. autoassignment¶
type: string
allowed values: any_pin, userstore
Users can assign a token just by using that token. The user can take a token from a pool of unassigned tokens. When this policy is set, and the user has no token assigned, autoassignment will be done: The user authenticates with a new PIN or their userstore password and an OTP value from the token. If the OTP value is correct the token gets assigned to the user and the given PIN is set as the OTP PIN.
Note
Requirements are:
The user must have no other tokens assigned.
The token must not be assigned to any user.
The token must be located in the realm of the authenticating user.
(The user needs to enter the correct userstore password)
Warning
If you set the policy to any_pin the token will be assigned to the user no matter what pin they enter. In this case assigning the token is only a one-factor-authentication: the possession of the token.
Added in version 2.1.
8.5.8. otp_pin_random¶
type: integer
Generates a random OTP PIN of the given length during enrollment. Thus the user is forced to set a certain OTP PIN.
A PIN given in the enrollment request is replaced. The random PIN follows the
otp_pin_contents policy (token type specific or common) of the enrolling
administrator or user if exactly one value applies.
Note
To use the random PIN, you also need to define a pinhandling policy.
Added in version 2.1.
8.5.9. pinhandling¶
type: string
If the otp_pin_random policy is defined, you can use this policy to
define, what should happen with the random pin.
The action value takes the class of a PinHandler like
privacyidea.lib.pinhandling.base.PinHandler.
The base PinHandler only logs that a random PIN was set for the token, without the PIN.
You can add classes to send the PIN via email or print it in a letter.
A class of your own is declared in PI_PIN_HANDLER_MODULES, see
Classes privacyIDEA may import. Without the declaration it is still used and a warning naming it is
logged, unless PI_MODULE_ALLOWLIST_MODE is enforce; then an enrollment with a random PIN fails.
For more information see the base class PinHandler.
Added in version 2.5.
8.5.10. change_pin_on_first_use¶
type: bool
If the administrator enrolls a token or resets a PIN of a token, then the PIN of this token is marked to be changed on the first (or next) use. This action is only triggered if an administrator enrolls the token. When the user authenticates with the old PIN, the user is authenticated successfully. But the detail-response contains the keys “next_pin_change” and “pin_change”. If “pin_change” is True the authenticating application must trigger the change of the PIN using the API /token/setpin. See Token endpoints.
Note
If the application does not honor the “pin_change” attribute, then the user can still authenticate with their old PIN.
Note
privacyIDEA also allows forcing the user to change the PIN in such a case using the policy change_pin_via_validate.
Note
The policy also applies to tokens that an administrator creates from a container template. In addition, a container template can demand the PIN change for each of its tokens, also for tokens that a user creates. See Container Templates.
Added in version 2.13.
8.5.11. change_pin_every¶
type: string
This policy requires the user to change the PIN of their token on a regular basis. Enter a value followed by “d”, e.g. change the PIN every 180 days will be “180d”.
The interval starts when the user sets the PIN: a self-service enrollment with a PIN, setting the PIN in self-service, or a PIN change via change_pin_via_validate. Tokens whose PIN was set by an administrator are not affected until the user changes the PIN; combine with change_pin_on_first_use to force that first change.
The date when the PIN needs to be changed is returned in the API response of /validate/check. For more information see change_pin_on_first_use. To specify the contents of the PIN see User Policies.
Added in version 2.13.
8.5.12. encrypt_pin¶
type: bool
If set the OTP PIN of a token will be encrypted. The default behavior is to hash the OTP PIN, which is safer.
Added in version 2.2.
8.5.13. registration.length¶
type: integer
This is the length of the generated registration codes.
Default: 24
Added in version 3.5.
8.5.14. registration.contents¶
type: string
Default: cn
This defines what characters the registrationcodes should contain.
The value uses the syntax of otp_pin_contents. A plain list such as cn only requires at
least one character of each listed group. The other characters can come from all groups, including special
characters. To generate codes from letters and digits only, use -s. A list in brackets ([...]) is a literal
list of characters and not a regular expression class. You must write out every allowed character.
Added in version 3.5.
8.5.15. pw.length¶
type: integer
This is the length if the password of a password token (pw token) is automatically generated
with the genkey parameter.
The default length is 12.
Added in version 3.7.
8.5.16. pw.contents¶
type: string
Default: cn
This is the content of an automatically generated password of a password token (pw token).
The value uses the syntax of otp_pin_contents. A plain list such as cn only requires at
least one character of each listed group. The other characters can come from all groups, including special
characters. To generate passwords from letters and digits only, use -s. A list in brackets ([...]) is a
literal list of characters and not a regular expression class. You must write out every allowed character.
Added in version 3.7.
8.5.17. applspec.length¶
type: integer
This is the length of a password that the server generates for an application specific password token (applspec token). The default length is 23.
Added in version 3.14.1.
8.5.18. applspec.contents¶
type: string
Default: cn
This defines the characters of a password that the server generates for an application specific password token (applspec token).
The value uses the syntax of otp_pin_contents. A plain list such as cn only requires at
least one character of each listed group. The other characters can come from all groups, including special
characters. To generate passwords from letters and digits only, use -s. A list in brackets ([...]) is a
literal list of characters and not a regular expression class. You must write out every allowed character.
Added in version 3.14.1.
Note
For POST /token/init and for tokens from container templates, the policies registration.*,
pw.* and applspec.* define a generated password. If no policy is set, the defaults of the token type apply.
These requests ignore parameters with the same names.
Two other ways to enroll a token do not use these policies:
The action
enrollof the Token Handler Module uses the defaults of the token type. The optionadditional_paramsof the action can set<type>.lengthand<type>.contents.POST /registeralways uses the defaults of the registration token.
8.5.19. losttoken_PW_length¶
type: integer
This is the length of the generated password for the lost token process.
Default: 16
Added in version 2.1.
8.5.20. losttoken_PW_contents¶
type: string
This is the content that a generated password for the lost token process should have. You can use
c: for lowercase letters
n: for digits
s: for special characters (!#$%&()*+,-./:;<=>?@[]^_)
C: for uppercase letters
8: Base58 character set
Default: 8 (Base58)
Example:
The action losttoken_PW_length=10, losttoken_PW_contents=Cns could generate a
password like AC#!49MK)).
Note
If you combine 8 with e.g. C there will be duplicate characters
like “A”, “B”… Thus, those characters will have a higher probability of being
part of the password. Also, C would again add the character “I”, which is
not part of Base58.
Added in version 2.1.
8.5.21. losttoken_valid¶
type: integer
This is how many days the replacement token for the lost token should be valid. After this many days the replacement can not be used anymore.
Default: 10 days
Added in version 2.1.
8.5.22. yubikey_access_code¶
type: string
This is a 12 character long access code in hex format to be used to initialize YubiKeys. This access code is not actively used by the privacyIDEA server. It is meant to be read by an admin client or enrollment client, so the component initializing the YubiKey can use this access code without the operator knowing the code.
If a YubiKey uses an access code, YubiKeys can only be re-initialized by a person who knows this code. You could choose a company-wide access code, so that YubiKeys can only be re-initialized by your own system.
You can add two access codes separated by a colon to change from one access code to the other:
313233343536:414243444546
Note
As long as the enrollment client does not read and use this access code, this configuration has no effect.
Added in version 3.7.
8.5.23. papertoken_count¶
type: integer
Defines how many OTP values should be generated (and printed) for the paper token.
Default: 100
Added in version 2.17.
8.5.24. tantoken_count¶
type: integer
Defines how many OTP values should be generated (and printed) for the TAN token.
Default: 100
Added in version 2.23.
8.5.25. 2step_clientsize, 2step_serversize, 2step_difficulty¶
type: integer
These are token type specific parameters (with hotp_ or totp_ prefix).
They control the key generation during the 2step token enrollment (see Two Step Enrollment).
The serversize is the optional size (in bytes) of the server’s key part.
The clientsize is the size (in bytes) of the smartphone’s key part.
The difficulty is a parameter for the key generation.
PBKDF2 is used. In this case the difficulty
specifies the number of rounds.
Added in version 2.21.
8.5.26. force_app_pin¶
type: bool
This is a token type specific parameter (with hotp_, totp_, daypassword_ or push_ prefix).
During enrollment with the privacyIDEA Authenticator smartphone app this policy is used
to force the user to protect the token with a pin (unrelated to the token pin).
Note
This only works with the privacyIDEA Authenticator. This policy has no effect if the QR code is scanned with other smartphone apps.
Note
Starting with privacyIDEA 3.13, the app_force_unlock policy is recommended. This will also set app_force_unlock=pin in the QR code.
Added in version 3.1: hotp_force_app_pin and totp_force_app_pin
Added in version 3.7.1: push_force_app_pin
Added in version 3.9: daypassword_force_app_pin
8.5.27. push_firebase_configuration¶
type: string
The push-capable SMS gateway which should be used when enrolling a
Push Token. Firebase providers support PUSH messages by default. HTTP and
Script gateways must have ALLOW_PUSH set to yes.
The policy name is retained for backwards compatibility. The administrator can
create several gateway configurations (see SMS Gateway configuration), which can
be selected depending on the user’s realm or the IP address.
This action is required to enroll push tokens; without it the enrollment fails with “Missing enrollment policy for push token: push_firebase_configuration”.
If the push token is supposed to run in poll-only mode, then the entry “poll only” can be selected instead of a push gateway configuration. In this mode, no push gateway is used during enrollment or authentication. Note that you also need to set the authentication policy push_allow_polling to allow the push token to poll for challenges.
Added in version 3.0.
8.5.28. push_registration_url¶
type: string
This is the URL of your privacyIDEA server, which the push App should
connect to for the second registration step.
This URL usually ends with /ttype/push. Note that the smartphone app
may connect to a different privacyIDEA URL than the URL of the privacyIDEA
WebUI.
This action is required to enroll push tokens; without it the enrollment fails with “Missing enrollment policy for push token: push_registration_url”.
Added in version 3.6.
8.5.29. push_ttl¶
type: integer
The time (in minutes) the smartphone app is told it has to complete the
second registration step. It is passed to the app in the enrollment QR code
(ttl); the server itself accepts the second step as long as the token
waits for it.
The smartphone could have connection issues, so the second step
could take some time to happen.
Default: 10
Added in version 3.6.
8.5.30. push_ssl_verify¶
type: string
allowed values: 0, 1
The smartphone needs to verify the SSL certificate of the privacyIDEA server during the enrollment of push tokens. By default, the verification is enabled. To disable verification during authentication, see push_ssl_verify.
Added in version 3.0.
8.5.31. push_use_pia_scheme¶
type: bool
Use the pia scheme in the enrollment URL for push tokens to automatically open the privacyIDEA Authenticator app.
If this policy is not enabled, the otpauth scheme is used by default.
Added in version 3.12.
8.5.32. verify_enrollment¶
type: string
This action takes a white space separated list of tokentypes. These tokens then need to be verified during enrollment. This is supported for HOTP, TOTP, Day Password, Daplug, Email, SMS, Paper, TAN and Indexed Secret tokens.
In this case after enrolling the token the user is prompted to enter a valid OTP value. This way the system can verify that the user has successfully enrolled the token.
As long as no OTP value is provided by the user during the enrollment process, the token can not be used for authentication.
Note
This does not work in combination with the admin policy hotp_2step and totp_2step and the user policy hotp_2step and totp_2step.
Added in version 3.7.
8.5.33. webauthn_relying_party_id¶
type: string
This action sets the relying party id to use for the enrollment of new WebAuthn tokens, as defined by the WebAuthn specification [1]. Please note that a token will be rolled out with one particular ID and that the relying party of an existing token can not be changed. In order to change the relying party id for existing tokens, they need to be deleted and new tokens need to be enrolled. This is a limitation of the WebAuthn standard and is unlikely to change in the future.
The relying party id is a valid domain string that identifies the WebAuthn Relying Party on whose behalf a given registration or authentication ceremony is being performed. A public key credential can only be used for authentication with the same entity (as identified by RP ID) it was registered with.
This id needs to be a registrable suffix of or equal to the effective domain
for each webservice the tokens should be used with. This means if the token is
being enrolled on – for example – https://login.example.com, then the relying
party ID may be either login.example.com, or example.com, but not – for
instance – m.login.example.com, or com. Similarly, a token enrolled with a
relying party ID of login.example.com might be used by
https://login.example.com, or even https://m.login.example.com:1337, but not
by https://example.com (because the RP ID login.example.com is not a valid
relying party ID for the domain example.com).
Note
This action needs to be set to be able to enroll WebAuthn tokens. For an overview of all the settings required for the use of WebAuthn, see WebAuthn Token Config.
Set this action once for the whole installation. Authentication requests
(/validate/check, /validate/triggerchallenge, /validate/initialize
and the WebUI login) read it without the user; with differing values in
policies of different priority, the value of the policy with the highest
priority is used for passkey authentication in every realm. If two policies
with different relying party IDs have the same priority, passkey
authentication is not available (no challenge can be created); other token
types are not affected.
Added in version 3.3.
8.5.34. webauthn_relying_party_name¶
type: string
This action sets the human-readable name for the relying party, as defined by the WebAuthn specification [2]. It should be the name of the entity whose web applications the WebAuthn tokens are used for.
Note
This action needs to be set to be able to enroll WebAuthn tokens. For an overview of all the settings required for the use of WebAuthn, see WebAuthn Token Config.
Added in version 3.3.
8.5.35. webauthn_timeout¶
type: integer
This action sets the time in seconds the user has to confirm enrollment on their WebAuthn authenticator.
This is a client-side setting, that governs how long the client waits for the authenticator. It is independent of the time for which a challenge for a challenge response token is valid, which is governed by the server and controlled by a separate setting. This means that if you want to increase this timeout beyond two minutes, you will have to also increase the challenge validity time, as documented in The challenge validity time.
This setting is a hint. It is interpreted by the client and may be adjusted by an arbitrary amount in either direction, or even ignored entirely.
The default timeout is 60 seconds.
Note
If you set this policy you may also want to set webauthn_timeout.
Added in version 3.3.
8.5.36. webauthn_authenticator_attachment¶
type: string
This action configures whether to limit roll out of WebAuthn tokens to either only platform authenticators, or only cross-platform authenticators. Cross-platform authenticators are authenticators, that are intended to be plugged into different devices, whereas platform authenticators are those, that are built directly into one particular device and can not (easily) be removed and plugged into a different device.
The default is to allow both platform and cross-platform attachment
for authenticators.
Added in version 3.3.
8.5.37. webauthn_authenticator_selection_list¶
type: string
This action configures a whitelist of authenticator models which may be enrolled. It is a space-separated list of AAGUIDs. An AAGUID is a hexadecimal string (usually grouped using dashes, although these are optional) identifying one particular model of authenticator. To limit enrollment to a few known-good authenticator models, simply specify the AAGUIDs for each model of authenticator that is acceptable. If multiple policies with this action apply, the set of acceptable authenticators will be the union of all authenticators allowed by the various policies.
If this action is not configured, all authenticators will be deemed acceptable, unless limited through some other action.
Note
If you configure this, you will likely also want to configure webauthn_authenticator_selection_list.
Added in version 3.3.
8.5.38. webauthn_user_verification_requirement¶
type: string
This action configures whether the user’s identity should be checked when rolling out a new WebAuthn token. If this is set to required, any user rolling out a new WebAuthn token will have to provide some form of verification. This might be biometric identification, or knowledge-based, depending on the authenticator used. The action also applies to the enrollment of a passkey.
This defaults to preferred, meaning user verification will be performed if
supported by the token.
Note
User verification is different from user presence checking. The
presence of a user will always be confirmed (by asking the user to take
action on the token, which is usually done by tapping a button on the
authenticator). User verification goes beyond this by ascertaining that the
user is indeed the same user each time (for example through biometric
means). Only set this to required if you know for a fact that you have
authenticators, which actually support some form of user verification.
Note
If you configure this, you will likely also want to configure webauthn_user_verification_requirement.
Added in version 3.3.
8.5.39. webauthn_public_key_credential_algorithms¶
type: string
This action configures which algorithms should be available for the creation of WebAuthn asymmetric cryptography key pairs. privacyIDEA currently supports ECDSA, RSASSA-PSS and RSASSA-PKCS1-v1_5. Please check with the manufacturer of your authenticators to get information on which algorithms are acceptable to your model of authenticator.
The default is to allow all three: ECDSA, RSASSA-PSS and RSASSA-PKCS1-v1_5.
The order of preferred algorithms is ECDSA > RSASSA-PSS > RSASSA-PKCS1-v1_5.
This action also sets the algorithms requested when enrolling passkeys.
Note
Not all authenticators will support all algorithms. It should not usually be necessary to configure this action. Do not change this preference, unless you are sure you know what you are doing!
Added in version 3.8.
8.5.40. webauthn_authenticator_attestation_form¶
type: string
This action configures whether to request attestation data when enrolling a new
WebAuthn token. Attestation is used to verify that the authenticator being
enrolled has been made by a trusted manufacturer. Since depending on the
authenticator this may include personally identifying information, indirect
attestation can be requested. If indirect attestation is requested the client
may pseudonymize the attestation data. Attestation can also be turned off
entirely.
The default is to request direct (full) attestation from the authenticator.
Note
In a normal business context it will not be necessary to change this.
If this is set to none,
webauthn_authenticator_attestation_level must also be none.
Note
Authenticators enrolled with this option set to none can not be
filtered using webauthn_req and
webauthn_authenticator_selection_list or
webauthn_req and
webauthn_authenticator_selection_list, respectively. Applying
these filters is not possible without attestation information, since the
fields these actions rely upon will be missing. With indirect attestation,
checking may be possible (depending on the client). If any of
webauthn_req,
webauthn_authenticator_selection_list,
webauthn_req, or
webauthn_authenticator_selection_list are set and apply
to a request for a token without attestation information, access will be
denied.
Added in version 3.3.
8.5.41. webauthn_authenticator_attestation_level¶
type: string
This action determines whether and how strictly to check authenticator
attestation data. Set this to none to allow any authenticator, even if the
attestation information is missing completely. If this is set to trusted,
strict checking is performed. No authenticator is allowed, unless it contains
attestation information signed by a certificate trusted for attestation.
Note
The attestation certificate is verified along its certificate chain (the intermediate certificates sent by the authenticator) up to a root certificate in the trust anchor directory. Put the vendor’s root CA certificates into that directory. An intermediate certificate alone is not sufficient; together with its root it also works.
The default is untrusted. This will perform the attestation check like normal,
but will not fail the attestation, if the attestation is self-signed, or signed
by an unknown certificate.
Note
In order to be able to use trusted attestation, a directory needs
to be provided, containing the certificates trusted for attestation. See
WebAuthn Token Config for details.
Note
If this is set to untrusted, a manipulated token could send a
self-signed attestation message with a modified AAGUID and faked
certificate fields in order to bypass webauthn_req and
webauthn_authenticator_selection_list, or
webauthn_req and
webauthn_authenticator_selection_list, respectively. If
this is of concern for your attack scenarios, please make sure to properly
configure your attestation roots!
Added in version 3.3.
8.5.42. passkey_attestation_conveyance_preference¶
type: string
This action configures the attestation conveyance preference for the passkey enrollment. Possible values are
none, indirect, direct and enterprise. The default is none.
If attestation is requested and the authenticator returns a statement, the leaf certificate from the attestation
statement is saved in the token info as attestation_certificate, and the token description is set to the
certificate’s Common Name if no description has been set yet. The WebAuthn library checks the signature of the
attestation statement, and for the apple, android-key and android-safetynet formats the certificate chain
up to the vendor root certificates built into the library; a registration that fails these checks is rejected. There
is no further validation of the attestation data: the trust anchor directory of the WebAuthn token is not used.
Requesting attestation also reveals the AAGUID of the authenticator (which is zeroed out when attestation is
none) and typically causes the browser to show an additional consent dialog to the user during registration.
For these reasons, none is the recommended setting for passkeys; see Passkey for details.
This policy is separate from webauthn_authenticator_attestation_form and webauthn_authenticator_attestation_level, which are not used for passkey enrollment.
Added in version 3.11.
8.5.43. passkey_user_label¶
type: string
This action configures the name of the passkey that the authenticator shows in the credential selection when the user logs in (and during registration). It is the value that lets a user tell passkeys apart, for example when the same login name exists in several realms. The resolved value is also used as the display name. If the policy is not set, the name defaults to the login name of the user.
The value supports tags of the form {tagname} for replacement. The following tags are always available:
{user}– the login name of the user{realm}– the realm of the user{resolver}– the resolver of the user{serial}– the serial number of the passkey token
In addition, every attribute the user’s resolver provides can be used as a tag, for example {givenname},
{surname}, {email} or {mobile} (the available attributes depend on the resolver type and
configuration). The built-in tags above take precedence over resolver attributes with the same name.
For example, if the user alice in the realm example has the given name Alice and the surname
Miller, the value {user}@{realm} results in a name of alice@example and {givenname} {surname}
in Alice Miller.
Unknown tags and tags whose value is empty (for example an attribute that the resolver does not return) are replaced with an empty string. Static text and braces that do not form a valid tag are kept unchanged. If the whole template resolves to an empty value, the login name of the user is used as a fallback.
Note
Whether the configured name is actually shown during login depends on the browser and authenticator. Browsers reliably show the name for roaming authenticators (security keys), while platform and synced passkey managers may show the display name instead; both are set to the same resolved value. In addition, the browser is allowed to drop these fields before passing them to the authenticator: Firefox on Linux currently does not forward the name/display name, so it is not stored on the authenticator. This is purely cosmetic and does not affect authentication.
Note
The resolved name is truncated to 64 bytes, because authenticators may not store longer names (and may truncate them at an arbitrary position otherwise). Note that this limit is in bytes, not characters: since the value is encoded as UTF-8, non-ASCII characters (e.g. accented letters or umlauts) take up more than one byte, so the effective number of characters may be lower than 64. Keep the template short enough that the resolved name stays within this limit.
Added in version 3.14.
8.5.44. passkey_allowed_authenticator_device_types¶
type: string
Only allow the enrollment of passkeys that report one of the given device types, as a space-separated list of
single_device and multi_device. See Device type for what the two types mean. If several
policies match, the values of all of them are allowed. Any other value matches no passkey, so every enrollment is
rejected. If the policy is not set, both types are accepted.
The device type cannot be requested from the browser in advance. The authenticator creates the credential first, and privacyIDEA rejects the registration afterwards if the device type does not match. The credential then remains on the authenticator or in the user’s passkey manager, but cannot be used to authenticate.
This policy does not affect passkeys that are already enrolled. To also refuse them at login, use the authentication policy of the same name.
Warning
The device type is reported by the authenticator and is not backed by a verified attestation. The policy keeps out honest synced passkeys, but not an authenticator that reports a wrong device type. See Device type.
Added in version 3.14.
8.5.45. passkey_disable_prf¶
type: bool
If this policy is set, privacyIDEA does not request the WebAuthn extension prf (pseudo-random function) during
the passkey enrollment. By default, privacyIDEA requests it, so that a client application can derive a secret from
the passkey at login. See PRF extension for details.
Some authenticators only create this secret if the registration requests it. Passkeys that are enrolled while the policy is set possibly do not support the PRF later. To add the secret, enroll the passkey again without the policy.
The policy applies to the enrollment with /token/init and to the enrollment with
enroll_via_multichallenge. It only changes the registration options that privacyIDEA sends. A client
application can still request the extension itself.
Added in version 3.14.1.
8.5.46. webauthn_req¶
type: string
This action allows filtering of WebAuthn tokens by the fields of the attestation certificate.
The action value is parsed as a slash-delimited expression with three parts:
<field>/<regex>/<trailing>. The leading <field> selects which field
of the attestation certificate is checked and must be one of subject,
issuer or serial. <regex> is a Python regular expression that is
applied via re.search against that field. Because / is the delimiter
of this expression, the regex itself may not contain a /. A second /
is required to terminate the regex part; the <trailing> text after it is
optional and ignored. The value must contain exactly two / separators. A
value with more or fewer is saved without complaint, but every WebAuthn
enrollment it applies to then fails with “Could not enroll webauthn token!”.
Several examples:
webauthn_req=subject/.*Yubico.*/
webauthn_req='issuer/.*FIDO2 CA.*/'
webauthn_req=serial/^4711$/
If the value contains whitespace (as in the second example above), the whole action value must be wrapped in single quotes. Otherwise it is split on whitespace into separate values, each of which is then parsed individually and fails.
During registration of the WebAuthn authenticator the information is fetched
from the attestation certificate. The token can only be enrolled if the
selected field matches the regular expression. If the attestation statement
contains no certificate (for example because attestation form is none),
filtering fails and enrollment is denied.
If several webauthn_req values apply (from one or several policies), the
attestation certificate must match every one of them. To allow alternatives,
combine them in one regular expression, e.g.
webauthn_req=subject/.*(Yubico|Feitian).*/.
Note
If you configure this, you will likely also want to configure webauthn_req.
Added in version 3.3.
8.5.47. webauthn_challenge_text¶
type: string
Use an alternate challenge text when requesting the user to confirm with their WebAuthn token during enrollment. This might be different from the challenge text received during authentication (see webauthn_challenge_text).
Added in version 3.3.
8.5.48. webauthn_avoid_double_registration¶
type: bool
If this policy is set, a user or an admin can not register the same webauthn token to a user more than once. However, the same webauthn token could be registered to a different user. Revoked tokens are not counted: once a webauthn token has been revoked, the same authenticator can be re-enrolled for the same user. Merely disabled tokens still block re-registration, since disabling is reversible.
Added in version 3.8.
8.5.49. certificate_require_attestation¶
type: string
When enrolling a certificate token, privacyIDEA can require that an attestation certificate is passed along to verify, if the key pair was generated on a (PIV) smartcard.
This policy can be set to:
ignore(default): An attestation certificate is not required, and a failed verification of its chain is only logged. If one is passed with a certificate request, its public key must still match the request, otherwise the enrollment fails.verify: If an attestation certificate is passed along during enrollment, the attestation certificate gets verified.require_and_verify: An attestation certificate is required and verified. If no attestation certificate is provided, the enrollment will fail.
The trusted root certificate authorities and intermediate certificate authorities can be configured via the policies certificate_trusted_Attestation_CA_path and certificate_trusted_Attestation_CA_path
Added in version 3.5.
8.5.50. certificate_ca_connector¶
type: string
During enrollment of a certificate token the user needs to specify the CA connector from which the CSR should be signed. This policy adds the given CA connector parameter to the request. The list of CA connectors is read from the configured connectors.
Note
When using the privacyIDEA Smartcard Enrollment Tool, this policy needs to be set. Otherwise the enrollment will fail.
Added in version 3.8.
8.5.51. certificate_template¶
type: string
During enrollment of a certificate token the user needs to specify the certificate template that should be used for enrollment. This policy adds the given template parameter to the request. The administrator needs to add the name of the template manually in this policy.
Note
When using the privacyIDEA Smartcard Enrollment Tool in combination with a Microsoft CA, this policy needs to be set, otherwise the enrollment will fail.
Added in version 3.8.
8.5.52. certificate_request_subject_component¶
type: string
During enrollment of a certificate token by creating a request, privacyIDEA can add additional components to the request subject.
This can be “email” (The email of the user read from the userstore) and/or “realm”, which is written to the Organizational Unit (OU) of the request.
Note
A couple of certificate templates on the Microsoft CA will not allow having the email component directly in the subject!
Added in version 3.8.
8.5.53. require_description¶
type: string
To prevent tokens from becoming unidentifiable after a device loss, a description can be enforced with the “require_description policy”. The desired token-types can be selected here. After setting up the policy, the selected token types can only be enrolled if a description is set during enrollment.
Added in version 3.9.
8.5.54. email_validation¶
type: string
This action validates the email address that a user enters when an email token is enrolled via
enroll_via_multichallenge. Addresses given to /token/init are not checked by this policy.
The administrator specifies the Python module that should be used to validate the email address.
The modules can be defined in the pi.cfg file.
See 3rd party email validators for more information.
Added in version 3.10.
8.5.55. app_force_unlock¶
type: string
allowed values: any, biometric, pin
This is a token type specific parameter (with hotp_, totp_, daypassword_ or push_ prefix).
This policy can be used to force the privacyIDEA Authenticator App to secure the token with a pin or
biometric. If you select any, the token can be unlocked with both.
The app then requires the selected authentication method every time the token is used or its data is revealed, for example when an OTP value is displayed or a push request is accepted or declined. If the user has configured a stricter method for the whole app, that stricter method applies.
The policy describes how the app gates the use of the token. It is not a statement about the storage of
the key material and it does not tie the key to a particular biometric that is enrolled on the device. The
app stores the token data in the secure storage provided by the operating system, and choosing
biometric does not make the key unusable when the user later adds or removes a fingerprint or face.
Note
This needs the privacyIDEA Authenticator app 4.6.1 or higher.
Added in version 3.13.
Footnotes