You can configure your Event Endpoint Management instance (Manager) to be registered as an Event Gateway Service in IBM API Connect, which you can use to manage events and APIs in one place.
To register Event Endpoint Management instance as an Event Gateway Service:
- Add the server certificate of API Connect and the JSON Web Key Set (JWKS) endpoint as configuration in your Event Endpoint Management instance so that communications received from API Connect are trusted.
- Use the Event Gateway API and the Event Manager Manager endpoint to configure an Event Gateway Service in Cloud Manager.
Important: Ensure you install and configure an instance of both an Event Manager and an Event Gateway before configuring API Connect integration with that Event Manager instance.
To configure your Event Manager as an Event Gateway Service, complete the following steps:
Retrieve the API Connect JSON Web Key Set (JWKS) endpoint
Before beginning, you must retrieve the API Connect jwksUrl
endpoint.
- Log in to the OpenShift Container Platform web console using your login credentials.
- Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
- Expand the Project drop-down menu and select the project the API Connect instance is installed in.
- Select the API Connect operator.
- In the API Connect cluster, click the installed instance.
- In the YAML, find the
status.endpoints
section of theAPIConnectCluster
custom resource. - Retrieve the value in the
jwksUrl
field.
The value that you retrieved is required to configure trust between API Connect and Event Endpoint Management.
Configure Event Endpoint Management to trust API Connect
To allow communication between API Connect and Event Endpoint Management, you must add the certificate presented on the jwksUrl
endpoint to Event Endpoint Management as a trusted certificate. Additionally, you must provide a JWKS endpoint, which will be used to authenticate messages received from API Connect.
-
Download the server certificate from an API Connect endpoint, either by opening the URL in a browser, or by running the following command and then copying the certificate details into a file:
openssl s_client -connect <jwksUrl value>
Where
<jwksUrl value>
is the API ConnectjwksUrl
endpoint that you retrieved earlier. -
In the Kubernetes cluster running Event Endpoint Management, create a secret that contains the downloaded certificate. Create a secret to store the API Connect certificate as follows.
-
Using the OpenShift Container Platform UI:
- Log in to the OpenShift Container Platform web console using your login credentials.
- Expand the Workloads drop-down menu and select Secrets.
- Expand the Project drop-down menu and select the project the Event Endpoint Management instance is installed in.
- Expand the Create drop-down menu and select Key/value secret.
- Enter
apim-cpd
as the Secret name. - Enter
ca.crt
as the Key. - Under Value, select Browse…, and then select the certificate that you downloaded.
- Click Create.
-
Using the CLI:
-
Run the following command to get a Base64 encoded string of the certificate that you downloaded:
cat <path to the certificate> | base64
- Log in to your Kubernetes cluster as a cluster administrator by setting your
kubectl
context. -
Run the following command to create a secret called
apim-cpd
:cat <<EOF | kubectl apply -f - apiVersion: v1 kind: Secret metadata: name: apim-cpd namespace: <namespace the Event Endpoint Management instance is installed in> data: ca.crt: >- <base64-certificate> type: Opaque EOF
Where:
<namespace>
is the namespace the Event Endpoint Management instance is installed in.<base64-certificate>
is the Base64 encoded certificate that you obtained in step 1.
-
-
-
Update the
EventEndpointManagement
instance with the API Connect configuration details:-
On OpenShift Container Platform:
Use the web console to edit the configuration of the
EventEndpointManagement
instance:- Log in to the OpenShift Container Platform web console using your login credentials.
- Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
- Expand the Project dropdown and select the project the instance is installed in. Click the operator called IBM Event Endpoint Management.
- Click the Event Endpoint Management tab and search the Name column for the installed instance and click the name.
- Click the YAML tab to edit the custom resource.
-
In the
spec.manager
field, add the following snippet:apic: jwks: endpoint: <jwksUrl>
-
In the
spec.manager.tls
field, add the following snippet:trustedCertificates: - certificate: ca.crt secretName: apim-cpd
- Click Save to apply your changes.
-
On other Kubernetes platforms:
On other Kubernetes platforms, you can either edit the configuration of your
EventEndpointManagement
instance by using thekubectl edit
command, or modify your original configuration file as follows.- Log in to your Kubernetes cluster as a cluster administrator by setting your
kubectl
context. -
Ensure you are in the namespace where your Event Endpoint Management instance is installed:
kubectl config set-context --current --namespace=<namespace>
-
Update your
EventEndpointManagement
instance’s YAML file on your local system. In thespec.manager
field, add the following snippet:apic: jwks: endpoint: <jwksUrl>
-
Also in the YAML, in the
spec.manager.tls
field, add the following snippet:trustedCertificates: - certificate: ca.crt secretName: apim-cpd
-
Apply the YAML to the Kubernetes cluster:
kubectl apply -f <file_name>
- Log in to your Kubernetes cluster as a cluster administrator by setting your
-
Enabling mutual TLS
JSON Web Token (JWT) authentication is used by default to verify messages that are received from API Connect and cannot be disabled. All communications the Event Gateway Service receive from API Connect contain a JWT, and the JWKS endpoint you provided earlier is used to validate this token to ensure the authenticity of each message.
Based on your security requirements, you can optionally choose to also enable mutual TLS (MTLS), which uses certificates for authentication:
On OpenShift Container Platform
Use the web console to modify the EventEndpointManagement
instance’s configuration:
- Log in to the OpenShift Container Platform web console using your login credentials.
- Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
- Expand the Project dropdown and select the project the instance is installed in. Click the operator called IBM Event Endpoint Management.
- Click the Event Endpoint Management tab and search the Name column for the installed instance and click the name.
- Click the YAML tab to edit the custom resource.
-
In the
spec.manager.apic
field, add the following snippet:clientSubjectDN: CN=<commonname>
Where
<commonname>
is the Common Name on the certificates that are used when making the TLS client profile. - Click Save to apply your changes.
On other Kubernetes platforms
On other Kubernetes platforms you can either edit the configuration of your EventEndpointManagement
instance by using the kubectl edit
command, or modify your original configuration file as follows.
- Log in to your Kubernetes cluster as a cluster administrator by setting your
kubectl
context. -
Ensure you are in the namespace where your Event Endpoint Management instance is installed:
kubectl config set-context --current --namespace=<namespace>
-
Update your
EventEndpointManagement
instance’s YAML file on your local system. In thespec.manager.apic
field, add the following snippet:clientSubjectDN: CN=<commonname>
Where
is the Common Name on the certificates that are used when making the TLS client profile. -
Apply the YAML to the Kubernetes cluster:
kubectl apply -f <file_name>
Registering Event Endpoint Management as an Event Gateway Service in API Connect
After configuring the Event Endpoint Management to trust API Connect, register the Event Endpoint Management as an Event Gateway Service as follows:
Obtain certificates for a TLS client profile on OpenShift
- Expand the Workloads drop-down menu and select Secrets.
- Expand the Project drop-down menu and select the project the Event Endpoint Management instance is installed in.
- Use the search bar to locate the secret named
<Event Endpoint Management Manager instance name>-ibm-eem-manager
and click the secret. - Scroll down to the
Data
section. - Copy the ca.crt and save it in a file called
cluster-ca.pem
- Copy the tls.crt and save it in a file called
manager-client.pem
- Copy the tls.key and save it in a file called
manager-client-key.pem
N.b if you provided your own certificate via a secret for the eem manager use the data stored in that
For more information on these certificates, see the API Connect documentation.
Obtain certificates for a TLS client profile on other Kubernetes platforms
- Log in to your Kubernetes cluster as a cluster administrator by setting your
kubectl
context. -
Ensure you are in the namespace where your Event Endpoint Management instance is installed:
kubectl config set-context --current --namespace=<namespace>
-
Display the secret for your
EventEndpointManagement
instance, it will have the name<instance_name>-ibm-eem-manager
.kubectl get secret <instance_name>-ibm-eem-manager -o yaml
- Copy the ca.crt and save it in a file called
cluster-ca.pem
- Copy the tls.crt and save it in a file called
manager-client.pem
- Copy the tls.key and save it in a file called
manager-client-key.pem
Note: If you provided your own certificate through a secret for the Event Manager, use the data stored in the secret.
For more information about these certificates, see the API Connect documentation.
Navigate to Cloud Manager
- Expand the Networking dropdown and select Routes.
- Expand the Project drop-down menu and select the project the API Connect instance is installed in.
- Use the search bar to find the route with the Name ending in
admin
. Click the URL in the Location column. This takes you to the Cloud Manager UI.
Create a TLS Client Profile
Create the TLS Client profile to use when contacting the Event Gateway Service through the management endpoint.
- Create a client TLS keystore. Go to Home > Resources > TLS > Keystore and click Create.
- Upload the
manager-client-key.pem
into Step 1. - Upload the
manager-client.pem
into Step 2. - Click Save.
- Create a client TLS truststore. Go to Truststore and click Create.
- Upload the
cluster-ca.pem
. - Click Save.
- Create a TLS client profile. Go to TLS client profile and click Create.
- Choose the keystore and truststore you created.
- Tick Allow insecure server connections.
- Click Save.
Retrieving the Event Gateway management endpoint
To register an Event Endpoint Management instance with API Connect, you must provide an endpoint which defines where configuration updates from API Connect are sent. This is referred to as the Service Endpoint when registering an Event Gateway Service in the Cloud Manager. This endpoint can be retrieved from Event Endpoint Management as follows:
Using the OpenShift web console
- Log in to the OpenShift Container Platform web console using your login credentials.
- Expand the Networking dropdown and select Routes.
- Expand the Project drop-down menu and select the project the Event Endpoint Management instance is installed in.
- Use the search bar to find the route with the Name ending in
apic
. The URL in the Location column is the management endpoint.
Using the CLI
- Log in to your Kubernetes cluster as a cluster administrator by setting your
kubectl
context. -
Ensure you are in the namespace where your Event Endpoint Management instance is installed:
kubectl config set-context --current --namespace=<namespace>
-
List the ingress resources and locate the API Connect ingress for your instance, unless overridden the name ends in
-apic
.kubectl get ingress
- Obtain the URL for the ingress resource from the Host column.
Retrieving the Event Gateway client endpoint
To register an Event Endpoint Management instance with API Connect, you must provide an endpoint which defines where clients should connect to in order to consume events. Depending where you have deployed your Event Gateway, the steps to retrieve the client endpoint will differ:
OpenShift cluster deployment
- Log in to the OpenShift Container Platform web console using your login credentials.
- Expand the Networking dropdown and select Routes.
- Expand the Project drop-down menu and select the project the Event Gateway instance is installed in.
- Use the search bar to find the route with the Name ending in
ibm-egw-rt
. The URL in the Location column is the client endpoint. - Having retrieved the Location value, remove the
https://
protocol prefixing the endpoint, and append the port:443
as a suffix.
Other Kubernetes platforms
- Log in to your Kubernetes cluster as a cluster administrator by setting your
kubectl
context. -
Ensure you are in the namespace where your Event Gateway instance is installed:
kubectl config set-context --current --namespace=<namespace>
-
List the ingress resources and locate the API Connect ingress for your instance, unless overridden the name ends in
-ibm-egw-rt
.kubectl get ingress
- Obtain the URL for the ingress resource from the Host column.
Stand-alone deployment
When deployed as a stand-alone gateway, the client endpoint value to use will be the name of the docker host running the gateway, and the GATEWAY_PORT
value specified when starting the gateway container.
Register Event Endpoint Management as an Event Gateway Service
To socialize the Event Gateway client endpoint, register the Event Gateway through the Cloud Manager as follows.
- In the Cloud Manager UI, select Topology > Register Service > Event Gateway Service.
- Enter a title and an optional summary.
- In the Service endpoint field, enter the management endpoint that you obtained earlier.
- Select the TLS client profile that you created earlier from the TLS client profile drop-down menu.
- In the API invocation endpoint field, enter the Event Gateway API endpoint that you obtained earlier.
- Use the default TLS server profile that API Connect provides from the drop-down menu.
- Click Save.
The Cloud Manager UI displays a notification to indicate the Event Gateway Service is successfully registered. You can now export an AsyncAPI to use in API Connect.