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

Commit 7ebe2f6

Browse files
author
Chris Wiechmann
committed
replacedUri is now a local variable.
Fixed #110
1 parent a61ff6c commit 7ebe2f6

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
8-
### Changed/Fixed
8+
### Changed
99
- Helm-Chart for Filebeat now creates a dedicated ConfigMap: `...tic-filebeat-env-config` for environment properties and `...tic-filebeat-config` for the filebeat.yaml
1010
- Helm-Chart now expects files given in `/var/<logType>` instead of `/var/log/<logType>`, as `var/log` was causing the error: read-only file system: unknown when trying to mount the directories
1111
- Helm-Chart now expects the Cluster-UUID for Filebeat given in `filebeat.elasticsearchClusterUUID` instead of `filebeat.filebeatSecrets.elasticsearchClusterUUID`
1212

13+
### Fixed
14+
- Potential race condition, when using External-HTTP-Based AuthZ [#110](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/110)
15+
1316
## [3.0.0] 2021-05-11
1417
### Added
1518
- New option to skip Elasticsearch in ANM and instead still use the OPSDB by providing an extra REST-API parameter [#105](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/105)

UPDATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ On the other hand, the API builder Docker image, as a central component of the s
5050
| 2.4.1 | [X](#api-builderlogstashmemcached) | - | - | - | - | - | - |- | 7.10.0 | |
5151
| 2.4.2 | [X](#api-builderlogstashmemcached) | - | - | - | - | - | - |[X](#elastic-config)| 7.10.0 | |
5252
| 3.0.0 | [X](#api-builderlogstashmemcached) | - | - | - | - | - | [X](#parameters)|- | 7.12.1 | |
53+
| 3.0.1 | [X](#api-builderlogstashmemcached) | - | - | - | - | - | - |- | 7.12.1 |Not yet released|
5354

5455
### Update from Version 1.0.0
5556

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-authorization/src/actions.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,19 @@ async function addExtHTTPAuthzFilter(params, options) {
127127
logger.debug(`User authorization skippped as the user an API-Gateway Admin`);
128128
return elasticQuery;
129129
}
130+
logger.debug(`Caching external user authorization information using key: 'ExtAuthZ###${user.loginName}'`);
130131
const cacheKey = `ExtAuthZ###${user.loginName}`;
131132
var cfg = authZConfig.externalHTTP;
133+
var replacedUri;
132134
if(!cache.has(cacheKey)) {
133135
if(createRequestUri) {
134-
cfg.replacedUri = await createRequestUri(user, cfg, options);
135-
logger.debug(`Request URI created: ${cfg.replacedUri}`);
136+
replacedUri = await createRequestUri(user, cfg, options);
137+
logger.debug(`Request URI created: ${replacedUri}`);
136138
} else {
137139
throw new Error(`Missing method: createRequestUri. You have to defined the createRequestUri method to create the request URI.`);
138140
}
139-
logger.info(`External groups NOT found in cache with key: '${cacheKey}'. Going to request information from ${cfg.replacedUri}`);
140-
const resp = await requester(cfg.replacedUri, cfg.headers, cfg.method, cfg.body, { logger, ...cfg.options });
141+
logger.info(`External groups NOT found in cache with key: '${cacheKey}'. Going to request information from ${replacedUri}`);
142+
const resp = await requester(replacedUri, cfg.headers, cfg.method, cfg.body, { logger, ...cfg.options });
141143
cache.set(cacheKey, resp);
142144
} else {
143145
logger.debug(`External groups found in cache with key: '${cacheKey}'.`);

0 commit comments

Comments
 (0)