API Publish Service
The API Publish Service publishes the changes made to the discovered APIs from the PingIntelligence Dashboard to the AI engine.
About this task
Complete the following steps to install the API Publish Service in your environment.
Installing the API Publish Service
Install the API Publish Service.
Before you begin
Before installing the API Publish Service:
-
Install OpenJDK 11.0.2 on a 64-bit architecture machine. To verify the Java version, run the following command:
# java -version
-
Verify the supported operating systems.PingIntelligence supports RHEL 7.9 and Ubuntu 18.04 LTS.
About this task
You can install the API Publish Service as a root user or as a non-root user. The installation path in the steps below assumes that you are root user. The installation works in a similar way for a non-root user.
|
The download site has a link to the consolidated build for ABS and API Publish. When extracting the tar in the
|
Steps
-
Go to the Ping Identity Product Downloads site.
-
Under PingIntelligence for APIs, click View Now.
-
Click Download under PingIntelligence for APIs Software.
-
Under Download AI Engine and Tools, click AI Engine 5.1.0.1.
-
After downloading:
Choose from:
-
If you are installing as a root user, copy the build file to the
/optdirectory. -
If you are installing as a non-root user, choose any other location.
-
-
At the command prompt, enter
# tar –zxvf <file_name>.Example:
# tar –zxvf pi-api-abs-5.1.tar.gz
Default settings
The API Publish configuration file (apipublish.properties) is located in the /pingidentity/apipublish/config/ directory. The following table explains the parameters and provides recommended values. You can change the default values based on your requirements.
| Parameter | Description | ||
|---|---|---|---|
|
The supported SSL protocols. The default value is |
||
|
The supported |
||
|
The directory path of the key store. The default value is |
||
|
The key store type. The default value is |
||
|
The password of the JKS key store. PingIntelligence ships with a default obfuscated password. You can reset the password and obfuscate it. |
||
|
Alias for the SSL key. The default value is |
||
|
Port for the API Publish Service and PingIntelligence Dashboard communication. The default value is |
||
|
Set the time zone to |
||
|
The API Publish Service deployment mode. Valid values are |
||
|
The MongoDB data database name. The default value is |
||
|
The MongoDB metadata database name.The default value is |
||
|
Comma separated MongoDB replica set URI. |
||
|
Set to |
||
|
Defines the method in which MongoDB authenticates. The possible values are:
|
||
|
Set to true if you want to verify MongoDB SSL server certificate when the API Publish Service connects to MongoDB. The default value is
|
||
|
MongoDB username. The default value is |
||
|
MongoDB password. The default value is |
Obfuscating passwords
Using the command line interface (CLI), you can obfuscate the keys and passwords configured in apipublish.properties.
Before you begin
About this task
The API Publish Service is shipped with a default apipublish_master.key, which is used to obfuscate the various keys and passwords. It is recommended to generate your own apipublish_master.key. A default jks_password is configured in the apipublish.properties file.
The following keys and passwords are obfuscated:
-
mongo_password -
jks_password
|
During the process of obfuscation of keys and password, the API Publish Service must be stopped. |
The following diagram summarizes the obfuscation process.
Steps
-
To generate the
apipublish_master.key, run thegenerate_obfkeycommand in the CLI:/pingidentity/apipublish/bin/cli.sh generate_obfkey -u admin -p admin
The new
apipublish_master.keyis used to obfuscate the passwords inapipublish.propertiesfile. -
Enter the keys and passwords in clear text in the
apipublish.propertiesfile. -
Run the
obfuscate_keyscommand to obfuscate keys and passwords:/pingidentity/apipublish/bin/cli.sh obfuscate_keys -u admin -p admin
-
After the passwords are obfuscated, start the API Publish Service.
Next steps
|
After the keys and passwords are obfuscated, the |
Importing existing CA-signed certificates
Import existing CA-signed certificates.
Before you begin
To import the certificate authority (CA)-signed certificate, stop the API Publish Service if it is already running.
About this task
You can import your existing CA-signed certificate in the API Publish Service. Complete the following steps to import the CA-signed certificate.
|
The API Publish Service is shipped with a default self-signed certificate with the Java key store at |
Steps
-
Export your CA-signed certificate to the PKCS12 store by entering the following command:
# openssl pkcs12 -export -in <your_CA_cerficate.crt> -inkey <your_certificate_key.key> -out abs.p12 -name <alias_name>
Example:
# openssl pkcs12 -export -in ping.crt -inkey ping.key -out abs.p12 -name exampleCAcertificate Enter Export Password: Verifying - Enter Export Password:
If you have an intermediate certificate from a CA, then append the content to the
<your_CA_certificate>.crtfile. -
Import the certificate and key from the PKCS12 store to the Java key store by entering the command below.
# keytool -importkeystore -destkeystore apipublish.jks -srckeystore abs.p12 -srcstoretype PKCS12 -alias <alias_name> -storetype jks
The command requires the destination key store password. The destination key store password entered in the command should be same that is configured in the
apipublish.propertiesfile.The following is a snippet of the
apipublish.propertiesfile where the destination key store password is stored. The password is obfuscated.# Java Keystore password jks_password=OBF:AES:Q3vcrnj7VZILTPdJnxkOsyimHRvGDQ==:daYWJ5QgzxZJAnTkuRlFpreM1rsz3FFCulhAUKj7ww4=
Example:
# keytool -importkeystore -destkeystore apipublish.jks -srckeystore abs.p12 -srcstoretype PKCS12 -alias exampleCAcertificate -storetype jks Importing keystore apipublish.p12 to abs.jks... Enter destination keystore password: Re-enter new password: Enter source keystore password:
-
Copy the
apipublish.jksfile created in step 2 to/config/ssldirectory. -
Start the API Publish Service by running the following command:
# ./bin/start.sh
Starting and stopping the API Publish Service
Start and stop the API Publish Service.
Before you begin
For the API Publish Service to start, the apipublish_master.key must be present in the apipublish/config directory. If you have moved the master key to a secured location for security reasons, copy it to the config directory before starting the service.
About this task
You can start the API Publish Service in one of the following two ways:
-
Using a service script available in the
bindirectory -
Using the
start.shscript available in thebindirectory
Steps
-
Start API Publish.
Choose from:
-
To start API Publish as a service:
-
Navigate to the
bindirectory and run the following command to install API Publish as a service:#sudo ./install-systemctl-service.sh pi-apipublish
-
Start the service by entering the following command:
systemctl start pi-apipublish.service
-
-
To start API Publish using the
start.shscript:-
Run the
start.shscript located in the/pingidentity/apipublish/bindirectory:$ ../bin/start.sh
-
-
-
Stop API Publish.
Choose from:
-
To stop API Publish using a service script:
-
Run the following command to stop the API Publish Service:
systemctl stop pi-apipublish.service
-
-
To stop API Publish using the
stop.shscript:-
Run the
stop.shscript available in thebindirectory:# ../bin/stop.sh
-
-