Signature key material
Whenever tokens or other messages must be signed such that the receiver of the message can verify that a specific nevisAuth instance issued it, private keys must be configured. An AuthState or service (e.g., TokenAssembler) can reference the KeyObject element configuration.
Java KeyStore (JKS)
For example, the TokenAssembler usually uses the DefaultSigner to sign the SecToken:
<KeyStore name="DefaultKeyStore">
<KeyObject name="DefaultSigner"
certificate="/var/opt/keybox/nevis/authSigner_keystore.jks?alias=authSigner"
privateKey="/var/opt/keybox/nevis/authSigner_keystore.jks?alias=authSigner"
passPhrase="neviscred://authSignerPW"
/>
</KeyStore>
Since we need access to the private key, which is usually encrypted with a password, we need to specify the privateKey and passphrase attributes for the KeyObject element.
Whenever we are using a JKS keystore, it is possible to reference exactly one certificate or private key using the alias syntax. For example, if the authSigner_keystore.jks contains multiple certificates or private keys, the alias will specify which certificate or private key should be fetched.
PKCS11 (HSM, 64-bit)
nevisAuth supports hardware security modules (HSMs) as key material storage through the SunPKCS11 security provider.
Configuration Parameters (esauth4.xml)
<KeyStore id="DefaultKeyStore">
<KeyObject name="DefaultSigner"
certificate="pkcs11://?alias=<alias>?provider=SunPKCS11-<name>"
privateKey="pkcs11://?alias=<alias>?provider=SunPKCS11-<name>"
passPhrase="neviscred://<neviscred-alias>"
/>
</KeyStore>
The <alias> string in the example above has to be replaced with the alias of the according certificate/private key in the HSM. It is highly recommended using the same alias for a certificate and for its private key.
SunPKCS11 Parameters (pkcs11.cfg)
The configuration of the SunPKCS11 security provider is stored in the following file: /var/opt/nevisauth/<instance>/conf/pkcs11.cfg
name = HsmName
library = /usr/safenet/lunaclient/lib/libCryptoki2_64.so
slot = 1
name: Unique identifier for scenarios where multiple HSMs are usedlibrary: The vendor-specific HSM library (64-bit).slot: The slot number on the HSM.
In our example, the according KeyObject identifier in the esauth4.xml would look as follows (assuming the HSM contains a certificate and a private key with alias TokenSigner): pkcs11://?alias=TokenSigner?provider=SunPKCS11-HsmName
For some HSMs, it is required to force the login for KeyStoreType. In such a case, the following line needs to be added to the vmargs.conf file:
-Dch.nevis.esauth.security.provider.pkcs11.forcelogin=true