E65462 - 01 - Oracle API Gateway Deployment and Promotion Guide
E65462 - 01 - Oracle API Gateway Deployment and Promotion Guide
July 2015
Oracle API Gateway Deployment and Promotion Guide, 11g Release 2 (11.1.2.4.0)
Copyright 1999, 2015, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed
by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform,
publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this
software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any
errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S.
Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S.
Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable
Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure,
modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government
contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-
19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA
94065.
This software is developed for general use in a variety of information management applications. It is not developed or
intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If
you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any
liability for any damages caused by use of this software in dangerous applications.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective
owners.
This software and documentation may provide access to or information on content, products, and services from third parties.
Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to
third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or
damages incurred due to your access to or use of third-party content, products, or services. This documentation is in
prerelease status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which
you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of
any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the
use of this documentation.
The information contained in this document is for informational sharing purposes only and should be considered in your
capacity as a customer advisory board member or pursuant to your beta trial agreement only. It is not a commitment to
deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development,
release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.
This document in any form, software or printed matter, contains proprietary information that is the exclusive property of
Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle Software
License and Service Agreement, which has been executed and with which you agree to comply. This document and
information contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without
prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any
contractual agreement with Oracle or its subsidiaries or affiliates.
27 July 2015
Contents
Preface 6
Who should read this document 6
How to use this document 6
Before deploying API Gateway configuration in a production environment you should consult the
API Gateway Administrator Guide for information on planning and managing an API Gateway system
in production. You should also understand exactly what message filters are, and how they are
chained together to create a message policy. These concepts are documented in detail in the
API Gateway Policy Developer Guide.
Others who might find parts of this document useful include network or systems administrators and
other technical or business users.
Before you begin promoting and deploying API Gateway configuration, review this document
thoroughly. The following is a brief description of the contents of each chapter:
Introduction to API Gateway promotion and deployment on page 8 – Describes promotion and
deployment concepts, including API Gateway domains and configuration packages.
API Gateway deployment and promotion tasks on page 14 – Describes the tasks involved in
promoting API Gateway configuration, such as environmentalizing configuration, and deploying
policy and environment packages.
Configure package properties on page 20 – Describes how to configure package properties in Policy
Studio and Configuration Studio.
Example: Promote from development to testing environment on page 24 – Provides a detailed
example of the steps involved in promoting API Gateway configuration from a development
environment to a production environment.
Promote and deploy using scripts on page 36 – Describes sample scripts that you can use to
environmentalize configuration and promote configuration.
Externalize API Gateway instance configuration on page 38 – Describes how to externalize API
Gateway instance configuration using environment variables in the envSettings.props file.
Manage X.509 certificates and keys on page 42 – Describes how to manage API Gateway certificates
and keys.
Manage API Gateway users on page 55 – Describes how to manage API Gateway users.
Overview
This topic introduces the concepts in the deployment and promotion of API Gateway configuration.
A typical enterprise-level customer will have several environments through which an API Gateway
configuration will move from development to production. For example, this typically includes
completely separate development, testing, and production domains. Promotion refers to the act of
moving API Gateway configuration from one environment to another, and configuring
environment-specific values so that the configuration can be deployed in each environment. For
details on general API Gateway concepts, see the API Gateway Concepts Guide.
API Gateway supports a range of different operating systems (for example, Windows, Linux, and
UNIX). This means that API Gateway configuration can be promoted and deployed across
environments running on different operating systems. For details on supported platform versions,
see the API Gateway Installation Guide.
Environment topology
In a typical environment topology, each environment is implemented as a completely separate API
Gateway domain. The exact mapping of environments to domains is determined by how each
environment is administered, and which users have access rights.
Environments are distinct administrative entities in which only certain users have the privileges to
perform operations. For example, only Production Operations staff have access to the production
environment. In the API Gateway architecture, a domain is a distinct administrative entity for
managing groups of API Gateways. For example, the production environment is implemented as a
distinct production domain to which only Production Operations staff have access.
In the following diagram, each environment is implemented as a distinct API Gateway domain.
Developers work in their own development environments, and then promote their API Gateway
configurations to a central Testing team that performs testing in a single testing environment. When
testing is complete, the Testing team promotes the API Gateway configurations to the Production
Operations team for deployment in the production environment. Development, Testing, and
Production Operations teams have access to their respective environments only. Therefore, each
environment should be implemented as a distinct domain.
The API Gateway configuration is deployed to a group of API Gateways. Therefore, each domain
consists of the required API Gateway groups to run the configurations. In the following diagram, the
Development and Testing teams work in the same environment with common access to all API
Gateway configurations. Therefore, in this case, there is a single domain for all the development and
testing API Gateway groups.
Note The API Gateway does not mandate a specific environment-to-domain configuration, and
is flexible enough to work with any architecture. However, you should manage your
environments in an environment and domain topology. Implementing each environment
as a distinct API Gateway domain is a good starting point.
Promotion typically involves two distinct tasks performed by different user types:
l In the downstream development environment, the policy developer prepares the configuration
for promotion to upstream environments (for example, testing and production). This involves
deciding what settings are environment-specific, and assumes expertise in policy development
and configuration tools such as Policy Studio.
l The upstream user takes the configuration prepared by the policy developer, creates the
environment-specific configuration, and deploys it. This is typically performed by an API
Gateway administrator in upstream environments. The Configuration Studio tool used for this
promotion step is designed for the skills of upstream administrators, and does not assume
expertise in policy development and configuration.
Deployment refers to deploying configuration to an API Gateway group in a local domain. For
example, you can deploy using the following tools:
l Policy Studio in a development environment
l API Gateway Manager in a testing environment
l Scripts in a production environment (for example, managedomain or a custom script)
For more details, see API Gateway deployment and promotion tasks on page 14.
These component configuration types are described as follows:
The combined contents of the policy package and environment package are equivalent to the
contents of the deployment package, which contains all API Gateway configuration.
For more details on package properties, see Configure package properties on page 20.
Overview
This topic describes the tasks, tools, and architecture used in API Gateway deployment and
promotion. It explains the breakdown of tasks performed by a policy developer in a development
environment, and the tasks performed by an API Gateway administrator in an upstream environment
(for example, testing or production).
The deployment package contains the entire API Gateway configuration, and is implemented as a
.fed file.
Environmentalize configuration
When development is complete, the policy developer must prepare the configuration for promotion
to upstream environments. This involves environmentalizing the configuration that will require
environment-specific settings in upstream environments. The policy developer performs the
following tasks in Policy Studio:
l Selects the policy, listener, and external connection configuration settings that are environment
specific.
l Enters values for these environment-specific settings to ensure that the configuration remains
deployable in the Development environment. These environment-specific settings are contained
in the environment settings in the deployment package. If you have already entered values for
these settings, these are used so you do not have to manually re-enter them.
l Exports a policy package (.pol file) on disk for promotion. For example, this enables you to
transfer the file using FTP to the upstream environments, or to load the file into a CM repository.
The following diagram shows an example environment topology.
The policy package that is exported for promotion is implemented as a .pol file. This file should
remain unchanged when it is promoted to upstream environments.
l Specifies values for the environment-specific settings selected in the development environment
(for example, policy, listener, and external connections).
l Imports or creates certificates and keys.
l Defines users and user groups.
l Exports the environment package to a file on disk. The environment package is implemented as
an .env file. For version history and rollback, you could also load the file into a CM repository.
Note Alternatively, the administrator can save a deployment package (.fed) from Configuration
Studio, which merges the policy and environment package data. If you are not concerned
with moving an unmodified policy package from the development environment to all
upstream environments, you can save a single .fed file, and deploy this using API
Gateway Manager or scripts (for example, if you want a single file for convenience).
The following diagram shows an example environment topology.
Note The environment settings in the environment package (.env) override the environment
settings in the policy package (.pol). The environment settings in the policy package
indicate settings for which you need to specify environment-specific values.
The administrator opens the new policy package from the development environment, and the
environment package currently deployed in their environment. Opening these .pol and .env files
displays a merged view of the environment settings. The administrator then performs the following
tasks:
l Specifies values for new environment-specific settings required by the new policy package from
the development environment.
l Updates values for environment-specific settings that previously existed (if necessary).
l Adds or removes certificates and keys.
l Adds or removes users and user groups.
l Exports the environment package to a file on disk. Alternatively, for version history and rollback,
you could load the file into a CM repository.
The following diagram shows an example environment topology.
Multisite HA environments
Some environments might require different environment values for connections, certificates, and so
on (for example, a remote High Availability (HA) site for a production environment in an
active/passive configuration). In this scenario, the primary site is actively processing requests. The
remote site is the backup passive configuration, deployed but not processing requests, and only
becomes active if the primary site goes down. The same API Gateway configuration is deployed in
both sites. Each site could be a separate domain, or one domain with different groups for each site.
Specific environment values could be different for each site, for example, the remote site might
connect to a different backup authentication server.
When the administrator receives the policy package (.pol) from the downstream environment, they
can use Configuration Studio to create separate environment packages (.env) for the primary site
and the remote site. The only difference between both environment packages is in the environment
values required. In the primary site, the administrator deploys the policy package and the primary
site environment package. In the remote HA site, the administrator deploys the same policy archive
and the remote site environment package.
Passphrase-protected configuration
When promoting encryption passphrase-protected configuration between environments (for
example, from testing to production), the passphrase for the target configuration (production)
must be the same as the passphrase in the source configuration (testing).
If you are using a different passphrase in each environment, before the deployment takes place, you
must make a copy of the configuration (for example, .fed file), load it in Policy Studio, and set it
with the correct passphrase of the target configuration. For details on how to set encryption
passphrases in Policy Studio, see the API Gateway Administrator Guide.
Overview
The API Gateway configuration package files include property files that contain name-value pairs
describing the package contents, and which are known as package properties . This topic describes
these properties, and explains how to configure default and custom package properties using the
Policy Studio and Configuration Studio tools. It also shows how to customize the package
properties that are displayed in the Topology View in Policy Studio.
The API Gateway bundles its configuration in the following package formats:
l Deployment package (.fed)
l Policy package (.pol)
l Environment package (.env)
For a description of each package, see API Gateway configuration packages on page 12.
Default properties
The default set of package properties that can be edited includes the following:
Property Description
Property Description
Description Description associated with the configuration (for example, API
Gateway configuration settings for the Payment API)
Version Configuration version (for example, v3)
These fields are all free format text fields. You can set them to an empty value, or remove them
completely, as required. The set of properties is completely customizable. You can add your own
custom properties if required.
Read-only properties
The package also includes the following read-only, system-controlled package properties:
Property Description
Id A unique ID for the package
Timestamp The time that the package was written
To add a new package property, click the add icon on the right of the window. Similarly, to delete a
package property, click the delete icon to the right of the property.
Package property values are deployed to an API Gateway along with the entire configuration in the
relevant configuration package structure.
l ${manifest.policy.Name}
l ${manifest.policy.Description}
l ${manifest.policy.Version}
l ${manifest.policy.VersionComment}
l ${manifest.env.Name}
l ${manifest.env.Description}
l ${manifest.env.Version}
l ${manifest.env.VersionComment}
l ${manifest.root.Id}
l ${manifest.root.Timestamp}
1. Click New.
Overview
This topic describes a step-by-step example of promoting configuration from a development
environment to a testing environment. If further promotions to more upstream environments are
required, you can repeat Step 4 and Step 5 only.
Note Some environments (for example, testing and production) might be exact copies of each
other, which enables you to deploy the same environment package to both environments.
In these cases, repeat Step 5 only.
Example topology
This example assumes the following simple environment topology:
l A domain is configured in the development environment with a group of API Gateways named
Dev Payment API Group.
l A domain is configured in the testing environment with a group of API Gateways named Testing
Payment API Group. The configuration developed in the development environment must be
promoted to the servers in this group.
Select the Group and API Gateway instances to which to deploy the configuration, and click
Deploy. This uploads the configuration to the Admin Node Manager for the group, and then
deploys it to the API Gateway instances on the hosts.
Note This simple example shows a group with a single API Gateway instance. Groups will
typically have multiple API Gateway instances. If some Node Managers in the group are not
running, do not select the API Gateways on those hosts, and you can still deploy to the
other hosts in the group.
l URL field in a Connect to URL filter in a policy named GetProducts
l X.509 Certificate field in an HTTPS interface named OAuth 2.0 Interface
l URL, User Name, Password, and Signing Key fields in a Sample Active Directory
Connection
The policy developer edits the database connection, Connect to URL filter, HTTPS interface, and
LDAP connection. You can click the Environmentalize icon (globe icon on the right of the fields)
as shown in the following examples. Alternatively, press Ctrl-E to environmentalize a selected field.
Tip You must give the field focus before the Environmentalize icon is displayed.
When configuration settings have been environmentalized, the corresponding node in the Policy
Studio tree is displayed with a globe icon and bold text.
For example, using the example environmentalized settings, the following window is displayed
when you select Environment Settings > External Connections > Database Connections
> Default Database Connection:
Alternatively, you can click the Jump to configuration link, and return to the window used to edit
the configuration setting, and deselect the Environmentalize icon on this field, or press Ctrl-E.
This also removes the field as a setting to be configured under the Environment Settings tree.
The value configured before environmentalization is displayed again.
The standard way to environmentalize a certificate at group level is to click Environmentalize on
its configuration window. Environmentalizing a certificate, or any other reference field, is the same
as all other fields. For example, when you environmentalize the signing certificate in an XML
Signature filter, the Environment Settings tree where you enter environment-specific values
displays a node for the XML Signature filter. The window on the right includes a Signing Key
button to display a list of available certificates. You must select one of these certificates in
Configuration Studio or Policy Studio. This field will most likely be prepopulated in Policy Studio if
you already selected a certificate before clicking Environmentalize.
Alternatively, you can environmentalize a certificate using an alias. For example, in the development
environment, the XML Signature filter could use a certificate named MySigningCert. The policy
package (.pol) created from the development environment must be merged with an environment
package (.env) that contains a certificate with the same alias.
Note You can also environmentalize certificates using an alias at the API Gateway instance level
as described in Externalize API Gateway instance configuration on page 38. However,
certificates are normally environmentalized at the API Gateway group level as described in
this topic.
2. Browse to the directory in which to save the package, and enter its filename (for example,
c:\temp\payment.pol).
3. Click Save.
A policy package (.pol) file is created on disk. The policy developer must transfer this file to the
testing environment using some external mechanism (for example, FTP or email).
Note The steps described so far are the same for first and subsequent cycle promotions. For the
first cycle, the policy developer will most likely use the default factory configuration as
their starting point for editing the configuration. In subsequent cycles, the starting point
will most likely be the existing configuration currently deployed to the Dev Payment API
Group.
1. Open a command prompt, and change to your Configuration Studio installation directory (for
example, INSTALL_DIR\configurationstudio).
2. Enter configurationstudio to start Configuration Studio.
3. Select File > Open File.
4. Enter or browse to the location of the Policy Package (for example,
c:\temp\payment.pol).
5. Click OK.
Note The Configuration Studio opens policy packages and environment packages by opening
files available on disk. The administrator must ensure that the required files are available to
the application.
For subsequent cycle promotions, settings that are still required by the new policy package from the
development environment, and that existed in previously promoted policy packages, will have
values configured. Any certificates, keys, user, and user groups previously created will also be
shown. Environment settings that existed in previously promoted configuration but are no longer
required will be removed. New settings in the new policy package are listed with no value.
For example, assuming a first cycle promotion using the example environmentalized settings, the
following window is displayed when you select Environment Settings > External Connections
> LDAP Connections > Sample Active Directory Connection:
Note You cannot add or delete environment settings using Configuration Studio. These are
predetermined by the policy developer in the development environment.
l Manage X.509 certificates and keys on page 42
l Manage API Gateway users on page 55
Note You cannot edit the contents of the policy package file in Configuration Studio.
For example, to deploy using API Gateway Manager, perform the following steps:
1. Enter the following URL in your browser to launch API Gateway Manager:
https://127.0.0.1:8090/
2. On the Dashboard tab, select the API Gateway group in the TOPOLOGY section.
3. Click the Edit button on the right of the group, and select Deploy Configuration.
4. Select I wish to deploy configuration contained in a Policy Package and
Environment Package, and browse to the .pol and .env files.
5. Click Deploy.
The administrator will open a policy package from the development environment and the current
testing environment package (if one exists) in Policy Studio, before making the testing
environment-specific updates to the configuration. The administrator can save a policy package
(.pol) and an environment package (.env) from Policy Studio. They can deploy them as usual to
the Testing Payment API Group using API Gateway Manager or scripts. Alternatively, they can
save a single deployment package (.fed), and deploy this package.
Overview
The API Gateway provides a collection of sample scripts to enable you to automate various common
administration tasks. These scripts are based on the Jython Java scripting interpreter (see
http://www.jython.org). You can extend these scripts to suit your needs by using the Jython
language syntax. All Jython sample scripts are found in the following directory in your API Gateway
installation:
INSTALL_DIR/samples/scripts
Windows
run.bat config\getEnvSettings.py
UNIX/Linux
sh run.sh config/getEnvSettings.py
addEnvSettings.py Downloads a deployment package (.fed) from an API Gateway.
Marks the Traffic HTTP Interface port field to be
environmentalized. Creates an environment settings entry for the
port, and sets it to 7878.
getEnvSettings.py Connects to an API Gateway and lists all the fields that have been
marked for environmentalization. The associated values in
environment settings are output.
mergeEnvSettings.py Offline script that does not connect to an API Gateway. Merges a
policy package (.pol) from downstream with an environment
package (.env) from upstream, and merges them to create a
deployment package (.fed).
removeEnvSettings.py Downloads a deployment package (.fed) from an API Gateway.
Removes the Traffic HTTP Interface port field from being
environmentalized (opposite of the addEnvSettings.py script).
archive.py Downloads the current API Gateway deployment package
(.fed), policy package (.pol), and environment package
(.env)files from the Node Manager.
createDeploymentPackage.py Creates a deployment package (.fed) from policy (.pol)
and environment (.env) packages. Where the policy and
environment packages are obtained from is out of scope
for this script. For example, they could have been obtained
from a running server (see archive.py), a source code
repository (CVS, Git, SVN, and so on), or an FTP or USB
connection.
envMigrate.py Demonstrates the promotion of configuration from a
development environment to a staging environment.
Overview
When API Gateway configuration is deployed to a group, the configuration package settings are
applied to all API Gateway instances in the group. You can also specify API Gateway configuration
values on a per-API Gateway instance basis using environment variables in the
envSettings.props file. For example, you can specify different values for the port on which the
API Gateway listens for HTTP traffic, depending on the environment in which the API Gateway is
deployed.
The environment variable settings in the envSettings.props file are external to the API Gateway
core configuration. The API Gateway runtime settings are determined by a combination of external
environment variable settings and core configuration. This mechanism provides a simple and
powerful approach to configuring specific API Gateway instances in the context of API Gateway
group configuration defined in policy and environment packages.
The envSettings.props file is located in the conf d irectory of your API Gateway installation, and
is read each time the API Gateway starts up. Environment variable values specified in the
envSettings.props file are displayed as environment variable selectors in the Policy Studio (for
example, ${env.PORT.TRAFFIC}). For more details on selectors, see the API Gateway Policy
Developer Guide.
Note Environment variables in the envSettings.props file apply to the API Gateway instance
only. Configuration packages (.fed, .pol, and .env files) apply to the API Gateway
group.
env.MyCustomSetting=MyCustomValue
When the API Gateway starts up, every occurrence of the ${env.MyCustomSetting} selector is
expanded to the value of MyCustomValue. For example, by default, the HTTP port in the server
configuration is set to ${env.PORT.TRAFFIC}. Specifying a name-value pair of
env.PORT.TRAFFIC=8080 in the envSettings.props file results in the server opening up port
8080 at startup.
Example settings
The following simple example shows some environment variables set in the envSettings.props
file:
The following example shows the corresponding ${env.PORT.TRAFFIC} selector displayed in the
Configure HTTP Interface dialog. At runtime, this is expanded to the value of the
env.PORT.TRAFFIC environment variable specified in the envSettings.props file:
Example syntax
The following entry shows an example of the environment variable syntax used to specify a server
host-specific certificate:
env.serverCertificate=/[Certificates]name=Certificate Store/[Certificate]
dname=CN=MY_HOST_NAME
Alternatively, the following entry shows the syntax when the alias is the same as the Distinguished
Name:
env.serverCertificate=/[Certificates]name=Certificate Store/[Certificate]dname=MY_
ALIASED_CERT_NAME
Example settings
When the env.serverCertificate variable is specified in the envSettings.props file, the
X.509 Certificate field in the Configure HTTPS Interface d ialog can then reference its value
using the ${env.serverCertificate} selector. The following example shows the corresponding
${env.serverCertificate} selector specified at the bottom of the Select Certificate d ialog,
which is displayed by pressing the X.509 Certificate b utton.
The following example shows the ${env.serverCertificate} selector then referenced in
X.509 Certificate field:
Note In the envSettings.props file, when setting the value, you must specify escape
characters for commas using \\. For example:
env.serverCertificate=/[Certificates]name=Certificate Store/[Certificate]
dname=CN=linux-test-desktop\\,OU=QA\\,O=Saturn
Inc.\\,L=Dublin\\,ST=Dublin\\,C=IE
Overview
The Certificates and Keys node in the Configuration Studio tree enables you to manage the
X.509 certificates and keys trusted by API Gateway. These settings are environment-specific, and
typically need to be configured during promotion to an upstream environment.
For API Gateway to trust X.509 certificates issued by a specific Certificate Authority (CA), you must
import that CA's certificate into the API Gateway's trusted certificate store. For example, if API
Gateway is to trust secure communications (SSL connections or XML Signature) from an external
SAML Policy Decision Point (PDP), you must import the PDP certificate, or the issuing CA certificate
into the API Gateway certificate store.
In addition to importing CA certificates, you can import and create server certificates and private
keys in the certificate store. These can be stored locally or on an external Hardware Security Module
(HSM). You can also import and create public-private key pairs. For example, these can be used with
the Secure Shell (SSH) File Transfer Protocol (SFTP) or with Pretty Good Privacy (PGP).
l Create/Import: Click to create or import a new certificate and private key. For details, see
Configure an X.509 certificate on page 43.
l Edit: Select a certificate, and click to edit its existing settings.
l View: Select a certificate, and click to view more detailed information.
l Remove: Select a certificate, and click to remove the certificate from the certificate store.
l Keystore: Click this to export or import certificates to or from a Java keystore. For details, see
Manage certificates in Java keystores on page 54.
Create a certificate
Configure the following settings to create a certificate:
l Subject:
Click Edit to configure the Distinguished Name (DName) of the subject.
l Alias Name:
This mandatory field enables you to specify a friendly name (or alias) for the certificate.
Alternatively, you can click Use Subject to add the DName of the certificate in the text box
instead of a certificate alias.
l Public Key:
Click Import to import the subject's public key (usually from a PEM or DER-encoded file).
l Version:
This read-only field displays the X.509 version of the certificate.
l Issuer:
This read-only field displays the distinguished name of the CA that issued the certificate.
l Choose Issuer Certificate:
Select to explicitly specify an issuer certificate for this certificate (for example, to avoid a
potential clash or expiry issue with another certificate using the same intermediary certificate).
You can then click the browse button on the right to select an issuer certificate. This setting is
not selected by default.
l Not valid before:
Select a date to define the start of the validity period of the certificate.
Import certificates
You can use the following buttons to import or export certificates into the certificate store:
l Import Certificate:
Click to import a certificate (for example, from a .pem or .der file).
l Export Certificate:
Click to export the certificate (for example, to a .pem or .der file).
API Gateway supports PKCS#11-compatible HSM devices. For example, this includes Thales nShield
Solo , SafeNet Luna SA, and so on.
Configure the following fields to associate a key provided by the OpenSSL engine with the current
certificate:
l Engine name:
Enter the name of the OpenSSL engine to use to interface to an HSM. All vendor
implementations of the OpenSSL Engine API are identified by a unique name. See your vendor's
OpenSSL engine implementation or HSM documentation to find out the name of the engine.
l Key Id:
Enter the key ID used to uniquely identify a specific private key from all others stored on an HSM.
When you complete this dialog, the private key is associated with the certificate that you are
currently editing. Private keys are identified by their key ID by default.
Note To use the API Gateway's PKCS#11 engine to access objects in an external HSM, the
corresponding HSM provider and certificate realms must also be configured. For more
details, see Configure HSMs and certificate realms on page 47.
For example, on the host machine, an administrator could configure the JMS Keys certificate
realm, and create a keystore for the realm, which requires specific knowledge about the HSM (for
example, PIN, slot, and private key label). The certificate realm is the alias name, while the keystore
is the actual private keystore for the realm.
l Register an HSM provider
l List registered HSM providers
l Create a certificate realm
l List certificate realms
For example, if a policy developer is using JMS, and wants to indicate that private keys exist on an
HSM, they could indicate that the certificate is using the JMS Keys certificate realm. On each
instance using the configuration, it is the responsibility of the administrator to create the JMS Keys
certificate realm.
For more details, enter keystoreadmin in the following directory, and perform the instructions at
the command prompt:
Windows INSTALL_DIR\apigateway\Win32\bin
UNIX/Linux INSTALL_DIR/apigateway/posix/bin
1 Change When registering HSMs or configuring certificate realms, you must
group or choose the local group and instance to configure.
instance
2 List Display the HSMs that are currently registered.
registered
HSM
providers
3 Register an Before creating certificate realms, you must first register the HSM.
HSM This option guides you through the steps. The HSM must be
provider installed, configured, and active, and you must know the full path
to the HSM device driver (PKCS#11). You give the HSM an alias (for
example, LunaSA), which you use later when registering certificate
realms.
4 List List configured certificate realms and associated keystores.
Certificate
Realms
5 Create a Create a keystore and assign it to a certificate realm.
Certificate
Realm
1. Open a command prompt in the API Gateway bin directory (for example,
apigateway\Win32\bin).
2. Enter the keystoreadmin command.
3. Select option 3) Register an HSM provider.
4. If prompted, select the appropriate API Gateway group or instance.
5. You are prompted for a provider alias name. The alias is local only. For example, if registering a
LunaSA HSM, you might enter the LunaSA alias.
6. For convenience, keystoreadmin searches for supported HSM drivers. If found, it shows the
list of supported drivers. If none are found, this does not mean the driver does not exist. You
must see your HSM documentation for the location of the drivers. For example:
7. If successful, keystoreadmin loads the driver and displays its details. For example:
Initializing HSM...
Crypto Version:2.20
Manufacter Id:SafeNet, Inc.
Library Description:Chrystoki
Library Version:5.1Device registered.
1. Open a command prompt in the API Gateway bin directory (for example,
apigateway\Win32\bin).
2. Enter the keystoreadmin command.
3. Select option 5) Create a Certificate Realm.
4. You are prompted to enter a certificate realm name. This certificate realm name will be used in
Policy Studio when configuring the private key of the corresponding X.509 certificate. The
realm name is case sensitive (for example, JMS Keys).
5. The registered HSMs are listed. For example, select option 1) HSM.
6. The command connects to the selected HSM, and a list of available slots is displayed. Select the
slot containing the private key to use for the certificate realm (for example, select slot 1).
7. You are prompted to input the PIN passphrase for the slot. The passphrase will not echo any
output.
8. When you enter the correct PIN passphrase for the slot, this displays a list of private keys.
Choose the key to use for the certificate realm. For example:
Select option:2
9. You are prompted for a file name for the keystore. For example:
10. The keystore is output to the API Gateway instance directory. For example:
apigateway/groups/group-2/instance-1/conf/certrealms/jms keys.ks
Note Each API Gateway instance must have its certificate realm configured. When finished
creating certificate realms, you must restart the API Gateway instance for the changes to
take effect.
The API Gateway does not reprompt if the PIN passphrase is incorrect. It logs the error and
continues, while any services that use the certificate realm cannot use the HSM.
To configure an automatic PIN passphrase, perform the following steps:
1. Edit the API Gateway instance’s vpkcs11.xml configuration file. For example:
apigateway/groups/group-2/instance-1/conf/vpkcs11.xml
2. Add a PASSPHRASE_EXEC command that contains the full path to the script that executes and
obtains the passphrase. The script should write the passphrase to stdout, and should have the
necessary operating system file and execute protection settings to prevent unauthorized access
to the PIN passphrase. The following exampleshows a vpkcs11.xml file that invokes the
hsmpin.sh to echo the passphrase:
<ConfigurationFragment provider="cryptov">
3. The API Gateway provides the certificate realm as an argument to the script, so you can use the
same script to initialize multiple realms. The following examples show scripts that write a PIN of
1234 to stdout when initializing the JMS Keys certificate realm:
l Alias:
Enter a unique name for the key pair.
l Algorithm:
Enter the algorithm used to generate the key pair. Defaults to RSA .
l Load:
Click to select the public key or private key files to use. The Fingerprint field is auto-populated
when you load a public key.
Note The keys must be OpenSSH keys. RSA keys are supported, but DSA keys are not supported.
The keys must not be passphrase protected.
You can delete a selected key pair from the certificate store by clicking Remove on the right.
Alternatively, click Remove All.
l The following command creates an OpenSSH key:
ssh-keygen -t rsa
l The following command converts an ssh.com key to an OpenSSH key:
l The following command removes a passphrase (enter the old passphrase, and enter nothing for
the new passphrase):
ssh-keygen -p
l The following command outputs the key fingerprint:
l Alias:
Enter a unique name for the PGP key pair.
l Load:
Click Load to select the public key and private key files to use.
Note The PGP keys added must not be passphrase protected.
You can delete a selected PGP key pair from the certificate store by clicking Remove on the right.
Alternatively, click Remove All.
l The following command creates a PGP key:
gpg --gen-key
For more details, see http://www.seas.upenn.edu/cets/answers/pgp_keys.html
l The following command enables you to view the PGP key:
gpg -a --export
l The following command exports a public key to a file:
l The following command exports a private key to a file:
l The following command lists the private keys:
gpg --list-secret-keys
Similarly, you can import certificates and keys from a Java keystore into the certificate store. To do
this, click Keystore on the main Certificates window. On the Keystore window, browse to the
location of the keystore by clicking the browse button beside the Keystore field. The
certificates/keys in the keystore are listed in the table. To import any of these keys to the certificate
store, select the box next to the certificate or key to import, and click Import to Trusted
certificate store . If the key is protected by a password, you are prompted for this password.
You can also use the Keystore window to view and removeexisting entries in the keystore. You can
also add keys to the keystore and to create a new keystore. Use the appropriate button to perform
any of these tasks.
Further information
For more details on supported security features, see the API Gateway Security Guide.
By default, the API Gateway user store contains the configuration data for managing API Gateway
user information. The API Gateway user store is typically used in a development environment, and is
useful for demonstration purposes.
In a production environment, user information may be stored in existing user Identity Management
repositories such as Microsoft Active Directory, Oracle Access Manager, CA SiteMinder, and so on.
For more details, see the API Gateway Integration Guide .
Note API Gateway users provide access to the messages and services protected by API Gateway.
However, Admin users provide access to the API Gateway configuration management
features available in Policy Studio, Configuration Studio, and API Gateway Manager. For
more details, see Manage Admin users on page 1.
To specify the new user details, complete the following fields on the General tab:
l User Name:
Enter a name for the new user.
l Password:
Enter a password for the new user.
l Confirm Password:
Re-enter the user's password to confirm.
l Signing Key:
Click to load the user certificate from the Certificate Store . For details on how to create and
import certificates, see Manage X.509 certificates and keys on page 42.
You can also specify optional user attributes on the Attributes tab, which is explained in the next
section.
The Attributes tab enables you to configure user attributes as simple name-value pairs. The
following are examples of user attributes:
l role=admin
l [email protected]
l dept=eng
l company=oracle
You can add user attributes by clicking the Add button. Enter the attribute name, type, and value in
the fields provided. The Encrypted type refers to a string value that is encrypted using a well-
known encryption algorithm or cipher.
To specify the new group details, complete the following fields on the General tab:
l Group Name:
Enter a name for the new group.
l Members:
Click the Add button to display the Add Group Member dialog, and select the members to
add to the group.
You can also specify optional attributes at the group level on the Attributes tab. For more details,
see API Gateway user attributes on page 56.
To delete a specific user or group, select it in the list, and click the Remove button on the right.
Alternatively, to delete all users or Groups, click the Remove All button. You are prompted to
confirm all deletions.