We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fe0ec9 commit 7fcfac4Copy full SHA for 7fcfac4
1 file changed
src/auth/VaultAppRoleAuth.js
@@ -16,17 +16,24 @@ class VaultAppRoleAuth extends VaultBaseAuth {
16
17
this.__roleId = config.role_id;
18
this.__secretId = config.secret_id;
19
+ this.__namespace = config.namespace;
20
}
21
22
_authenticate() {
23
this._log.info(
24
'making authentication request: role_id=%s',
25
this.__roleId
26
);
27
+
28
+ const headers = {};
29
+ if (this.__namespace) {
30
+ headers['X-Vault-Namespace'] = this.__namespace;
31
+ }
32
33
return this.__apiClient.makeRequest('POST', `/auth/${this._mount}/login`, {
34
role_id: this.__roleId,
35
secret_id: this.__secretId,
- }).then(res => {
36
+ }, headers).then(res => {
37
this._log.debug(
38
'receive token: %s',
39
res.auth.client_token
0 commit comments