Configuration Validation

The provider architecture allows each configured provider to have its own namespace of configuration options.

When a provider’s init() method (or a login module's initialize() method) is called, a configuration map is provided. The keys and values in the map always appear as string types.

To detect any configuration errors before they are saved, CSI validates that the supplied internal configuration in the properties format adheres to the stored provider metadata, and the providers validate the supplied configuration by performing runtime checks where possible. The provider implementations should include a sybcsi-provider.xml file that contains the metadata about the valid configuration options (including names, types, default values, and whether they are required or optional properties, and so on) to simplify the configuration administration and validation. The provider metadata should conform to the latest configuration XSD included in the SDK.

A provider can participate in configuration validation by implementing the optional interface com.sybase.security.provider.SecConfigurationValidatingProvider to perform the same validation checks on the specified configuration options that it performs at runtime when instantiated with the configuration using the init() method. It should return the validation errors as a list of com.sybase.security.provider.ConfigurationProblem.

A configuration problem report includes an error description, its severity, and the configuration property with which it is associated. In the case of a missing required property or an invalid property combination, the problem is associated with the provider itself.

Login modules can implement com.sybase.security.provider.NamedCredentialProvider as an optional interface to aid in validating that the NamedCredential added by the provider does not conflict with the credentials added by other configured login modules.