XKMS Sample Guide

INTRODUCTION

This sample demonstrates how to register a client-side generated (or server-side generated) key pair, how to sent a reissue request to a XKMS server for an issued certificate asking its credentials to be changed, how to recover a server generated key pair, how to locate a certificate and how to validate a certificate

HOW TO BUILD THE SAMPLE

XKMS sample is located in the samples directory which is in WSO2WSAS root directory.

Prerequisites

To build the samples you need Apache Ant build tool

Follow these steps:

  1. Startup WSO2WSAS server
  2. Switch to XKMS sample directory
  3. e.g. cd C:\wso2wsas-2.1\samples\XKMS
  4. Type ant and press enter
  5. e.g. C:\wso2wsas-x.x\samples\MEX>ant

HOW TO CONFIGURE SERVICES

To configure XKMS service, follow the following steps
  1. Log in
  2. Click on Services link on the Manage section
  3. Click on the xkms link in the service column which is in Service and Service Group Management table
  4. Click on Edit Service Parameter link
  5. Change update the following parameter values
  6. 		
    Parameter NameValue
    org.wso2.xkms2.service.crypto.persistence.enabled false
    org.wso2.xkms2.service.crypto.issuer.cert.aliase alice
    org.wso2.xkms2.service.crypto.keystore.password password
    org.wso2.xkms2.service.crypto.default.expriy.interval password
    org.wso2.xkms2.service.crypto.default.expriy.interval 365
    org.wso2.xkms2.service.crypto.default.private.key.password password
    org.wso2.xkms2.service.crypto.keystore.location C:\wso2wsas.home\samples\XKMS\conf\keystore.jks
    org.wso2.xkms2.service.crypto.issuer.key.password password
    org.wso2.xkms2.service.crypto.server.cert.aliase bob
    org.wso2.xkms2.service.crypto.server.key.password password

RUNNING THE CLIENT

Sample clients will access keystore.jks which is a Java key store to retrieve any key information. For example reissue service demo will use the certificate with the alias ?bob? and sends it to the server with new credentials asking it to reissue the certificate. Run the XKMS service demo application to see how to use client applications to access XKMS service
  1. Switch to XKMS smaple directory
  2. Run run-client.bat (or run-client.sh if you are in Linux platform)
  3. Enter the number of the demo you want to run
  4. 		[1] Run Registration Servcie Demo (1)
    		[2] Run Registration Servcie Demo (2)
    		[3] Run Reissue Service Demo
    		[4] Run Recovery Service Demo
    		[5] Run Locate Service Demo
    		[6] Run Validate Service Demo
    		[7] Exit
    		Enter your choice :
    		1
    	
  5. The results will be printed on the screen