A keystore is a protected database, or a storage facility for keys, that holds cryptographic keys and certificates for an enterprise. Access to a keystore is guarded by a password (defined at the time the keystore is created). In addition, each private key in a keystore can be guarded by its own password.
Keystores may have different types of entries. The two most applicable entry types for a keytool include:
Contents
To follow this tutorial, you need the following software and resources.
This tutorial also requires the Identity plugin for NetBeans IDE. Open the Update Center (Tools > Plugins) and look for the Identity plugin, under Web and Java EE.
Before taking this tutorial, you should take the Securing Web Services Using the SAML or UserNameToken Profiles tutorial.
The NetBeans IDE Identity plugin enables developers to provide Message Level security on Web Service Provider (WSP) and Web Service Clients (WSC) on the Java Application Server SDK Access Manager. The Message Level security enables the use of these two types of token profiles, as well as others:
The NetBeans Identity tools enable you to sign the security token or the response through certificate settings that are exposed in the WSP and WSC security wizards, as in the following screenshot of the wizard for the certificate settings used by the WSP.
Here, by default, the Use Default Keystore option is selected. With this option, the WSP will use the keystore that is bundled with the Access Manager.
There are two keystore files bundled in the Access Manager server:
The keystore is available after Identity plugin installation. The keystore is pre-populated with key aliases that the Access Manager server and the Client SDK use to:
The default keystore contains the following pre-populated aliases:
The IDE communicates with the Access Manager Server by using the Access Manager Client SDK.
The Access Manager Client SDK is initialized with the properties to talk to the server through a file called AMConfig.properties. This client SDK properties file is installed by default at /addons/accessmanager/AMConfig.properties.
AMConfig.properties Properties that Relate to Keystore Settings
The relevant properties in the AMConfig.properties file that relate to the keystore settings and which are used by the ClientSDK/Authentication Provider runtime are:
The com.sun.identity.liberty.ws.wsc.certalias property is used by the Web service client/Web services providers for any outbound SOAP message that needs to be signed using Liberty's X509Token. For example, this property is used by the web services client when it queries for the discovery service for the service offering, and at the same time, the same property is used when it is trying to talk to WSP with X509 token profile.
The WSP uses the com.sun.identity.liberty.ws.trustedca.certaliases property to identify its trusted authorities and their public keys. For example, when we say value for this property as amserver:localhost , it is trusting the localhost 's discovery service whose public key is amserver .
Using Keystore Settings
Within the Identity plugin, you can use keystore settings for the following:
To use WSI-BSP token profiles with custom keystores.
In the Certificate Settings section, perform the following steps. Note that none of the values entered can be null. Clear the Use Default Key Store checkbox, which is selected by default. In the text fields following the checkbox, type the following:
To use custom keystores for Liberty Token Profiles:
You should have an existing keystore with the required key aliases populated. This keystore should be accessible locally (physically located where the application server is installed) for the application server runtime.
The custom keystore specified by the user is effective for the Application Server instance. All deployed applications on that instance should use the same keystore setup.
See the following document for a description of keytool usage.
You are viewing a mobilized version of this site...
View original page here