Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 7a16061

Browse files
author
Chris Wiechmann
authored
Merge pull request #165 from Axway-API-Management-Plus/apigateway-only
Adding support for an Apigateway only environment
2 parents a378e0f + 7ca6ec9 commit 7a16061

36 files changed

+254
-71
lines changed

.github/workflows/apibuilder4elastic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
env:
135135
ELASTICSEARCH_HOSTS: 'http://localhost:9200'
136136
VALIDATE_CONFIG: false
137+
ELASTICSEARCH_SSL_VERIFICATIONMODE: false
137138
LOG_LEVEL: DEBUG
138139
DISABLE_SETUP_FLOWS: true # Disable Elasticsearch setup flows for the tests.
139140
CI: true

.github/workflows/logstash.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
VALIDATE_ELASTIC_CONNECTION: false
2121
ENABLE_HTTP_PORT: true
2222
ELASTICSEARCH_HOSTS: http://any.es-host.com:9200
23+
ELASTICSEARCH_SSL_VERIFICATIONMODE: false
2324
memcached:
2425
image: memcached:1.6.6-alpine
2526
ports:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
- Added a warning when running Logstash or Elasticsearch with default minimal parameters (when using docker-compose) [#163](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/163)
1111
- Added a new visualization: Status by API to all API-Overview dashboards showing Success, Failure/Blocked and Failed status per API
1212
- Added tag kpis to the KPI-Dashboard
13+
- Added new parameter: `API_MANAGER_ENABLED` to allow running the solution without an API-Manager at all
14+
- Updated default Elastic-Stack version from 7.16.3 to 7.17.0
1315

1416
### Security
1517
- Mocha in API-Builder4Elastic updated to version 9.2.0 to solve https://nvd.nist.gov/vuln/detail/CVE-2021-23566

UPDATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ On the other hand, the API builder Docker image, as a central component of the s
3737

3838
| Ver | API-Builder | Logstash | Memcached | Filebeat | ANM-Config | Dashboards | Params |Elastic-Config | ELK-Ver.| Notes |
3939
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |:---: | :---: | :--- |
40-
| 4.2.0 | - | - | - | - | - | [X](#dashboards)| - |- | [7.16.3](#update-elastic-stack-version) | Unreleased |
40+
| 4.2.0 | - | - | - | - | - | [X](#dashboards)| [X](#parameters)|- | [7.16.3](#update-elastic-stack-version) | Unreleased |
4141
| 4.1.0 | [X](#api-builderlogstashmemcached) | - | - | - | - | - | [X](#parameters)|[X](#elastic-config)| [7.16.3](#update-elastic-stack-version) | |
4242
| 4.0.3 | - | - | - | - | - | - | - |- | [7.16.2](#update-elastic-stack-version) | |
4343
| 4.0.2 | - | - | - | - | - | - | - |- | [7.16.1](#update-elastic-stack-version) | See #154 |

apibuilder4elastic/conf/axway-api-utils.default.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = {
99
'apimanager': {
1010
url: process.env.API_MANAGER, // If not set, the Admin-Node-Manager hostname is used
1111
username: process.env.API_MANAGER_USERNAME, // User with Admin-Privileges required
12-
password: process.env.API_MANAGER_PASSWORD
12+
password: process.env.API_MANAGER_PASSWORD,
13+
enabled: ("false" == process.env.API_MANAGER_ENABLED) ? false : true // Makes it possible to use the solution without an API-Manager at all
1314
},
1415
// Which file to use for the local API-Lookup
1516
localLookupFile: process.env.API_BUILDER_LOCAL_API_LOOKUP_FILE,

apibuilder4elastic/conf/default.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ module.exports = {
3131

3232
// The interval in milliseconds in which API-Builder will poll all configured API-Managers for their KPIs. Defaults to 3600000 (which is 1 hour)
3333
managementKPIsInterval: process.env.MANAGEMENT_KPIS_INTERVAL || '3600000',
34-
managementKPIsEnabled: ("false" == process.env.MANAGEMENT_KPIS_ENABLED) ? false : true,
34+
// Management KPI will be disabled also, if the API-Manager is disabled
35+
managementKPIsEnabled: ("false" == process.env.MANAGEMENT_KPIS_ENABLED || "false" == process.env.API_MANAGER_ENABLED) ? false : true,
3536

3637
// This path is optional and if given used to adjust the ILM-Configuration.
3738
retentionPeriodConfigFile: process.env.RETENTION_PERIOD_CONFIG || 'NotSet',

apibuilder4elastic/conf/elasticsearch.default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ module.exports = {
1515
// The name to identify the client instance in the events.
1616
name: process.env.ELASTICSEARCH_CLIENT_NAME || 'apibuilder4elastic',
1717
// You can use all configuration options documented here:
18-
// https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/client-configuration.html
18+
// https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/master/client-configuration.html
1919
maxRetries: 5,
2020
requestTimeout: 60000,
2121
ssl: {
22-
ca: ("false" == process.env.ELASTICSEARCH_SSL_VERIFICATIONMODE) ? fs.readFileSync(process.env.ELASTICSEARCH_CA) : "",
22+
ca: ("false" == process.env.ELASTICSEARCH_SSL_VERIFICATIONMODE) ? "" : fs.readFileSync(process.env.ELASTICSEARCH_CA),
2323
rejectUnauthorized: ("false" == process.env.ELASTICSEARCH_SSL_VERIFICATIONMODE) ? false : true
2424
}
2525
},

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/config/axway-api-utils.default.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = {
99
'apimanager': {
1010
url: process.env.API_MANAGER, // If not set, the API-Gateway hostname is used
1111
username: process.env.API_MANAGER_USERNAME, // User with Admin-Privileges required
12-
password: process.env.API_MANAGER_PASSWORD
12+
password: process.env.API_MANAGER_PASSWORD,
13+
enabled: (!process.env.API_MANAGER_ENABLED) ? process.env.API_MANAGER_ENABLED : true // Makes it possible to use the solution without an API-Manager at all
1314
},
1415
// This is true, when running as part of the CI-Pipeline (GitHub Actions)
1516
// If true, some test API-Requests are then mocked

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@axway/api-builder-test-utils": "^1.3.0",
2828
"chai": "^4.3.4",
2929
"decache": "^4.6.0",
30-
"dotenv": "^10.0.0",
30+
"dotenv": "^14.2.0",
3131
"mocha": "^9.1.2",
3232
"nock": "^13.1.1",
3333
"simple-mock": "^0.8.0"

0 commit comments

Comments
 (0)