@azure/msal-node 2.9.0 → 2.9.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/dist/cache/NodeStorage.cjs +1 -1
- package/dist/cache/NodeStorage.mjs +1 -1
- package/dist/cache/TokenCache.cjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.cjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/serializer/Deserializer.cjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.cjs +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/client/ClientApplication.cjs +1 -1
- package/dist/client/ClientApplication.mjs +1 -1
- package/dist/client/ClientAssertion.cjs +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientCredentialClient.cjs +1 -1
- package/dist/client/ClientCredentialClient.mjs +1 -1
- package/dist/client/ConfidentialClientApplication.cjs +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/DeviceCodeClient.cjs +1 -1
- package/dist/client/DeviceCodeClient.mjs +1 -1
- package/dist/client/ManagedIdentityApplication.cjs +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +1 -1
- package/dist/client/ManagedIdentityClient.cjs +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.cjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.cjs +41 -3
- package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +4 -0
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +44 -7
- package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.cjs +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
- package/dist/client/ManagedIdentitySources/Imds.cjs +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
- package/dist/client/OnBehalfOfClient.cjs +1 -1
- package/dist/client/OnBehalfOfClient.mjs +1 -1
- package/dist/client/PublicClientApplication.cjs +1 -1
- package/dist/client/PublicClientApplication.mjs +1 -1
- package/dist/client/UsernamePasswordClient.cjs +1 -1
- package/dist/client/UsernamePasswordClient.mjs +1 -1
- package/dist/config/Configuration.cjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/config/ManagedIdentityId.cjs +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.cjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
- package/dist/crypto/CryptoProvider.cjs +15 -1
- package/dist/crypto/CryptoProvider.cjs.map +1 -1
- package/dist/crypto/CryptoProvider.d.ts +10 -0
- package/dist/crypto/CryptoProvider.d.ts.map +1 -1
- package/dist/crypto/CryptoProvider.mjs +15 -1
- package/dist/crypto/CryptoProvider.mjs.map +1 -1
- package/dist/crypto/GuidGenerator.cjs +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.cjs +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.cjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/error/ManagedIdentityError.cjs +5 -1
- package/dist/error/ManagedIdentityError.cjs.map +1 -1
- package/dist/error/ManagedIdentityError.d.ts +4 -0
- package/dist/error/ManagedIdentityError.d.ts.map +1 -1
- package/dist/error/ManagedIdentityError.mjs +6 -2
- package/dist/error/ManagedIdentityError.mjs.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.cjs +9 -1
- package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.d.ts +4 -0
- package/dist/error/ManagedIdentityErrorCodes.d.ts.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +6 -2
- package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
- package/dist/error/NodeAuthError.cjs +1 -1
- package/dist/error/NodeAuthError.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.cjs +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.cjs +1 -1
- package/dist/network/HttpClient.mjs +1 -1
- package/dist/network/HttpClientWithRetries.cjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/LoopbackClient.cjs +1 -1
- package/dist/network/LoopbackClient.mjs +1 -1
- package/dist/packageMetadata.cjs +2 -2
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/retry/LinearRetryPolicy.cjs +1 -1
- package/dist/retry/LinearRetryPolicy.mjs +1 -1
- package/dist/utils/Constants.cjs +3 -1
- package/dist/utils/Constants.cjs.map +1 -1
- package/dist/utils/Constants.d.ts +1 -0
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +3 -2
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/EncodingUtils.cjs +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/NetworkUtils.cjs +1 -1
- package/dist/utils/NetworkUtils.mjs +1 -1
- package/package.json +2 -2
- package/src/client/ManagedIdentitySources/AzureArc.ts +60 -3
- package/src/crypto/CryptoProvider.ts +15 -0
- package/src/error/ManagedIdentityError.ts +8 -0
- package/src/error/ManagedIdentityErrorCodes.ts +4 -0
- package/src/packageMetadata.ts +1 -1
- package/src/utils/Constants.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { Logger, buildStaticAuthorityOptions, ResponseMode, AuthenticationScheme, AuthorizationCodeClient, AuthError, RefreshTokenClient, SilentFlowClient, createClientAuthError, ClientAuthErrorCodes, Constants as Constants$1, getClientAssertion, StringUtils, OIDC_DEFAULT_SCOPES, ServerTelemetryManager, Authority, AuthorityFactory } from '@azure/msal-common';
|
|
4
4
|
import { buildAppConfiguration } from '../config/Configuration.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BaseClient, CacheOutcome, TokenCacheContext, ScopeSet, TimeUtils, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, ResponseHandler, Constants, CredentialType, createClientAuthError, ClientAuthErrorCodes, UrlString, RequestParameterBuilder, GrantType, getClientAssertion, StringUtils, AuthenticationScheme } from '@azure/msal-common';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BaseClient, TimeUtils, ResponseHandler, UrlString, RequestParameterBuilder, createClientAuthError, ClientAuthErrorCodes, Constants, createAuthError, AuthErrorCodes, GrantType, StringUtils } from '@azure/msal-common';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { Logger, DEFAULT_CRYPTO_IMPLEMENTATION, Authority, createClientConfigurationError, ClientConfigurationErrorCodes, CacheOutcome, Constants, ProtocolMode } from '@azure/msal-common';
|
|
4
4
|
import { buildManagedIdentityConfiguration } from '../config/Configuration.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs';
|
|
4
4
|
import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, APP_SERVICE_SECRET_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, ManagedIdentityIdType, HttpMethod } from '../../utils/Constants.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@ var BaseManagedIdentitySource = require('./BaseManagedIdentitySource.cjs');
|
|
|
8
8
|
var ManagedIdentityError = require('../../error/ManagedIdentityError.cjs');
|
|
9
9
|
var Constants = require('../../utils/Constants.cjs');
|
|
10
10
|
var fs = require('fs');
|
|
11
|
+
var path = require('path');
|
|
11
12
|
var ManagedIdentityErrorCodes = require('../../error/ManagedIdentityErrorCodes.cjs');
|
|
12
13
|
|
|
13
14
|
/*
|
|
@@ -15,6 +16,10 @@ var ManagedIdentityErrorCodes = require('../../error/ManagedIdentityErrorCodes.c
|
|
|
15
16
|
* Licensed under the MIT License.
|
|
16
17
|
*/
|
|
17
18
|
const ARC_API_VERSION = "2019-11-01";
|
|
19
|
+
const SUPPORTED_AZURE_ARC_PLATFORMS = {
|
|
20
|
+
win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`,
|
|
21
|
+
linux: "/var/opt/azcmagent/tokens/",
|
|
22
|
+
};
|
|
18
23
|
/**
|
|
19
24
|
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
|
|
20
25
|
*/
|
|
@@ -67,10 +72,42 @@ class AzureArc extends BaseManagedIdentitySource.BaseManagedIdentitySource {
|
|
|
67
72
|
if (!wwwAuthHeader.includes("Basic realm=")) {
|
|
68
73
|
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat);
|
|
69
74
|
}
|
|
70
|
-
const
|
|
75
|
+
const secretFilePath = wwwAuthHeader.split("Basic realm=")[1];
|
|
76
|
+
// throw an error if the managed identity application is not being run on Windows or Linux
|
|
77
|
+
if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) {
|
|
78
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.platformNotSupported);
|
|
79
|
+
}
|
|
80
|
+
// get the expected Windows or Linux file path)
|
|
81
|
+
const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
|
|
82
|
+
// throw an error if the file in the file path is not a .key file
|
|
83
|
+
const fileName = path.basename(secretFilePath);
|
|
84
|
+
if (!fileName.endsWith(".key")) {
|
|
85
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidFileExtension);
|
|
86
|
+
}
|
|
87
|
+
/*
|
|
88
|
+
* throw an error if the file path from the www-authenticate header does not match the
|
|
89
|
+
* expected file path for the platform (Windows or Linux) the managed identity application
|
|
90
|
+
* is running on
|
|
91
|
+
*/
|
|
92
|
+
if (expectedSecretFilePath + fileName !== secretFilePath) {
|
|
93
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidFilePath);
|
|
94
|
+
}
|
|
95
|
+
let secretFileSize;
|
|
96
|
+
// attempt to get the secret file's size, in bytes
|
|
97
|
+
try {
|
|
98
|
+
secretFileSize = await fs.statSync(secretFilePath).size;
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToReadSecretFile);
|
|
102
|
+
}
|
|
103
|
+
// throw an error if the secret file's size is greater than 4096 bytes
|
|
104
|
+
if (secretFileSize > Constants.AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) {
|
|
105
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidSecret);
|
|
106
|
+
}
|
|
107
|
+
// attempt to read the contents of the secret file
|
|
71
108
|
let secret;
|
|
72
109
|
try {
|
|
73
|
-
secret = fs.readFileSync(
|
|
110
|
+
secret = fs.readFileSync(secretFilePath, "utf-8");
|
|
74
111
|
}
|
|
75
112
|
catch (e) {
|
|
76
113
|
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToReadSecretFile);
|
|
@@ -97,4 +134,5 @@ class AzureArc extends BaseManagedIdentitySource.BaseManagedIdentitySource {
|
|
|
97
134
|
|
|
98
135
|
exports.ARC_API_VERSION = ARC_API_VERSION;
|
|
99
136
|
exports.AzureArc = AzureArc;
|
|
137
|
+
exports.SUPPORTED_AZURE_ARC_PLATFORMS = SUPPORTED_AZURE_ARC_PLATFORMS;
|
|
100
138
|
//# sourceMappingURL=AzureArc.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureArc.cjs","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"sourcesContent":[null],"names":["BaseManagedIdentitySource","ManagedIdentityEnvironmentVariableNames","ManagedIdentitySourceNames","ManagedIdentityIdType","createManagedIdentityError","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityRequestParameters","HttpMethod","METADATA_HEADER_NAME","API_VERSION_QUERY_PARAMETER_NAME","RESOURCE_BODY_OR_QUERY_PARAMETER_NAME","HttpStatus","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","
|
|
1
|
+
{"version":3,"file":"AzureArc.cjs","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"sourcesContent":[null],"names":["BaseManagedIdentitySource","ManagedIdentityEnvironmentVariableNames","ManagedIdentitySourceNames","ManagedIdentityIdType","createManagedIdentityError","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityRequestParameters","HttpMethod","METADATA_HEADER_NAME","API_VERSION_QUERY_PARAMETER_NAME","RESOURCE_BODY_OR_QUERY_PARAMETER_NAME","HttpStatus","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","statSync","ManagedIdentityErrorCodes.unableToReadSecretFile","AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES","ManagedIdentityErrorCodes.invalidSecret","readFileSync","AUTHORIZATION_HEADER_NAME","AuthError","createClientAuthError","ClientAuthErrorCodes"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAqCI,MAAM,eAAe,GAAW,aAAa;AAEvC,MAAA,6BAA6B,GAAG;IACzC,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAwC,sCAAA,CAAA;AAC5E,IAAA,KAAK,EAAE,4BAA4B;EACrC;AAEF;;AAEG;AACG,MAAO,QAAS,SAAQA,mDAAyB,CAAA;IAGnD,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,gBAAwB,EAAA;QAExB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;AAEM,IAAA,OAAO,uBA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AAS,MAAA,EAAA,MAAM,EAAE,CAAC;AAE1C,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,CAAA,8DAAA,CAAgE,CACnE,CAAC;AACF,YAAA,cAAc,CAAC,OAAO,CAACI,mCAAyB,CAAC,GAAG,eAAe,CAAC;YAEpE,IAAI;gBACA,aAAa;oBACT,MAAM,aAAa,CAAC,mBAAmB,CACnC,cAAc,CAAC,UAAU,EAAE,EAC3B,qBAAqB,CACxB,CAAC;AACT,aAAA;AAAC,YAAA,OAAO,KAAK,EAAE;gBACZ,IAAI,KAAK,YAAYC,oBAAS,EAAE;AAC5B,oBAAA,MAAM,KAAK,CAAC;AACf,iBAAA;AAAM,qBAAA;AACH,oBAAA,MAAMC,gCAAqB,CACvBC,+BAAoB,CAAC,YAAY,CACpC,CAAC;AACL,iBAAA;AACJ,aAAA;AACJ,SAAA;QAED,OAAO,IAAI,CAAC,sBAAsB,CAAC,aAAa,IAAI,gBAAgB,CAAC,CAAC;KACzE;AACJ;;;;;;"}
|
|
@@ -6,6 +6,10 @@ import { NodeStorage } from "../../cache/NodeStorage";
|
|
|
6
6
|
import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse";
|
|
7
7
|
import { ManagedIdentityId } from "../../config/ManagedIdentityId";
|
|
8
8
|
export declare const ARC_API_VERSION: string;
|
|
9
|
+
export declare const SUPPORTED_AZURE_ARC_PLATFORMS: {
|
|
10
|
+
win32: string;
|
|
11
|
+
linux: string;
|
|
12
|
+
};
|
|
9
13
|
/**
|
|
10
14
|
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
|
|
11
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureArc.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,M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AAI;IAoDX,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;IAmB3D,2BAA2B,CACpC,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAC/D,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,gCAAgC,EAChD,qBAAqB,EAAE,qBAAqB,GAC7C,OAAO,CAAC,gCAAgC,CAAC;CAwG/C"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { HttpStatus, AuthError, createClientAuthError, ClientAuthErrorCodes } from '@azure/msal-common';
|
|
4
4
|
import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs';
|
|
5
5
|
import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs';
|
|
6
6
|
import { createManagedIdentityError } from '../../error/ManagedIdentityError.mjs';
|
|
7
|
-
import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, ManagedIdentityIdType, HttpMethod, METADATA_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, AUTHORIZATION_HEADER_NAME } from '../../utils/Constants.mjs';
|
|
8
|
-
import { readFileSync } from 'fs';
|
|
9
|
-
import
|
|
7
|
+
import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, ManagedIdentityIdType, HttpMethod, METADATA_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES, AUTHORIZATION_HEADER_NAME } from '../../utils/Constants.mjs';
|
|
8
|
+
import { statSync, readFileSync } from 'fs';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import { unableToCreateAzureArc, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat, platformNotSupported, invalidFileExtension, invalidFilePath, unableToReadSecretFile, invalidSecret } from '../../error/ManagedIdentityErrorCodes.mjs';
|
|
10
11
|
|
|
11
12
|
/*
|
|
12
13
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13
14
|
* Licensed under the MIT License.
|
|
14
15
|
*/
|
|
15
16
|
const ARC_API_VERSION = "2019-11-01";
|
|
17
|
+
const SUPPORTED_AZURE_ARC_PLATFORMS = {
|
|
18
|
+
win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`,
|
|
19
|
+
linux: "/var/opt/azcmagent/tokens/",
|
|
20
|
+
};
|
|
16
21
|
/**
|
|
17
22
|
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
|
|
18
23
|
*/
|
|
@@ -65,10 +70,42 @@ class AzureArc extends BaseManagedIdentitySource {
|
|
|
65
70
|
if (!wwwAuthHeader.includes("Basic realm=")) {
|
|
66
71
|
throw createManagedIdentityError(wwwAuthenticateHeaderUnsupportedFormat);
|
|
67
72
|
}
|
|
68
|
-
const
|
|
73
|
+
const secretFilePath = wwwAuthHeader.split("Basic realm=")[1];
|
|
74
|
+
// throw an error if the managed identity application is not being run on Windows or Linux
|
|
75
|
+
if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) {
|
|
76
|
+
throw createManagedIdentityError(platformNotSupported);
|
|
77
|
+
}
|
|
78
|
+
// get the expected Windows or Linux file path)
|
|
79
|
+
const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
|
|
80
|
+
// throw an error if the file in the file path is not a .key file
|
|
81
|
+
const fileName = path.basename(secretFilePath);
|
|
82
|
+
if (!fileName.endsWith(".key")) {
|
|
83
|
+
throw createManagedIdentityError(invalidFileExtension);
|
|
84
|
+
}
|
|
85
|
+
/*
|
|
86
|
+
* throw an error if the file path from the www-authenticate header does not match the
|
|
87
|
+
* expected file path for the platform (Windows or Linux) the managed identity application
|
|
88
|
+
* is running on
|
|
89
|
+
*/
|
|
90
|
+
if (expectedSecretFilePath + fileName !== secretFilePath) {
|
|
91
|
+
throw createManagedIdentityError(invalidFilePath);
|
|
92
|
+
}
|
|
93
|
+
let secretFileSize;
|
|
94
|
+
// attempt to get the secret file's size, in bytes
|
|
95
|
+
try {
|
|
96
|
+
secretFileSize = await statSync(secretFilePath).size;
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
throw createManagedIdentityError(unableToReadSecretFile);
|
|
100
|
+
}
|
|
101
|
+
// throw an error if the secret file's size is greater than 4096 bytes
|
|
102
|
+
if (secretFileSize > AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) {
|
|
103
|
+
throw createManagedIdentityError(invalidSecret);
|
|
104
|
+
}
|
|
105
|
+
// attempt to read the contents of the secret file
|
|
69
106
|
let secret;
|
|
70
107
|
try {
|
|
71
|
-
secret = readFileSync(
|
|
108
|
+
secret = readFileSync(secretFilePath, "utf-8");
|
|
72
109
|
}
|
|
73
110
|
catch (e) {
|
|
74
111
|
throw createManagedIdentityError(unableToReadSecretFile);
|
|
@@ -93,5 +130,5 @@ class AzureArc extends BaseManagedIdentitySource {
|
|
|
93
130
|
}
|
|
94
131
|
}
|
|
95
132
|
|
|
96
|
-
export { ARC_API_VERSION, AzureArc };
|
|
133
|
+
export { ARC_API_VERSION, AzureArc, SUPPORTED_AZURE_ARC_PLATFORMS };
|
|
97
134
|
//# sourceMappingURL=AzureArc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureArc.mjs","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","ManagedIdentityErrorCodes.unableToReadSecretFile"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AzureArc.mjs","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.invalidSecret"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAqCI,MAAM,eAAe,GAAW,aAAa;AAEvC,MAAA,6BAA6B,GAAG;IACzC,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAwC,sCAAA,CAAA;AAC5E,IAAA,KAAK,EAAE,4BAA4B;EACrC;AAEF;;AAEG;AACG,MAAO,QAAS,SAAQ,yBAAyB,CAAA;IAGnD,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,gBAAwB,EAAA;QAExB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;AAEM,IAAA,OAAO,uBAAuB,GAAA;QACjC,MAAM,gBAAgB,GAClB,OAAO,CAAC,GAAG,CACP,uCAAuC,CAAC,iBAAiB,CAC5D,CAAC;QACN,MAAM,YAAY,GACd,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,aAAa,CAAC,CAAC;AAEvE,QAAA,OAAO,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;KAC3C;IAEM,OAAO,SAAS,CACnB,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,iBAAoC,EAAA;QAEpC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,GAClC,QAA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M,qBAAA;AACH,oBAAA,MAAM,qBAAqB,CACvB,oBAAoB,CAAC,YAAY,CACpC,CAAC;AACL,iBAAA;AACJ,aAAA;AACJ,SAAA;QAED,OAAO,IAAI,CAAC,sBAAsB,CAAC,aAAa,IAAI,gBAAgB,CAAC,CAAC;KACzE;AACJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { TimeUtils, HeaderNames, Constants, AuthError, createClientAuthError, ClientAuthErrorCodes, ResponseHandler, UrlString } from '@azure/msal-common';
|
|
4
4
|
import { HttpMethod, ManagedIdentityIdType } from '../../utils/Constants.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs';
|
|
4
4
|
import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs';
|
|
4
4
|
import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs';
|
|
4
4
|
import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BaseClient, ScopeSet, CacheOutcome, createClientAuthError, ClientAuthErrorCodes, TimeUtils, AuthToken, ResponseHandler, AuthenticationScheme, CredentialType, UrlString, RequestParameterBuilder, GrantType, AADServerParamKeys, getClientAssertion, Constants } from '@azure/msal-common';
|
|
4
4
|
import { EncodingUtils } from '../utils/EncodingUtils.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { ApiId, LOOPBACK_SERVER_CONSTANTS, Constants as Constants$1 } from '../utils/Constants.mjs';
|
|
4
4
|
import { AuthError, OIDC_DEFAULT_SCOPES, ResponseMode, CodeChallengeMethodValues, ServerError, Constants } from '@azure/msal-common';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BaseClient, TimeUtils, ResponseHandler, UrlString, CcsCredentialType, RequestParameterBuilder, GrantType, getClientAssertion, StringUtils } from '@azure/msal-common';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { createManagedIdentityError } from '../error/ManagedIdentityError.mjs';
|
|
4
4
|
import { ManagedIdentityIdType, DEFAULT_MANAGED_IDENTITY_ID } from '../utils/Constants.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.9.
|
|
1
|
+
/*! @azure/msal-node v2.9.2 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -23,6 +23,20 @@ class CryptoProvider {
|
|
|
23
23
|
this.guidGenerator = new GuidGenerator.GuidGenerator();
|
|
24
24
|
this.hashUtils = new HashUtils.HashUtils();
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* base64 URL safe encoded string
|
|
28
|
+
*/
|
|
29
|
+
base64UrlEncode() {
|
|
30
|
+
throw new Error("Method not implemented.");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Stringifies and base64Url encodes input public key
|
|
34
|
+
* @param inputKid
|
|
35
|
+
* @returns Base64Url encoded public key
|
|
36
|
+
*/
|
|
37
|
+
encodeKid() {
|
|
38
|
+
throw new Error("Method not implemented.");
|
|
39
|
+
}
|
|
26
40
|
/**
|
|
27
41
|
* Creates a new random GUID - used to populate state and nonce.
|
|
28
42
|
* @returns string (GUID)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CryptoProvider.cjs","sources":["../../src/crypto/CryptoProvider.ts"],"sourcesContent":[null],"names":["PkceGenerator","GuidGenerator","HashUtils","EncodingUtils"],"mappings":";;;;;;;;;AAAA;;;AAGG;AAQH;;;;AAIG;MACU,cAAc,CAAA;AAKvB,IAAA,WAAA,GAAA;;AAEI,QAAA,IAAI,CAAC,aAAa,GAAG,IAAIA,2BAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,aAAa,GAAG,IAAIC,2BAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAIC,mBAAS,EAAE,CAAC;KACpC;AAED;;;AAGG;IACH,aAAa,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;KAC5C;AAED;;;AAGG;AACH,IAAA,YAAY,CAAC,KAAa,EAAA;AACtB,QAAA,OAAOC,2BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;KAC5C;AAED;;;AAGG;AACH,IAAA,YAAY,CAAC,KAAa,EAAA;AACtB,QAAA,OAAOA,2BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;KAC5C;AAED;;AAEG;IACH,iBAAiB,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,CAAC;KACjD;AAED;;AAEG;IACH,sBAAsB,GAAA;AAClB,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;;AAGG;IACH,qBAAqB,GAAA;AACjB,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,aAAa,GAAA;AACT,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,OAAO,GAAA;AACH,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,MAAM,UAAU,CAAC,SAAiB,EAAA;QAC9B,OAAOA,2BAAa,CAAC,eAAe,CAChC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACnD,QAAQ,CACX,CAAC;KACL;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"CryptoProvider.cjs","sources":["../../src/crypto/CryptoProvider.ts"],"sourcesContent":[null],"names":["PkceGenerator","GuidGenerator","HashUtils","EncodingUtils"],"mappings":";;;;;;;;;AAAA;;;AAGG;AAQH;;;;AAIG;MACU,cAAc,CAAA;AAKvB,IAAA,WAAA,GAAA;;AAEI,QAAA,IAAI,CAAC,aAAa,GAAG,IAAIA,2BAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,aAAa,GAAG,IAAIC,2BAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAIC,mBAAS,EAAE,CAAC;KACpC;AAED;;AAEG;IACH,eAAe,GAAA;AACX,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,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