{"id":22359341,"url":"https://github.com/solace-iot-team/solace-axway-agent","last_synced_at":"2025-03-26T14:15:28.316Z","repository":{"id":40405490,"uuid":"387735362","full_name":"solace-iot-team/solace-axway-agent","owner":"solace-iot-team","description":"Axway-Solace-AsyncAPI Agent","archived":false,"fork":false,"pushed_at":"2022-05-10T13:55:58.000Z","size":6260,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T15:20:00.793Z","etag":null,"topics":["apimanagement","asyncapi","solace"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solace-iot-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-20T09:09:13.000Z","updated_at":"2022-10-25T13:17:44.000Z","dependencies_parsed_at":"2022-08-09T19:31:03.172Z","dependency_job_id":null,"html_url":"https://github.com/solace-iot-team/solace-axway-agent","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solace-iot-team%2Fsolace-axway-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solace-iot-team%2Fsolace-axway-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solace-iot-team%2Fsolace-axway-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solace-iot-team%2Fsolace-axway-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solace-iot-team","download_url":"https://codeload.github.com/solace-iot-team/solace-axway-agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245668638,"owners_count":20653008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apimanagement","asyncapi","solace"],"created_at":"2024-12-04T15:21:02.899Z","updated_at":"2025-03-26T14:15:28.294Z","avatar_url":"https://github.com/solace-iot-team.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![integration-test](https://github.com/solace-iot-team/solace-axway-agent/actions/workflows/integration-test.yml/badge.svg)](https://github.com/solace-iot-team/solace-axway-agent/actions/workflows/integration-test.yml) \n[![release-version-check](https://github.com/solace-iot-team/solace-axway-agent/actions/workflows/release-version-check.yml/badge.svg)](https://github.com/solace-iot-team/solace-axway-agent/actions/workflows/release-version-check.yml)\n# SOLACE AXWAY AGENT\n\nAxway Agent for provisioning AsyncAPIs into Solace Brokers. \n\n## Concepts and Architecture\n\n* Solace-Axway-Agent polls Axway Central for `subscriptions` (states `subscribing` or  `unsubscribing`).\n* Solace-Axway-Agent registers a `Subscription Schema` for Webhooks in Axway Central\n* Solace-Axway-Agent polls Axway Central for Axway Catalog Items that are marked as `Webhook Enabled` and assigns the `Subscription Schema`\n\n### Axway Central - Solace-Connector \n\n### Subscribing AsyncAPIs in Axway\n\nFor each `subscribing` subscription Solace-Axway-Agents deploys in Solace-Connector:\n* The associated AsyncAPI as `API`\n* A `Product` with the `API`\n* A `Team` \n* A `TeamApp` with the `Product` assigned to\n\nSolace-Axway-Agent shares by Email and / or HTTP-Notification Call\n* Credentials to be used to connect to Solace Broker\n  * Username and Password\n\nSolace-Connector provisions into Solace Broker:\n* `User` for the `Team`\n* `ACLs` assigned to that User\n* optionally `Queues`\n* optionally `RDPs` (Rest Delivery Points)\n\n### Unsubscribing AsyncAPIs in Axway\n\nFor each `unsubscribing` subscription Solace-Axway-Agents undeploys in Solace-Connector\n* `TeamApp`\n* `Product`\n\nSolace-Connector removes in Solace Broker:\n* `User`\n* `ACLs`\n* optionally `Queues`\n* optionally `RDPs`\n\n\n## Development \n### Prerequisites\n\n* Golang (v 1.16+)\n* Make\n* Docker and Docker-Compose for integration tests\n\n### Setup Development Environment \n\n* Solace-Axway-Agent is based on [solace-iot-team/agent-sdk](https://github.com/solace-iot-team/agent-sdk) which is a fork of [Axway/agent-sdk](https://github.com/Axway/agent-sdk) \n  * how to import `agent-sdk` is documented inline in `go.mod`\n* Checkout repository\n* Build project\n  `make build`\n* Linter\n  `make lint`\n\n### Code Generation\nSolace-Connector and Notifier HTTP-Clients are generated. Detailed information is located in `/specs`\n\n### Integration Testing\n\n* Detailed information in `/testing/README.md`\n\n# How to use\n\n## Prerequisites\n\n### Axway Central\n\n* Create Public/Private Key Pair as `PEM`-files\n`openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048`\n  \n* Create Amplify Service Account\n\t* Sign in to the [Amplify Platform](https://platform.axway.com/).\n\t* Click on the `User \u0026 Org` menu and select `Organization`.\n\t* Click the `Service Accounts` tab from the left navigation.\n\t* Click the  `+`  `Service Account` button in the upper-right corner.\n\t* Enter the service account name and optionally add a description. \n\t* In the Authentication section, select `Client Certificate` to authenticate the service account.\n\t\t* Select `Provide public key` to upload your public key for your certificate created in the previous step.\n\t* Click  `Save`.\n   \n### Solace Environment\n* Solace Connector [solace-iot-team/platform-api](https://github.com/solace-iot-team/platform-api)\n   * Connector URL\n   * Connector Admin username and password\n   * Connector Org-Admin username and password\n   \nFor each Axway `Environment` a Solace Connector `Organization` must be provisioned (by convention: same names)  \n\n## Run agent\n\nConfiguration 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`).\n\n\n### Prepare `solace_axway_agent.yml` configuration\n* Prepare and configure `solace_axway_agent.yml` file. Sample is located in [sample/sample_solace_axway_agent.yml](sample/sample_solace_axway_agent.yml)\n* Or set environment variables. Sample is located in `sample/`\n  * 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`\n\n### Execute `solace-axway-agent` \n* `./solace-axway-agent --pathConfig /Users/jt/myproject/solace/axway-agent/solace-agent-config`\n\n### Check Health\n\nHealth checks (accessibility) of Axway Central and Solace Connector can get accessed via a web service exposed by the agent:\n\nSample of an agent running on localhost:\n\n* `curl http://localhost:8989/status/central`\n* `curl http://localhost:8989/status/solace`\n\n### Docker Container\nThe Solace-Axway-Agent Docker Container is described in this [Dockerfile](Dockerfile).\n\n* Solace-Axway-Agent is executed as user `AGENT` (uid=9999,gid=9999)\n* Path `/opt/agent` is read and writeable for user AGENT\n* **Providing key-pair for Axway Central** \n  * Option a) make key-pair accessible through file-mount and point Solace-Axway-Agent to this mount point\n    * `CENTRAL_AUTH_PRIVATEKEY=/path/to/private_key.pem` and `CENTRAL_AUTH_PRIVATEKEY=/path/to/public_key.pem`\n    * `CENTRAL_AUTH_PRIVATEKEY_DATA` and `CENTRAL_AUTH_PUBLIC_DATA` **must not** be set\n  * Option b)  share key-pair as environment variable\n    * `CENTRAL_AUTH_PRIVATEKEY=/path/to/private_key.pem` and `CENTRAL_AUTH_PRIVATEKEY=/path/to/public_key.pem` must point to read-and-write file location\n      * `/opt/agent` is writeable for SOLACE-AXWAY-AGENT\n        * pointing to `/opt/agent` as key-location could be a security risk as private-key data is written to this mount-point. \n        * `CENTRAL_AUTH_PRIVATEKEY=/opt/agent/private_key.pem`\n        * `CENTRAL_AUTH_PUBLICKEY=/opt/agent/public_key.pem`\n      *  as SOLACE-AXWAY-AGENT is not executed as ROOT the mount-path must be writeable for NON-ROOT user (uid=9999, gid=9999) \n    * `CENTRAL_AUTH_PRIVATEKEY_DATA` and `CENTRAL_AUTH_PUBLIC_DATA` must contain key data as one-liner \n       *  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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolace-iot-team%2Fsolace-axway-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolace-iot-team%2Fsolace-axway-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolace-iot-team%2Fsolace-axway-agent/lists"}