@nsshunt/stsconfig 1.17.1 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env-default CHANGED
@@ -104,7 +104,7 @@ AS_HOST_PORT=3002
104
104
  # Auth Server port (client port to access the service)
105
105
  AS_PORT=3002
106
106
  # Auth Server endpoint
107
- AS_APIROOT=/stsauth/v1
107
+ AS_API_ROOT=/stsauth/v1
108
108
  # Auth Server Prometheus metric support
109
109
  AS_PROM_SUPPORT=true
110
110
  # Auth Prometheus Cluster Server port (port used for cluster prometheus scrapes)
package/.env-test-file-2 CHANGED
@@ -70,7 +70,7 @@ TO_CLIENT_SECRET_FILE=testclientsecretfile
70
70
  AS_ENDPOINT=http://localhost-c
71
71
  AS_HOST_PORT=30020
72
72
  AS_PORT=30020
73
- AS_APIROOT=/stsauth/v1-c
73
+ AS_API_ROOT=/stsauth/v1-c
74
74
  AS_API_IDENTIFIER=xyz
75
75
  AS_API_IDENTIFIER_FILE=testapiidentifierFile
76
76
  AS_PROM_SUPPORT=false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsshunt/stsconfig",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "",
5
5
  "main": "stsconfig.js",
6
6
  "dependencies": {
@@ -122,14 +122,14 @@ describe("Test implicit config settings", () =>
122
122
  expect(goptions.asendpoint).toEqual('http://localhost');
123
123
  expect(goptions.ashostport).toEqual('3002');
124
124
  expect(goptions.asport).toEqual('3002');
125
- expect(goptions.asapiroot).toEqual('/stsauth/v1');
125
+ expect(goptions.asapiroot).toEqual('/stsauth/v1.0');
126
126
  expect(goptions.asprometheussupport).toEqual(true);
127
127
  expect(goptions.asprometheusclusterport).toEqual('3012');
128
128
  expect(goptions.asservicename).toEqual('STSAuth');
129
129
  expect(goptions.asserviceversion).toEqual('1.0.0');
130
130
  expect(goptions.asprivatekeypath).toEqual('/var/lib/sts/stsglobalresources/keys/private.key');
131
131
  expect(goptions.aspublickeypath).toEqual('/var/lib/sts/stsglobalresources/keys/public.key');
132
- expect(goptions.asapiidentifier).toEqual(undefined);
132
+ expect(goptions.asapiidentifier).toEqual('https://stsmda.com.au/stsauthapi/v1.0/');
133
133
  expect(goptions.asapiidentifierfile).toEqual(undefined);
134
134
  expect(goptions.asclientid).toEqual(undefined);
135
135
  expect(goptions.asclientidfile).toEqual(undefined);
@@ -129,7 +129,7 @@ describe("Test explicit default config settings", () =>
129
129
  expect(goptions.asserviceversion).toEqual('1.0.0');
130
130
  expect(goptions.asprivatekeypath).toEqual('/var/lib/sts/stsglobalresources/keys/private.key');
131
131
  expect(goptions.aspublickeypath).toEqual('/var/lib/sts/stsglobalresources/keys/public.key');
132
- expect(goptions.asapiidentifier).toEqual(undefined);
132
+ expect(goptions.asapiidentifier).toEqual('https://stsmda.com.au/stsauthapi/v1.0/');
133
133
  expect(goptions.asapiidentifierfile).toEqual(undefined);
134
134
  expect(goptions.asclientid).toEqual(undefined);
135
135
  expect(goptions.asclientidfile).toEqual(undefined);
package/stsconfig.js CHANGED
@@ -164,13 +164,23 @@ const defconfig =
164
164
  // Auth Server port (client port to access the service)
165
165
  ,asport: (process.env.AS_PORT === undefined ? "3002" : process.env.AS_PORT)
166
166
  // Auth Server endpoint
167
- ,asapiroot: (process.env.AS_APIROOT === undefined ? "/stsauth/v1" : process.env.AS_APIROOT)
168
- // Auth Server API Identifier. This value will be used as the audience parameter on authorization calls (OAuth2 client credentials flow).
169
- ,asoauthroot: (process.env.AS_OAUTHROOT === undefined ? "/oauth2/v2.0" : process.env.AS_OAUTHROOT)
170
- // Auth Server API Identifier. This value will be used as the audience parameter on authorization calls (OAuth2 client credentials flow).
171
- ,asapiidentifier: process.env.AS_API_IDENTIFIER
172
- // Auth Server API Identifier file. This value will be used as the audience parameter on authorization calls (OAuth2 client credentials flow).
167
+ ,asapiroot: (process.env.AS_API_ROOT === undefined ? "/stsauth/v1.0" : process.env.AS_API_ROOT)
168
+ // Auth Server API Identifier.
169
+ ,asoauthapiroot: (process.env.AS_OAUTH_API_ROOT === undefined ? "/oauth2/v2.0" : process.env.AS_OAUTH_API_ROOT)
170
+ // Auth Server Admin API Identifier.
171
+ ,asadminapiroot: (process.env.AS_ADMIN_API_ROOT === undefined ? "/admin/v1.0" : process.env.AS_ADMIN_API_ROOT)
172
+ // Auth Server API Identifier.
173
+ ,asapiidentifier: (process.env.AS_API_IDENTIFIER === undefined ? 'https://stsmda.com.au/stsauthapi/v1.0/' : process.env.AS_API_IDENTIFIER)
174
+ // Auth Server API Identifier file.
173
175
  ,asapiidentifierfile: process.env.AS_API_IDENTIFIER_FILE
176
+ // Auth Server OAuth API Identifier.
177
+ ,asoauthapiidentifier: (process.env.AS_OAUTH_API_IDENTIFIER === undefined ? 'https://stsmda.com.au/stsauthoauthapi/v2.0/' : process.env.AS_OAUTH_API_IDENTIFIER)
178
+ // Auth Server OAuth API Identifier file.
179
+ ,asoauthapiidentifierfile: process.env.AS_OAUTH_API_IDENTIFIER_FILE
180
+ // Auth Server Administration API Identifier.
181
+ ,asadminapiidentifier: (process.env.AS_ADMIN_API_IDENTIFIER === undefined ? 'https://stsmda.com.au/stsauthadminapi/v1.0/' : process.env.AS_ADMIN_API_IDENTIFIER)
182
+ // Auth Server Administration API Identifier file.
183
+ ,asadminapiidentifierfile: process.env.AS_ADMIN_API_IDENTIFIER_FILE
174
184
  // Auth Server Prometheus metric support
175
185
  ,asprometheussupport: (process.env.AS_PROM_SUPPORT === undefined ? true : (process.env.AS_PROM_SUPPORT === "true" ? true : false ))
176
186
  // Auth Prometheus Cluster Server port (port used for cluster prometheus scrapes)
@@ -340,7 +350,7 @@ const defconfig =
340
350
  ,tsjwkskeys: (process.env.TS_JWKS_KEYS === undefined ? 3 : parseInt(process.env.TS_JWKS_KEYS))
341
351
 
342
352
  // File path for JWKS store data. This file will contain the public and private keys for the JWKS store.
343
- ,tsjwksstorepath: process.env.TS_JWKS_STORE_PATH
353
+ ,tsjwksstorepath: (process.env.TS_JWKS_STORE_PATH === undefined ? "/var/lib/sts/stsglobalresources/.stsauthprivate/jwks-private.json" : process.env.TS_JWKS_STORE_PATH)
344
354
  // File path for JWKS store path config setting (tsjwksstorepath). Use this config item with Docker/Kubernetes secrets.
345
355
  ,tsjwksstorepathfile: process.env.TS_JWKS_STORE_PATH_FILE
346
356
  // File path for JWKS public store data. This file will contain only the public signing keys for the JWKS store.