5.0 Using the Command Line to Configure the Java APIs

This section describes how to configure the API using the command line. The API configuration parameters are provided directly from the command line. The following table lists the Windows Installer command line options used to perform various configurations required to login to an application using SecureLogin.

IMPORTANT:You must specify the admin.json file while using the following arguments except -h and --help.

Table 5-1 Java API Command Line Options

Arguments

Usage

-a

Displays administration details.

-p, --provision

Provisions credential to a user, group or container.

-l, --link

Links credential to an application for a user, group or container.

-pp, --pprovision

Provisions passphrase for a user.

-r

Re-encrypts the SecureLogin data with the new password.

-h, --help

Displays the API help.

The above mentioned command line arguments are used with the admin.json file and the user.json file. The admin.json file contains the administrator details and the user.json file contains the user credentials for the application and the passphrase. The following are the examples of these files.

Admin.json

"user":"CN=Administrator,CN=Users,DC=domain,DC=com",
  "password":"samplepassword",
  "server":"WIN-O8QA8KVQ9OH.domain.com",
  "SecurePort":"636",
  "CertPath":"C:\\Users\\username\\Documents\\NSL Provisioning SDK-8.8.0-0\\dp3.cer",
  "licence":"3266238b8bcbd0b5e8ad8e552ef97fc44ca64dc5b20c588c9c1c2e9d002686331841d66a09ce66b1"

User.json

{
  "users":[
    {
      "dn":"cn=user,ou=users,o=data",
      "password":"samplepassword",
      "credentials":[
          {
            "credential_name":"samplecred",
            "details": {
              "Username":"sampleuser",
              "password":"samplepass"
            }
          }
      ],
      "link":[
          {
            "credential_name":"samplecred",
            "application_name":"sampleapp.exe"
          }
        ],
      "passphrase":{
        "question":"What is the name of your organisation",
        "answer":"Micro Focus"
      }
    }
  ]
}

You can create your own .json files or edit the files provided. Provisioning an application includes the following configurations. You must download the Java Single Sign-on package and extract the Java SSO SDK-8.8.0-0.zip file before you start performing the following configurations.