Authorization backends in CDAP are implemented as extensions, and are loaded and executed in their own Java classloader.

The reason for implementing them as extensions is that a variety of existing authorization systems can then be plugged into CDAP, and can execute using their own classloader without having to worry about conflicts with CDAP's system classloader. Each authorization extension is designed to be a fully self-contained JAR file, packaged with the required versions of all its dependencies.

This is similar to how CDAP applications are packaged. Having the required dependencies loaded from a separate class loader constructed using the provided JAR file ensures that there will be no conflicts, even if CDAP itself uses a different version of the library than the one that the extension requires.

Writing Your Own Authorization Extension

CDAP provides an authorization SPI (Service Provider Interface) for users to implement their own authorization extensions. To implement an authorization extension: