Integration Server 11.1 | Built-In Services Reference Guide | Security Folder | Summary of Elements in this Folder | pub.security:sign
 
pub.security:sign
WmPublic. Adds a digital signature to data.
Input Parameters
securityProvider
String Optional. The type of security provider. The valid values are:
*PGP (Pretty Good Privacy)
*JCE-KBE (Java Cryptography Extension-Key Based Encryption)
The default value is PGP.
data
Document Data that you want to sign. The data must be in one of the following formats. If multiple input parameters are supplied for data, the service throws an exception stating that only one parameter must be passed.
Key
Description
string
String Optional. The string that you want to sign.
stream
java.io.InputStream Optional. The stream data that you want to sign.
bytes
byte[ ] Optional. The byte array that you want to sign.
file
String Optional. The absolute or relative path of the file that you want to sign. If the file is outside the Integration Server or Microservices Runtime installation directory, provide the absolute path. Otherwise, place the file in your Integration Server or Microservices Runtime working directory.
The About page in Integration Server Administrator and Microservices Runtime Administrator displays the working directory. The watt.server.homeDir server configuration parameter also specifies the working directory.
loadAs
String Optional. The format in which the service returns the output. Set to:
*bytes to return the output as a byte array. This is the default.
*stream to return the output as a stream object.
*string to return the output as a string.
secretKey
Document The secret key required to sign the data.
For PGP, provide secretKeyBytes, secretKeyString, or secretKeyRingFile. If you provide secretKeyRingFile, you must also provide secretKeyAlias. Otherwise, the service throws an exception.
For JCE-KBE, provide secretKeyBytes, secretKeyString, or keyStoreAlias. If you provide keyStoreAlias, you must provide keyAlias. Otherwise, the service throws an exception.
Key
Description
secretKeyBytes
byte[ ] Optional. The secret key file in bytes.
Note:
Secret key files have a .asc extension for PGP.
secretKeyString
String Optional. The secret key as a string.
secret​KeyRingFile
String Optional. The absolute or relative path of the secret keyring file. The secret keyring file is a collection of secret keys with a unique key ID. If the file is outside the Integration Server or Microservices Runtime installation directory, provide the absolute path. Otherwise, place the file in your Integration Server or Microservices Runtime working directory. This parameter is applicable only for PGP.
The About page in Integration Server Administrator and Microservices Runtime Administrator displays the working directory. The watt.server.homeDir server configuration parameter also specifies the working directory.
Note:
Secret keyring files have a .skr extension.
secretKeyAlias
String Optional. The 64 bit (16 characters) key identifier of the secret key.
Note:
This parameter is required only when you use secretKeyRing​File.
secretKey ​Passphrase
String Password required to extract the private key from the secret key. This is the password provided while generating the secret key.
keyStoreAlias
String Optional. Applies only to JCE. The keystore alias that contains the private key.
keyAlias
String Optional. Applies only to JCE. The private key alias in the keystore specified by the keyStoreAlias parameter.
Note:
This parameter is required only when you use keyStoreAlias.
signingAlgorithm
String The signing algorithm to use.
*For PGP, select one of the following:
*MD5
*SHA256
*SHA384
*SHA512
The default value is SHA256 for PGP.
*For JCE, select one of the following:
*RSA
*SHA256withRSA
*SHA512withRSA
*SHA3-256withRSA
*SHA3-384withRSA
*SHA3-512withRSA
Note:
If the FIPS (Federal Information Processing Standards) mode is enabled, this service does not support the MD5 signing algorithm. FIPS mode can be enabled or disabled using the watt.security.fips.mode parameter. This is applicable only for PGP.
Note:
If the secret key for signing the data is of the DSA (Digital Signature Algorithm) key type, this service does not support the MD5 signing algorithm. This is applicable only for PGP.
Output Parameters
stream
java.io.OutputStream Conditional. Signed data as an output stream. Returned when the loadAs input parameter is set to stream.
bytes
byte[ ] Conditional. Signed data as bytes. Returned when the loadAs input parameter is set to bytes.
string
String Conditional. Signed data as a string in the ASCII-armored format. Returned when the loadAs input parameter is set to string.
status
String Indicates whether the data is successfully signed or not. If successful, status is success. Otherwise, status contains failure along with an error message.
Usage Notes
For PGP, consider the following points:
*The pub.security:sign service does not support a detached signature.
*If Integration Server runs in the FIPS mode, a secret key of the DSA (Digital Signature Algorithm) key type used for signing the data is not supported. Integration Server is in the FIPS mode, if the watt.security.fips.mode server configuration parameter is set to true.
*Authentication keys used in this service must be in the PGP format and generated using the RSA encryption algorithm.
Note:
Authentication keys in the .ecc format are not supported.