+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


The <securityCheckDefinition> element

Learn how to use the <securityCheckDefinition> adapter-descriptor element to define a custom security check.

You define a security check by adding a <securityCheckDefinition> XML element within the <mfp:adapter> element of your adapter-descriptor file (adapter.xml). Each security check is an instance of a security-check class. See Defining security checks. The security-check definition can contain zero or more <property> subelements that represent configurable security-check properties. Following is a reference of the <securityCheckDefinition> element, its attributes, and subelements.


Syntax


Attributes

The <securityCheckDefinition> element accepts the following mandatory attributes:


The <property> subelement

The security-check definition can contain <property> elements for any configuration property that is supported by the security-check's class. The supported configurations are defined in the security-check configuration class (of the SecurityCheckConfiguration interface type) that is created by the security-check class. When defining your security check, we can decide which of the supported properties to expose, and override the configuration class's default property values. For supported properties that are not referenced in the security-check definition, the security check relies on the default configuration-class values.
The properties that you expose in the security-check definition can be further customized, at run time, both at the adapter level and at the application level.


Example

The following example defines a UserAuthenticationSC security check of a custom MyUserAuthenticationSecurityCheck security-check class, which is implemented in the com.my_company.package Java™ package.
The custom security-check class extends the sample MobileFirst abstract UserAuthenticationSecurityCheck base class, and creates a custom MyUserAuthenticationSecurityCheckConfiguration class that extends the sample UserAuthenticationSecurityCheckConfig class. The custom security check inherits all the configuration properties of the extended sample class and its ancestor classes (CredentialsValidationSecurityCheckConfig and ExternalizableSecurityCheckConfig): inactivityTimeoutSec (default value = 0), maxAttempts (default value = 1), attemptingStateExpirationSec (default value = 120), successStateExpirationSec (default value = 3,600), failureStateExpirationSec (default value = 0), rememberMeDurationSec (default value = 0).In addition, the custom configuration class defines a pinCode property (default value = 1234).
The custom security-check definition exposes only the pinCode, maxAttempts, attemptingStateExpirationSec, and failureStateExpirationSec properties. Of these properties, it customizes the default values of the pinCode, maxAttempts, and failureStateExpirationSec properties, changing them to 9876, 3, and 180.

Parent topic: Defining security checks