Repository navigation
Building Authentication Plugin
This page describes the process to build an authentication plugin.
An example of a custom authentication plugin is available at /usr/share/pki/server/examples/java/com/example/pki/server/auth/CustomAuthPlugin.java.
To build the plugin example:
$ cd /usr/share/pki/server/examples/java
$ javac \
-cp "/usr/share/pki/server/common/lib/*:/usr/share/pki/server/webapps/pki/WEB-INF/lib/*" \
-d /var/lib/pki/pki-tomcat/webapps/ca/WEB-INF/classes \
com/example/pki/server/auth/CustomAuthPlugin.java
The plugin binaries will be stored in /var/lib/pki/pki-tomcat/webapps/ca/WEB-INF/classes.
-
Download pki_authentication.tar.gz.
-
Unpackage
pki_authentication.tar.gz:
$ gtar -zxvf pki_authentication.tar.gz-
A directory called
authenticationwill be created containing the following files:-
SSNAuth.java - the source code for this authentication plugin,
-
SSNEnroll.cfg - the configuration file for this authentication plugin, and
-
build.sh - the build script used to create this authentication plugin.
-
-
Go to the
authenticationsubdirectory:
$ cd authentication-
It may be necessary to edit the
build.shas the original jar names may have changed:
CLASSPATH=${PKIHOME}/pki-cmsutil.jar:${PKIHOME}/pki-cms.jar:${CLASSPATH}
CLASSPATH=${PKIHOME}/pki-nsutil.jar:${PKIHOME}/pki-certsrv.jar:${CLASSPATH}-
To build this authentication plugin in the current directory, execute this command:
$ ./build.shNOTE: If version 1.5.x or later of javac is used, the user may see something similar to the following warning:
Note: SSNAuth.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.This warning may be safely ignored, as it refers to features specific to Java SDK 1.5 or later.
-
A file called
SSNAuth.classshould be created in thisauthenticationdirectory.
|
Tip
|
To find a page in the Wiki, enter the keywords in search field, press Enter, then click Wikis. |