Kaa releases
Skip to end of metadata
Go to start of metadata

To implement a custom user verifier, you need to complete the following steps.

  1. Design and compile a configuration schema.
  2. Implement the user verifier based on AbstractKaaUserVerifier.
  3. Develop the user verifier descriptor.
  4. Provision the user verifier.

We recommend that you use one of the existing user verifier implementations  as a reference.

Configuration schema

A user verifier configuration schema is an Avro compatible schema that defines configuration parameters of the user verifier. The following parameters in the schema affect Kaa Admin UI layout.

  • displayName - displays the name of the field on UI
  • by_default - displays the default value of the field on UI

Once you have prepared your schema, you can compile it using the following command.
java -jar /path/to/avro-tools-1.7.7.jar compile schema <schema file> <destination>
Please refer to Compiling the schema for more information. It is also possible to integrate the schema compilation with avro-maven-plugin.

User verifier implementation

All Kaa user verifiers extend generic abstract class org.kaaproject.kaa.server.common.verifier.AbstractUserVerifier<T>. The following code example illustrates the implementation of a custom user verifier.

User verifier descriptor

A user verifier descriptor provides Kaa with the information on how to locate and configure your custom user verifier. To implement a user verifier descriptor, you need to implement the PluginConfig interface at first.

It is also important to provide your class with the @KaaPluginConfig annotiation. This annotation helps Kaa Admin UI to find all available user verifiers in the class path.

A user verifier descriptor is optional if you are going to configure your user verifiers using only REST API.

The following code example illustrates the implementation of a user verifier descriptor. 

User verifier provisioning

To provision your user verifier, do the following:

  1. Create and compile user verifier configuration schema.
  2. Create and compile user verifier implementation.
  3. Create and compile user verifier descriptor.
  4. Place the user verifier descriptor and configuration classes into the Admin UI class path (Usually it is "/usr/lib/kaa-node/lib").
  5. Place the user verifier implementation classes into the Operations Server class path ("/usr/lib/kaa-node/lib").
  6. Use Admin UI or REST API to create/update/delete your user verifier instances.

Copyright © 2014-2015, CyberVision, Inc.

  • No labels