File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nr-objectstore-rotate" ,
3
- "version" : " 1.1.4 " ,
3
+ "version" : " 1.1.5 " ,
4
4
"description" : " Sidecar for rotating log files to objectstore" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -90,8 +90,7 @@ export class BrokerService {
90
90
if ( ! unwrapToken ) {
91
91
return wrappedTokenResponse . wrap_info . token ;
92
92
}
93
- const vault = new VaultService ( wrappedTokenResponse . wrap_info . token ) ;
94
- const unwrappedToken = await vault . unwrapToken (
93
+ const unwrappedToken = await VaultService . unwrapToken (
95
94
wrappedTokenResponse . wrap_info . token ,
96
95
) ;
97
96
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ export class VaultService {
9
9
this . token = token ;
10
10
}
11
11
12
- async unwrapToken ( token : string ) : Promise < any | undefined > {
13
- const url = `${ VAULT_URL } sys/wrapping/unwrap` ;
12
+ static async unwrapToken ( token : string ) : Promise < any | undefined > {
13
+ const url = `${ VAULT_URL } v1/ sys/wrapping/unwrap` ;
14
14
const headers = {
15
15
'Content-Type' : 'application/json' ,
16
16
'X-Vault-Token' : token ,
@@ -23,7 +23,7 @@ export class VaultService {
23
23
}
24
24
25
25
async read ( path : string ) : Promise < any > {
26
- const url = `${ VAULT_URL } ${ path } ` ;
26
+ const url = `${ VAULT_URL } v1/ ${ path } ` ;
27
27
const headers = {
28
28
'Content-Type' : 'application/json' ,
29
29
[ this . HEADER_VAULT_TOKEN ] : this . token ,
@@ -43,7 +43,7 @@ export class VaultService {
43
43
}
44
44
45
45
async revokeToken ( ) : Promise < number > {
46
- const url = `${ VAULT_URL } auth/token/revoke-self` ;
46
+ const url = `${ VAULT_URL } v1/ auth/token/revoke-self` ;
47
47
const headers = {
48
48
'Content-Type' : 'application/json' ,
49
49
[ this . HEADER_VAULT_TOKEN ] : this . token ,
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export const VAULT_CRED_KEYS_BUCKET = process.env.VAULT_CRED_KEYS_BUCKET ?? '';
63
63
export const VAULT_CRED_KEYS_SECRET_KEY =
64
64
process . env . VAULT_CRED_KEYS_SECRET_KEY ?? '' ;
65
65
export const VAULT_URL =
66
- process . env . VAULT_URL ?? 'https://knox.io.nrs.gov.bc.ca' ;
66
+ process . env . VAULT_URL ?? 'https://knox.io.nrs.gov.bc.ca/ ' ;
67
67
68
68
export enum DB_FILE_STATUS {
69
69
Moved ,
You can’t perform that action at this time.
0 commit comments