Package io.quarkus.security.webauthn
Interface WebAuthnRunTimeConfig
@ConfigMapping(prefix="quarkus.webauthn")
@ConfigRoot(phase=RUN_TIME)
public interface WebAuthnRunTimeConfig
Webauthn runtime configuration object.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSameSite attribute values for the session cookie.static interfaceRoot CRLs for attestation verification of authenticators. -
Method Summary
Modifier and TypeMethodDescriptionOptional<io.vertx.ext.auth.webauthn.Attestation>Device Attestation Preference.Optional<io.vertx.ext.auth.webauthn.AuthenticatorAttachment>Kind of Authenticator Attachment allowed.The cookie that is used to store the challenge data during login/registrationLength of the challenges exchanged between the application and the browser.The cookie that is used to store the username data during login/registrationMax-Age attribute for the session cookie.The cookie that is used to store the persistent sessionThe cookie path for the session cookies.SameSite attribute for the session cookie.The login pageHow old a cookie can get before it will be replaced with a new cookie with an updated timeout, also referred to as "renewal-timeout".origin()The origin of the application.Allowed Public Key Credential algorithms by preference order.Your application is a relying party.Resident key required.The inactivity (idle) timeout When inactivity timeout is reached, cookie is not renewed and a new login is enforced.timeout()Non-negative User Verification timeout.Authenticator Transports allowed by the application.Optional<io.vertx.ext.auth.webauthn.UserVerification>User Verification requirements.
-
Method Details
-
origin
The origin of the application. The origin is basically protocol, host and port. If you are calling WebAuthn API while your application is located athttps://example.com/login, then origin will behttps://example.com. If you are calling fromhttp://localhost:2823/test, then the origin will behttp://localhost:2823. Please note that WebAuthn API will not work on pages loaded over HTTP, unless it is localhost, which is considered secure context. -
transports
@ConfigDocDefault("USB,NFC,BLE,INTERNAL") Optional<List<io.vertx.ext.auth.webauthn.AuthenticatorTransport>> transports()Authenticator Transports allowed by the application. Authenticators can interact with the user web browser through several transports. Applications may want to restrict the transport protocols for extra security hardening reasons. By default, all transports should be allowed. If your application is to be used by mobile phone users, you may want to restrict only theINTERNALauthenticator to be allowed. Permitted values are:USB- USB connected authenticators (e.g.: Yubikey's)NFC- NFC connected authenticators (e.g.: Yubikey's)BLE- Bluetooth LE connected authenticatorsINTERNAL- Hardware security chips (e.g.: Intel TPM2.0)
-
relyingParty
WebAuthnRunTimeConfig.RelyingPartyConfig relyingParty()Your application is a relying party. In order for the user browser to correctly present you to the user, basic information should be provided that will be presented during the user verification popup messages. -
authenticatorAttachment
Optional<io.vertx.ext.auth.webauthn.AuthenticatorAttachment> authenticatorAttachment()Kind of Authenticator Attachment allowed. Authenticators can connect to your device in two forms:PLATFORM- The Authenticator is built-in to your device (e.g.: Security chip)CROSS_PLATFORM- The Authenticator can roam across devices (e.g.: USB Authenticator)
-
requireResidentKey
Resident key required. A resident (private) key, is a key that cannot leave your authenticator device, this means that you cannot reuse the authenticator to log into a second computer. -
userVerification
@ConfigDocDefault("DISCOURAGED") Optional<io.vertx.ext.auth.webauthn.UserVerification> userVerification()User Verification requirements. Webauthn applications may chooseREQUIREDverification to assert that the user is present during the authentication ceremonies, but in some cases, applications may want to reduce the interactions with the user, i.e.: prevent the use of pop-ups. Valid values are:REQUIRED- User must always interact with the browserPREFERRED- User should always interact with the browserDISCOURAGED- User should avoid interact with the browser
-
timeout
Non-negative User Verification timeout. Authentication must occur within the timeout, this will prevent the user browser from being blocked with a pop-up required user verification, and the whole ceremony must be completed within the timeout period. After the timeout, any previously issued challenge is automatically invalidated. -
attestation
Device Attestation Preference. During registration, applications may want to attest the device. Attestation is a cryptographic verification of the authenticator hardware. Attestation implies that the privacy of the users may be exposed and browsers might override the desired configuration on the user's behalf. Valid values are:NONE- no attestation data is sent with registrationINDIRECT- attestation data is sent with registration, yielding anonymized data by a trusted CADIRECT- attestation data is sent with registrationENTERPRISE- no attestation data is sent with registration. The device AAGUID is returned unaltered.
-
pubKeyCredParams
@ConfigDocDefault("ES256,RS256") Optional<List<io.vertx.ext.auth.webauthn.PublicKeyCredential>> pubKeyCredParams()Allowed Public Key Credential algorithms by preference order. Webauthn mandates that all authenticators must support at least the following 2 algorithms:ES256andRS256. Applications may require stronger keys and algorithms, for example:ES512orEdDSA. Note that the use of stronger algorithms, e.g.:EdDSAmay require Java 15 or a cryptographicJCEprovider that implements the algorithms. -
challengeLength
Length of the challenges exchanged between the application and the browser. Challenges must be at least 32 bytes. -
loginPage
The login page -
sessionTimeout
The inactivity (idle) timeout When inactivity timeout is reached, cookie is not renewed and a new login is enforced. -
newCookieInterval
How old a cookie can get before it will be replaced with a new cookie with an updated timeout, also referred to as "renewal-timeout". Note that smaller values will result in slightly more server load (as new encrypted cookies will be generated more often); however, larger values affect the inactivity timeout because the timeout is set when a cookie is generated. For example if this is set to 10 minutes, and the inactivity timeout is 30m, if a user's last request is when the cookie is 9m old then the actual timeout will happen 21m after the last request because the timeout is only refreshed when a new cookie is generated. That is, no timeout is tracked on the server side; the timestamp is encoded and encrypted in the cookie itself, and it is decrypted and parsed with each request. -
cookieName
The cookie that is used to store the persistent session -
challengeCookieName
The cookie that is used to store the challenge data during login/registration -
challengeUsernameCookieName
The cookie that is used to store the username data during login/registration -
cookieSameSite
SameSite attribute for the session cookie. -
cookiePath
The cookie path for the session cookies. -
cookieMaxAge
Max-Age attribute for the session cookie. This is the amount of time the browser will keep the cookie. The default value is empty, which means the cookie will be kept until the browser is closed.
-