Axway Agent for provisioning AsyncAPIs into Solace Brokers.
- Solace-Axway-Agent polls Axway Central for
subscriptions(statessubscribingorunsubscribing). - Solace-Axway-Agent registers a
Subscription Schemafor Webhooks in Axway Central - Solace-Axway-Agent polls Axway Central for Axway Catalog Items that are marked as
Webhook Enabledand assigns theSubscription Schema
For each subscribing subscription Solace-Axway-Agents deploys in Solace-Connector:
- The associated AsyncAPI as
API - A
Productwith theAPI - A
Team - A
TeamAppwith theProductassigned to
Solace-Axway-Agent shares by Email and / or HTTP-Notification Call
- Credentials to be used to connect to Solace Broker
- Username and Password
Solace-Connector provisions into Solace Broker:
Userfor theTeamACLsassigned to that User- optionally
Queues - optionally
RDPs(Rest Delivery Points)
For each unsubscribing subscription Solace-Axway-Agents undeploys in Solace-Connector
TeamAppProduct
Solace-Connector removes in Solace Broker:
UserACLs- optionally
Queues - optionally
RDPs
- Golang (v 1.16+)
- Make
- Docker and Docker-Compose for integration tests
- Solace-Axway-Agent is based on solace-iot-team/agent-sdk which is a fork of Axway/agent-sdk
- how to import
agent-sdkis documented inline ingo.mod
- how to import
- Checkout repository
- Build project
make build - Linter
make lint
Solace-Connector and Notifier HTTP-Clients are generated. Detailed information is located in /specs
- Detailed information in
/testing/README.md
-
Create Public/Private Key Pair as
PEM-filesopenssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048 -
Create Amplify Service Account
- Sign in to the Amplify Platform.
- Click on the
User & Orgmenu and selectOrganization. - Click the
Service Accountstab from the left navigation. - Click the
+Service Accountbutton in the upper-right corner. - Enter the service account name and optionally add a description.
- In the Authentication section, select
Client Certificateto authenticate the service account.- Select
Provide public keyto upload your public key for your certificate created in the previous step.
- Select
- Click
Save.
- Solace Connector solace-iot-team/platform-api
- Connector URL
- Connector Admin username and password
- Connector Org-Admin username and password
For each Axway Environment a Solace Connector Organization must be provisioned (by convention: same names)
Configuration of the agent can get provided by a config-file ('solace_axway_agent.yml') or by defining environment variables (still a minimum config-file must be provided, see sample/sample_min_solace_axway_agent.yml).
- Prepare and configure
solace_axway_agent.ymlfile. Sample is located in sample/sample_solace_axway_agent.yml - Or set environment variables. Sample is located in
sample/- Although all configuration options can get defined via environment variables, Solace-Axway-Agent must have access to a minimum
solace_axway_agent.ymlconfiguration file. This file can get located alongside the executable (same directory) or the directory containing the configuration file can get defined as option--pathConfig
- Although all configuration options can get defined via environment variables, Solace-Axway-Agent must have access to a minimum
./solace-axway-agent --pathConfig /Users/jt/myproject/solace/axway-agent/solace-agent-config
Health checks (accessibility) of Axway Central and Solace Connector can get accessed via a web service exposed by the agent:
Sample of an agent running on localhost:
curl http://localhost:8989/status/centralcurl http://localhost:8989/status/solace
The Solace-Axway-Agent Docker Container is described in this Dockerfile.
- Solace-Axway-Agent is executed as user
AGENT(uid=9999,gid=9999) - Path
/opt/agentis read and writeable for user AGENT - Providing key-pair for Axway Central
- Option a) make key-pair accessible through file-mount and point Solace-Axway-Agent to this mount point
CENTRAL_AUTH_PRIVATEKEY=/path/to/private_key.pemandCENTRAL_AUTH_PRIVATEKEY=/path/to/public_key.pemCENTRAL_AUTH_PRIVATEKEY_DATAandCENTRAL_AUTH_PUBLIC_DATAmust not be set
- Option b) share key-pair as environment variable
CENTRAL_AUTH_PRIVATEKEY=/path/to/private_key.pemandCENTRAL_AUTH_PRIVATEKEY=/path/to/public_key.pemmust point to read-and-write file location/opt/agentis writeable for SOLACE-AXWAY-AGENT- pointing to
/opt/agentas key-location could be a security risk as private-key data is written to this mount-point. CENTRAL_AUTH_PRIVATEKEY=/opt/agent/private_key.pemCENTRAL_AUTH_PUBLICKEY=/opt/agent/public_key.pem
- pointing to
- as SOLACE-AXWAY-AGENT is not executed as ROOT the mount-path must be writeable for NON-ROOT user (uid=9999, gid=9999)
CENTRAL_AUTH_PRIVATEKEY_DATAandCENTRAL_AUTH_PUBLIC_DATAmust contain key data as one-liner- To convert PEM files into environment variable format use
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' cert-name.pemto transform it to a one-liner
- To convert PEM files into environment variable format use
- Option a) make key-pair accessible through file-mount and point Solace-Axway-Agent to this mount point