From d4230dc73175e0c83819b13435a941afb7fee90e Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 17 Feb 2022 16:16:25 +0100 Subject: [PATCH] Update config pdp naming --- config.js | 6 +++--- config.js.template | 2 +- lib/config_service.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.js b/config.js index 4bb18ab..6d7e444 100644 --- a/config.js +++ b/config.js @@ -2,7 +2,7 @@ const config = {}; // Used only if https is disabled -config.pep_port = 3001; +config.pep_port = 3003; // Set this var to undefined if you don't want the server to listen on HTTPS config.https = { @@ -52,10 +52,10 @@ config.cache_time = 300; // This is only compatible with oauth2 tokens engine config.authorization = { - enabled: false, + enabled: true, pdp: 'idm', // idm|iShare|xacml|authzforce header: undefined, // NGSILD-Tenant|fiware-service - pdp: { + location: { protocol: 'http', host: 'localhost', port: 8080, diff --git a/config.js.template b/config.js.template index 5544148..da63f40 100644 --- a/config.js.template +++ b/config.js.template @@ -55,7 +55,7 @@ config.authorization = { enabled: false, pdp: 'idm', // idm|iShare|xacml|authzforce header: undefined, // NGSILD-Tenant|fiware-service - pdp: { + location: { protocol: 'http', host: 'localhost', port: 8080, diff --git a/lib/config_service.js b/lib/config_service.js index cbe624a..56ceb2c 100644 --- a/lib/config_service.js +++ b/lib/config_service.js @@ -223,7 +223,7 @@ function process_environment_variables(verbose) { } config.authorization.pdp = pdp; config.authorization.azf = config.authorization.azf || {}; - config.authorization[pdp] = config.authorization[pdp] || {}; + config.authorization[pdp] = config.authorization.location || {}; if (process.env.PEP_PROXY_PDP_PROTOCOL) { config.authorization[pdp].protocol = process.env.PEP_PROXY_PDP_PROTOCOL;