Service Registry 3 2005Q4 Developer's Guide

Getting Access to the Registry

Any user of a JAXR client can perform queries on the Registry for objects that are not restricted by an access control policy. A user must, however, obtain permission from the Registry for the following actions:

The Registry uses client-certificate authentication for user access.

To create a user that can submit data to the Registry, use the User Registration Wizard of the Web Console. The Web Console is part of the Registry software. For details on using the wizard to obtain a user name and password as well as a certificate that authorizes you to use the Registry, see Creating a User Account in Service Registry 3 2005Q4 User’s Guide. You can also use an existing certificate that you obtained from a certificate authority.

Before you can publish to the Registry, you must move the certificate from the .p12 file that you downloaded to a JKS keystore file. The keystore file must reside at the following location in your home directory: $HOME/soar/3.0/jaxr-ebxml/security/keystore.jks. The example programs include an asant target that performs this task. For details, see To Create a Keystore for Your Certificate.

After you create a user account and a keystore, edit the JAXRExamples.properties file. See To Edit the Security Settings of the JAXRExamples.properties File for details.

ProcedureTo Create a Keystore for Your Certificate

To create a JKS keystore for your certificate, you use the asant target move-keystore, which is defined in the file <INSTALL>/registry/samples/common/targets.xml. This targets file is used by all the build.xml files in the example directories.

The move-keystore target uses a property named keystoreFile that is defined in the file <INSTALL>/registry/samples/common/build.properties. Do not change the definition of this property. The move-keystore target also specifies a keystore password of ebxmlrr. This value is used in the security.storepass property of the file JAXRExamples.properties.

Steps
  1. Go to any of the example directories except common.

    For example, you might use the following command:


    cd registry/samples/query-id
    
  2. Run the following command (all on one line):


    asant move-keystore -Dp12path=path_of_p12_file -Dalias=your_user_name
    -Dpassword=your_password
    

    Use a command like the following:


    asant move-keystore -Dp12path=/home/myname/testuser.p12 -Dalias=testuser
    -Dpassword=testuser
    

    To see a syntax reminder for this target, use the command asant -projecthelp.

ProcedureTo Edit the Security Settings of the JAXRExamples.properties File

Steps
  1. Open the file <INSTALL>/registry/samples/common/JAXRExamples.properties in a text editor.

  2. Find the following lines:


    security.keystorePath=<home_dir>/soar/3.0/jaxr-ebxml/security/keystore.jks
    security.storepass=ebxmlrr
    security.alias=
    security.keypass=
  3. To specify the security.keystorePath property, replace <home_dir> with the absolute path of your home directory (for example, /home/myname).

  4. For the value of the security.alias property, specify the user name that you provided to the User Registration Wizard.

  5. For the value of the security.keypass property, specify the password that you provided to the User Registration Wizard.

  6. Save and close the file.