← Back to plugin index

OATH OTP Settings

Description
Settings for OATH OTP (one time password) authentication.
It can be used to verify counter based HOTP (event-triggered, incrementing counter) or to verify time based TOTP (draft standard).
On the client side we tested it with 'Google Authenticator' which was available for Android, iPhone and Blackberry at the time this plugin has been developed.

References:
HOTP RFC 4226 http://www.ietf.org/rfc/rfc4226.txt
TOTP RFC 6238 http://www.ietf.org/rfc/rfc6238.txt

Type name
OathOtpSettings
Class
com.airlock.iam.core.misc.impl.tokenverifier.oathotp.OathOtpSettings
May be used by
License-Tags
MobileOTP,OathOtp
Properties
Password (password)
Description
The password to encrypt the shared secret of each users OATH OTP token.
Attributes
String
Mandatory
Sensitive
Credential Persister (credentialPersister)
Description
Configure which persister is used to store token information.
Attributes
Plugin-Link
Mandatory
Assignable plugins
Token Type (tokenType)
Description
This property defines if we use time based one time passwords (TOTP), or HMAC based one time passwords (HOTP). HOTP uses an incrementing counter; each OTP is generated on the client by an explicit request, as pressing a button, which will increment the counter on client side. TOTP uses time slots instead of counters.

More formal:
hotp := truncate(secureHash(sharedSecret, counter))
totp := truncate(secureHash(sharedSecret, time_slot))

We implement HOTP as defined in RFC 4226 and for TOTP we follow the draft standard http://www.ietf.org/id/draft-mraihi-totp-timebased-06.txt).

The default is TOTP.
Attributes
Plugin-Link
Optional
Assignable plugins
Label Pattern (labelPattern)
Description
Defines the label pattern for the OTP generator. The label identifies which account a key is associated with. It consists of an account name, optionally prefixed by an issuer. The issuer prefix helps prevent collisions between accounts from different providers.

Recommended format: ${issuer}: ${accountName} (e.g. resolving to, My Company: alice@example.com).

The pattern allows referencing variables using the following notation ${} The following variables are supported:
  • ${issuer}: Resolved from 'Issuer Context Data Property' falling back to the value defined by the 'Default Issuer' property in case the referenced context data is missing.
  • ${accountName}: Resolved from 'Account Name Context Data Property' falling back to the user's 'username' (from the medusa_user table) in case the referenced context data is missing.
  • Any context data property name (e.g., ${email}). Compared to the ${issuer} and ${accountName} variables, these do not have a fallback. So in order for something to be displayed, make sure the referenced context data contains a value. Additionally, make sure the context data property is provided by the configured credential persister.

Assumptions for the following examples:

  • Default Issuer Property: My Company
  • Account Name Context Data Property: email
  • Username (fallback for missing accountName): f39286da-23a0-473d-986b-319741df785d (UUIDv4)
Examples:
  • Pattern: ${issuer}: ${accountName} (default)
    • With existing e-mail -> My Company: alice@example.com
    • With missing e-mail -> My Company: f39286da-23a0-473d-986b-319741df785d

Note: Colons (':') are reserved characters in OATH URI labels for separating the issuer from the account name. To avoid issues with authenticator apps, Airlock IAM will automatically remove any colons from the issuer and accountName them during label generation.
In the above example, assume the email would be alice:1@example.com, then the generated label would be My Company: alice1@example.com.

Attributes
String
Optional
Default value
${issuer}: ${accountName}
Issuer Context Data Property (issuerContextDataProperty)
Description
The name of a context data property used to resolve the ${issuer} variable in the 'Label Pattern'. Resolves the variable from the user's attributes (e.g., company).

Fallback: If this property is not defined or the referenced context data value is blank, 'Default Issuer' is used.

Note: Make sure the context data property is provided by the configured credential persister.

Attributes
String
Optional
Example
company
Example
instance_id
Default Issuer (defaultIssuer)
Description
Static fallback value for the ${issuer} variable in the 'Label Pattern'. Used if 'Issuer Context Data Property' is missing or resolves to a blank value.
Attributes
String
Optional
Default value
Airlock
Include Issuer in Parameters (includeIssuerInParameters)
Description
If enabled, the issuer is included as a separate URI parameter in the QR code URL.

This is recommended for better compatibility with modern OTP generator apps.

Attributes
Boolean
Optional
Default value
true
Account Name Context Data Property (accountNameContextDataProperty)
Description
The name of a context data property used to resolve the ${accountName} variable in the 'Label Pattern'. Resolves the variable from the user's attributes (e.g., email).

Fallback: If this property is not defined or the referenced context data value is blank, the user's 'username' (from the medusa_user table) is used.

Note: Make sure the context data property is provided by the configured credential persister.

Attributes
String
Optional
Example
contractNumber
Example
email
Number of Digits (digits)
Description
Defines the length (number of decimal digits) of the one time password.
Attributes
Integer
Optional
Default value
6
Selectable As Auth Method (selectableAsAuthMethod)
Description
If enabled, OATH OTP may be selected as active authentication method in the admin tool.
Attributes
Boolean
Optional
Default value
true
Selectable As Next Auth Method (selectableAsNextAuthMethod)
Description
If enabled, OATH OTP may be selected as the next (migration) authentication method.
Attributes
Boolean
Optional
Default value
true
Synchronize/Increase Counter Button (synchronizeIncreaseCounterButton)
Description
Set to false to hide the button in the Adminapp.
Using this button, the administrator can reset the time offset (for time-based OATH OTP) or increase the counter-value (event-based OATH OTP) in order to manually re-synchronize the token with the server.
Attributes
Boolean
Optional
Default value
true
Show Letter Attributes (showLetterAttributes)
Description
Set to false to hide the activation letter attributes, e.g. generation date.
Attributes
Boolean
Optional
Default value
true
Show Secret as QR Code (showSecretAsQrCode)
Description
Set to false to hide the QR code (2d-barcode) in the Adminapp.
The QR code allows admins to transfer the token key more easily to a compatible mobile app. This also eases "cloning" the OTP generator!
Attributes
Boolean
Optional
Default value
true
Show Secret in HEX (showSecretInHex)
Description
Set to true to show the secret in HEX-code (hexa-decimal representation of the token key) in the Adminapp.
The HEX representation allows admins to transfer the token key to a mobile app. This also allows "cloning" the OTP generator!
Attributes
Boolean
Optional
Default value
false
Show Secret in Base 32 (showSecretInBase32)
Description
Set to false to hide the secret in Base 32 in the Adminapp used by some mobile apps. The Base 32 representation allows admins to transfer the token key to a mobile app. This also allows "cloning" the OTP generator!
Attributes
Boolean
Optional
Default value
true
YAML Template (with default values)

type: OathOtpSettings
id: OathOtpSettings-xxxxxx
displayName: 
comment: 
properties:
  accountNameContextDataProperty:
  credentialPersister:
  defaultIssuer: Airlock
  digits: 6
  includeIssuerInParameters: true
  issuerContextDataProperty:
  labelPattern: ${issuer}: ${accountName}
  password:
  selectableAsAuthMethod: true
  selectableAsNextAuthMethod: true
  showLetterAttributes: true
  showSecretAsQrCode: true
  showSecretInBase32: true
  showSecretInHex: false
  synchronizeIncreaseCounterButton: true
  tokenType: