Stateless APIs
The stateless API offers identical functionality to that provided in the session oriented API, with the exception that there is no context established or maintained between calls to the Stateless WebService. In practice this means that credentials must be provided for every call, and access to cryptographic objects cannot be cached for efficiency between them. REST sample URLs are provided below along with SOAP content samples.
Two parameters certAlias and certPassword are optional for all the requests. CertAlias is a client certificate alias for making SSL connections and certPassword is the password for the provided certificate alias.
ProtectApp WebService supports caching of session-pool for a user. In session-pool, a session is cached for a user so that for additional requests no new session is created for the particular user till the time the user-session is cached.
To maintain session for a user, session-pool is created using the following parameters. The parameters are maintained in cxf-beans file in the webapps\protectappws\WEB-INF
directory. User can modify the default values, as required.
Size of cache: The number of different user sessions that can be cached. Default value is 2000. Change the default value 2000 in the following code snippet as required in the cxf-beans file.
<!-- size of cache --> <constructor-arg type = "int" value = "2000"/>
Session expiry time: The time after which the session expires from the last use of the particular cached session. Default value is 3600000 millisecond. Change the default value 3600000 in the following code snippet as required in the cxf-beans file.
<!-- session expiry time in milli sec --> <constructor-arg type = "int" value = "3600000"/>
Salt: The string used along with the Message digest algorithm parameter to create the hash of the key to store the user session in the cache. Default string used is ThisIsIt432@123. Change the default string ThisIsIt432@123 in the following code snippet as required in the cxf-beans file.
<!-- salt --> <value>ThisIsIt432@123</value>
Message digest algorithm: The algorithm used to calculate the hash of the key used in creating the user session. Default algorithm used is SHA-256. Possible values can be SHA-1, SHA-256, and SHA-512. Change the default algorithm SHA-256 in the following code snippet as required in the cxf-beans file.
<!-- message digest algorithm --> <value>SHA-256</value>
Note
This note applies to the APIs that use username/adminUser - password/adminPassword and certAlias - certPass tags for user authentication.
Like certAlias - certPass, the username/adminUser - password/adminPassword tag has now been made optional. The user authentication can now be done using either of the below mentioned tags:
username/adminUser - password/adminPassword
certAlias and certPass
If both the tags are provided, precedence is given to username and password.
Here is the list of stateless APIs offered by CADP for Java.
User and Group Management APIs
Crypto APIs
Decrypt Data Using FPE While Preserving Format of Ciphertext
Verify the Signature of Message Text Using RSA or EC Public Key