Axway Agent for provisioning AsyncAPIs into Solace Brokers.
- Solace-Axway-Agent polls Axway Central for
subscriptions
(statessubscribing
orunsubscribing
). - Solace-Axway-Agent registers a
Subscription Schema
for Webhooks in Axway Central - Solace-Axway-Agent polls Axway Central for Axway Catalog Items that are marked as
Webhook Enabled
and assigns theSubscription Schema
For each subscribing
subscription Solace-Axway-Agents deploys in Solace-Connector:
- The associated AsyncAPI as
API
- A
Product
with theAPI
- A
Team
- A
TeamApp
with theProduct
assigned 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:
User
for theTeam
ACLs
assigned to that User- optionally
Queues
- optionally
RDPs
(Rest Delivery Points)
For each unsubscribing
subscription Solace-Axway-Agents undeploys in Solace-Connector
TeamApp
Product
Solace-Connector removes in Solace Broker:
User
ACLs
- 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-sdk
is 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 & Org
menu and selectOrganization
. - Click the
Service Accounts
tab from the left navigation. - Click the
+
Service Account
button in the upper-right corner. - Enter the service account name and optionally add a description.
- In the Authentication section, select
Client Certificate
to authenticate the service account.- Select
Provide public key
to 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.yml
file. 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.yml
configuration 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/central
curl 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/agent
is 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.pem
andCENTRAL_AUTH_PRIVATEKEY=/path/to/public_key.pem
CENTRAL_AUTH_PRIVATEKEY_DATA
andCENTRAL_AUTH_PUBLIC_DATA
must not be set
- Option b) share key-pair as environment variable
CENTRAL_AUTH_PRIVATEKEY=/path/to/private_key.pem
andCENTRAL_AUTH_PRIVATEKEY=/path/to/public_key.pem
must point to read-and-write file location/opt/agent
is writeable for SOLACE-AXWAY-AGENT- pointing to
/opt/agent
as key-location could be a security risk as private-key data is written to this mount-point. CENTRAL_AUTH_PRIVATEKEY=/opt/agent/private_key.pem
CENTRAL_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_DATA
andCENTRAL_AUTH_PUBLIC_DATA
must 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.pem
to 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