Enabling the API Connect plug-in on Red Hat Developer Hub
Install and configure the API Connect plug-in on Red Hat Developer Hub.
Red Hat Developer Hub is a developer platform for building Developer Portals and has developed
several plug-ins for Backstage to further enhance its capabilities within the Developer Portal. The
dynamic plug-in support is based on the backend plug-in manager package, which is a service that
scans a designated root directory, dynamicPlugins.rootDirectory, for dynamic
plug-in packages and loads them as needed. You can use the dynamic plug-ins that are preinstalled
with Red Hat Developer Hub or install additional dynamic plug-ins from a public NPM registry.
Prerequisites
To configure the plug-in successfully on Red Hat Developer Hub, the following requirements must be met:
- A working Red Hat application must be installed and configured.Note: Red Hat Developer Hub is an external service and needs to be installed on a separate server that is external to API Connect. You do not need to make any changes to the API Connect deployment to set up the plug-in.
- The API Connect
support agreement covers only the API Connect plug-in. The
customer is responsible for the deployment and installation of the Backstage server.Note: If you encounter any issues with Red Hat Developer Hub, contact Red Hat by raising a Red Hat support case to address the issue.
Installing API Connect Backstage Plugin from Redhat Developer Hub marketplace
Starting with Red Hat Developer Hub version 1.7, you can install the API Connect Backstage plug-in directly from the Red Hat Developer Hub Marketplace.
Before installation, ensure that installing plugins from the Marketplace is enabled in your environment. To find the plug-in, search API Connect Backstage Plugin in the Marketplace.
To complete the setup, provide the plug-in configuration as specified in the plug-in catalog information.
plugins:
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/apic-backstage:bs_1.39.1__1.0.0!apic-backstage
disabled: false
pluginConfig:
ibm:
schedule: '* * * * *'
apic:
- name: apic-instance-1
url: APIC_API_URL
clientId: 'APIC_CLIENT_ID'
clientSecret: 'APIC_SECRET'
username: 'PORG_USERNAME'
password: 'PORG_PASSWORD'
identityProvider: 'default-idp-2' # Default Local User Registry
- name: apic-instance-2
url: APIC_API_URL
clientId: 'APIC_CLIENT_ID'
clientSecret: 'APIC_SECRET'
apiKey: my-api-key # OIDC Registry
Here, - URL
- The value that corresponds to the
endpoint. - client_id
- The value that corresponds to the
cliendId. - client_secret
- The value that corresponds to the
clientSecret. - identityProvider
- This value can be obtained by running the following API Connect CLI
command:
apic identity-providers:list --scope provider --server myserver.com --fields title,realm - apikey
- The value that corresponds to the generated
apiKey.
Installing and configuring the API Connect plug-in on Red Hat Developer Hub
To install the plug-in on Red Hat Developer Hub, see Installing dynamic plug-ins.
- package: 'apic-backstage'
integrity: 'REPLACE_INTEGRITY'
disabled: false
pluginConfig:
ibm:
schedule: '* * * * *'
apic:
- name: apic-instance-1
url: APIC_API_URL
clientId: 'APIC_CLIENT_ID'
clientSecret: 'APIC_SECRET'
username: 'PORG_USERNAME'
password: 'PORG_PASSWORD'
identityProvider: 'default-idp-2' # Default Local User Registry
- name: apic-instance-2
url: APIC_API_URL
clientId: 'APIC_CLIENT_ID'
clientSecret: 'APIC_SECRET'
apiKey: my-api-key # OIDC Registry
Here, - URL
- The value that corresponds to the
endpoint. - client_id
- The value that corresponds to the
cliendId. - client_secret
- The value that corresponds to the
clientSecret. - identityProvider
- This value can be obtained by running the following API Connect CLI
command:
apic identity-providers:list --scope provider --server myserver.com --fields title,realm - apikey
- The value that corresponds to the generated
apiKey.
credentials.json for apic-instance-1 in this code
is:{
"cloud_id": "<instance1-cloudID>",
"toolkit": {
"endpoint": "https://api.<instance1>com/api",
"client_id": "<instance1-clientID>",
"client_secret": "<instance1-clientSecret>"
},
"consumer_toolkit": {
...
},
...
}URL,
ClientId, and ClientSecret. For more information, see https://www.ibm.com/docs/en/api-connect/10.0.x?topic=configuration-installing-toolkit#task_qsv_cgq_nt__download_creds. - Using a local user registry
If the user details are located in a local user registry, you must provide the
identityProviderdetails,username, andpasswordas shown in the example forapic-instance-1. - Using an OIDC registry
If the user details are located in an OIDC registry, you must provide the
apiKeydetails. Follow the instructions below to add the API key:- Edit the time period for when the API key expires, and authorize it to be used multiple times. For more information, see Configuring API key settings.
- Create an API key. For more information, see Managing platform REST API keys.
- Add the generated API key to the configuration as shown in the example for
apic-instance-2.