@azure/msal-node 3.7.4 → 3.8.1
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/CacheHelpers.mjs +1 -1
- package/dist/cache/NodeStorage.d.ts.map +1 -1
- package/dist/cache/NodeStorage.mjs +2 -2
- package/dist/cache/NodeStorage.mjs.map +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/client/ClientApplication.mjs +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientCredentialClient.mjs +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/DeviceCodeClient.mjs +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.d.ts +54 -0
- package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +55 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +81 -0
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +82 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +93 -2
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +81 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts +54 -0
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +55 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.d.ts +44 -22
- package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +44 -22
- package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.d.ts +65 -0
- package/dist/client/ManagedIdentitySources/MachineLearning.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs +66 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +56 -22
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +57 -23
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -1
- package/dist/client/OnBehalfOfClient.mjs +1 -1
- package/dist/client/PublicClientApplication.mjs +1 -1
- package/dist/client/UsernamePasswordClient.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/NodeAuthError.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.mjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/LoopbackClient.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
- package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
- package/dist/retry/ImdsRetryPolicy.mjs +1 -1
- package/dist/retry/LinearRetryStrategy.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/NetworkUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/lib/msal-node.cjs +919 -502
- package/lib/msal-node.cjs.map +1 -1
- package/lib/types/cache/NodeStorage.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/AppService.d.ts +54 -0
- package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +81 -0
- package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +93 -2
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +54 -0
- package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/Imds.d.ts +44 -22
- package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts +65 -0
- package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +56 -22
- package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +2 -2
- package/src/cache/NodeStorage.ts +3 -1
- package/src/client/ManagedIdentitySources/AppService.ts +54 -0
- package/src/client/ManagedIdentitySources/AzureArc.ts +81 -0
- package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +92 -2
- package/src/client/ManagedIdentitySources/CloudShell.ts +54 -0
- package/src/client/ManagedIdentitySources/Imds.ts +43 -21
- package/src/client/ManagedIdentitySources/MachineLearning.ts +65 -0
- package/src/client/ManagedIdentitySources/ServiceFabric.ts +56 -22
- package/src/packageMetadata.ts +1 -1
|
@@ -26,19 +26,26 @@ const DEFAULT_IMDS_ENDPOINT: string = `http://169.254.169.254${IMDS_TOKEN_PATH}`
|
|
|
26
26
|
const IMDS_API_VERSION: string = "2018-02-01";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
+
* Managed Identity source implementation for Azure Instance Metadata Service (IMDS).
|
|
30
|
+
*
|
|
31
|
+
* IMDS is available on Azure Virtual Machines and Virtual Machine Scale Sets and provides
|
|
32
|
+
* a REST endpoint to obtain OAuth tokens for managed identities. This implementation
|
|
33
|
+
* handles both system-assigned and user-assigned managed identities.
|
|
34
|
+
*
|
|
29
35
|
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs
|
|
30
36
|
*/
|
|
31
37
|
export class Imds extends BaseManagedIdentitySource {
|
|
32
38
|
private identityEndpoint: string;
|
|
33
39
|
|
|
34
40
|
/**
|
|
35
|
-
* Constructs an Imds instance.
|
|
36
|
-
*
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
41
|
+
* Constructs an Imds instance with the specified configuration.
|
|
42
|
+
*
|
|
43
|
+
* @param logger - Logger instance for recording debug information and errors
|
|
44
|
+
* @param nodeStorage - NodeStorage instance used for token caching operations
|
|
45
|
+
* @param networkClient - Network client implementation for making HTTP requests to IMDS
|
|
46
|
+
* @param cryptoProvider - CryptoProvider for generating correlation IDs and other cryptographic operations
|
|
47
|
+
* @param disableInternalRetries - When true, disables the built-in retry logic for IMDS requests
|
|
48
|
+
* @param identityEndpoint - The complete IMDS endpoint URL including the token path
|
|
42
49
|
*/
|
|
43
50
|
constructor(
|
|
44
51
|
logger: Logger,
|
|
@@ -60,16 +67,20 @@ export class Imds extends BaseManagedIdentitySource {
|
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
70
|
+
* Creates an Imds instance with the appropriate endpoint configuration.
|
|
71
|
+
*
|
|
72
|
+
* This method checks for the presence of the AZURE_POD_IDENTITY_AUTHORITY_HOST environment
|
|
73
|
+
* variable, which is used in Azure Kubernetes Service (AKS) environments with Azure AD
|
|
74
|
+
* Pod Identity. If found, it uses that endpoint; otherwise, it falls back to the standard
|
|
75
|
+
* IMDS endpoint (169.254.169.254).
|
|
76
|
+
*
|
|
77
|
+
* @param logger - Logger instance for recording endpoint discovery and validation
|
|
78
|
+
* @param nodeStorage - NodeStorage instance for token caching
|
|
79
|
+
* @param networkClient - Network client for HTTP requests
|
|
80
|
+
* @param cryptoProvider - CryptoProvider for cryptographic operations
|
|
81
|
+
* @param disableInternalRetries - Whether to disable built-in retry logic
|
|
66
82
|
*
|
|
67
|
-
* @
|
|
68
|
-
* @param nodeStorage - NodeStorage instance for caching.
|
|
69
|
-
* @param networkClient - Network client for HTTP requests.
|
|
70
|
-
* @param cryptoProvider - CryptoProvider for cryptographic operations.
|
|
71
|
-
* @param disableInternalRetries - Whether to disable internal retry logic.
|
|
72
|
-
* @returns An instance of Imds configured with the appropriate endpoint.
|
|
83
|
+
* @returns A configured Imds instance ready to make token requests
|
|
73
84
|
*/
|
|
74
85
|
public static tryCreate(
|
|
75
86
|
logger: Logger,
|
|
@@ -125,12 +136,23 @@ export class Imds extends BaseManagedIdentitySource {
|
|
|
125
136
|
}
|
|
126
137
|
|
|
127
138
|
/**
|
|
128
|
-
* Creates a
|
|
129
|
-
*
|
|
139
|
+
* Creates a properly configured HTTP request for acquiring an access token from IMDS.
|
|
140
|
+
*
|
|
141
|
+
* This method builds a complete request object with all necessary headers, query parameters,
|
|
142
|
+
* and retry policies required by the Azure Instance Metadata Service.
|
|
143
|
+
*
|
|
144
|
+
* Key request components:
|
|
145
|
+
* - HTTP GET method to the IMDS token endpoint
|
|
146
|
+
* - Metadata header set to "true" (required by IMDS)
|
|
147
|
+
* - API version parameter (currently "2018-02-01")
|
|
148
|
+
* - Resource parameter specifying the target audience
|
|
149
|
+
* - Identity-specific parameters for user-assigned managed identities
|
|
150
|
+
* - IMDS-specific retry policy
|
|
151
|
+
*
|
|
152
|
+
* @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
|
|
153
|
+
* @param managedIdentityId - The managed identity configuration specifying whether to use system-assigned or user-assigned identity
|
|
130
154
|
*
|
|
131
|
-
* @
|
|
132
|
-
* @param managedIdentityId - The managed identity ID (system-assigned or user-assigned).
|
|
133
|
-
* @returns A ManagedIdentityRequestParameters object configured for IMDS.
|
|
155
|
+
* @returns A configured ManagedIdentityRequestParameters object ready for network execution
|
|
134
156
|
*/
|
|
135
157
|
public createRequest(
|
|
136
158
|
resource: string,
|
|
@@ -25,10 +25,28 @@ const MACHINE_LEARNING_MSI_API_VERSION: string = "2017-09-01";
|
|
|
25
25
|
|
|
26
26
|
export const MANAGED_IDENTITY_MACHINE_LEARNING_UNSUPPORTED_ID_TYPE_ERROR = `Only client id is supported for user-assigned managed identity in ${ManagedIdentitySourceNames.MACHINE_LEARNING}.`; // referenced in unit test
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Machine Learning Managed Identity Source implementation for Azure Machine Learning environments.
|
|
30
|
+
*
|
|
31
|
+
* This class handles managed identity authentication specifically for Azure Machine Learning services.
|
|
32
|
+
* It supports both system-assigned and user-assigned managed identities, using the MSI_ENDPOINT
|
|
33
|
+
* and MSI_SECRET environment variables that are automatically provided in Azure ML environments.
|
|
34
|
+
*/
|
|
28
35
|
export class MachineLearning extends BaseManagedIdentitySource {
|
|
29
36
|
private msiEndpoint: string;
|
|
30
37
|
private secret: string;
|
|
31
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new MachineLearning managed identity source instance.
|
|
41
|
+
*
|
|
42
|
+
* @param logger - Logger instance for diagnostic information
|
|
43
|
+
* @param nodeStorage - Node storage implementation for caching
|
|
44
|
+
* @param networkClient - Network client for making HTTP requests
|
|
45
|
+
* @param cryptoProvider - Cryptographic operations provider
|
|
46
|
+
* @param disableInternalRetries - Whether to disable automatic request retries
|
|
47
|
+
* @param msiEndpoint - The MSI endpoint URL from environment variables
|
|
48
|
+
* @param secret - The MSI secret from environment variables
|
|
49
|
+
*/
|
|
32
50
|
constructor(
|
|
33
51
|
logger: Logger,
|
|
34
52
|
nodeStorage: NodeStorage,
|
|
@@ -50,6 +68,16 @@ export class MachineLearning extends BaseManagedIdentitySource {
|
|
|
50
68
|
this.secret = secret;
|
|
51
69
|
}
|
|
52
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves the required environment variables for Azure Machine Learning managed identity.
|
|
73
|
+
*
|
|
74
|
+
* This method checks for the presence of MSI_ENDPOINT and MSI_SECRET environment variables
|
|
75
|
+
* that are automatically set by the Azure Machine Learning platform when managed identity
|
|
76
|
+
* is enabled for the compute instance or cluster.
|
|
77
|
+
*
|
|
78
|
+
* @returns An array containing [msiEndpoint, secret] where either value may be undefined
|
|
79
|
+
* if the corresponding environment variable is not set
|
|
80
|
+
*/
|
|
53
81
|
public static getEnvironmentVariables(): Array<string | undefined> {
|
|
54
82
|
const msiEndpoint: string | undefined =
|
|
55
83
|
process.env[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT];
|
|
@@ -60,6 +88,23 @@ export class MachineLearning extends BaseManagedIdentitySource {
|
|
|
60
88
|
return [msiEndpoint, secret];
|
|
61
89
|
}
|
|
62
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Attempts to create a MachineLearning managed identity source.
|
|
93
|
+
*
|
|
94
|
+
* This method validates the Azure Machine Learning environment by checking for the required
|
|
95
|
+
* MSI_ENDPOINT and MSI_SECRET environment variables. If both are present and valid,
|
|
96
|
+
* it creates and returns a MachineLearning instance. If either is missing or invalid,
|
|
97
|
+
* it returns null, indicating that this managed identity source is not available
|
|
98
|
+
* in the current environment.
|
|
99
|
+
*
|
|
100
|
+
* @param logger - Logger instance for diagnostic information
|
|
101
|
+
* @param nodeStorage - Node storage implementation for caching
|
|
102
|
+
* @param networkClient - Network client for making HTTP requests
|
|
103
|
+
* @param cryptoProvider - Cryptographic operations provider
|
|
104
|
+
* @param disableInternalRetries - Whether to disable automatic request retries
|
|
105
|
+
*
|
|
106
|
+
* @returns A new MachineLearning instance if the environment is valid, null otherwise
|
|
107
|
+
*/
|
|
63
108
|
public static tryCreate(
|
|
64
109
|
logger: Logger,
|
|
65
110
|
nodeStorage: NodeStorage,
|
|
@@ -100,6 +145,26 @@ export class MachineLearning extends BaseManagedIdentitySource {
|
|
|
100
145
|
);
|
|
101
146
|
}
|
|
102
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Creates a managed identity token request for Azure Machine Learning environments.
|
|
150
|
+
*
|
|
151
|
+
* This method constructs the HTTP request parameters needed to acquire an access token
|
|
152
|
+
* from the Azure Machine Learning managed identity endpoint. It handles both system-assigned
|
|
153
|
+
* and user-assigned managed identities with specific logic for each type:
|
|
154
|
+
*
|
|
155
|
+
* - System-assigned: Uses the DEFAULT_IDENTITY_CLIENT_ID environment variable
|
|
156
|
+
* - User-assigned: Only supports client ID-based identification (not object ID or resource ID)
|
|
157
|
+
*
|
|
158
|
+
* The request uses the 2017-09-01 API version and includes the required secret header
|
|
159
|
+
* for authentication with the MSI endpoint.
|
|
160
|
+
*
|
|
161
|
+
* @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
|
|
162
|
+
* @param managedIdentityId - The managed identity configuration specifying whether to use system-assigned or user-assigned identity
|
|
163
|
+
*
|
|
164
|
+
* @returns A configured ManagedIdentityRequestParameters object ready for network execution
|
|
165
|
+
*
|
|
166
|
+
* @throws Error if an unsupported managed identity ID type is specified (only client ID is supported for user-assigned)
|
|
167
|
+
*/
|
|
103
168
|
public createRequest(
|
|
104
169
|
resource: string,
|
|
105
170
|
managedIdentityId: ManagedIdentityId
|
|
@@ -28,14 +28,19 @@ export class ServiceFabric extends BaseManagedIdentitySource {
|
|
|
28
28
|
private identityHeader: string;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Constructs a new ServiceFabric managed identity source.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
31
|
+
* Constructs a new ServiceFabric managed identity source for acquiring tokens from Azure Service Fabric clusters.
|
|
32
|
+
*
|
|
33
|
+
* Service Fabric managed identity allows applications running in Service Fabric clusters to authenticate
|
|
34
|
+
* without storing credentials in code. This source handles token acquisition using the Service Fabric
|
|
35
|
+
* Managed Identity Token Service (MITS).
|
|
36
|
+
*
|
|
37
|
+
* @param logger - Logger instance for logging authentication events and debugging information
|
|
38
|
+
* @param nodeStorage - NodeStorage instance for caching tokens and other authentication artifacts
|
|
39
|
+
* @param networkClient - Network client for making HTTP requests to the Service Fabric identity endpoint
|
|
40
|
+
* @param cryptoProvider - Crypto provider for cryptographic operations like token validation
|
|
41
|
+
* @param disableInternalRetries - Whether to disable internal retry logic for failed requests
|
|
42
|
+
* @param identityEndpoint - The Service Fabric managed identity endpoint URL
|
|
43
|
+
* @param identityHeader - The Service Fabric managed identity secret header value
|
|
39
44
|
*/
|
|
40
45
|
constructor(
|
|
41
46
|
logger: Logger,
|
|
@@ -59,8 +64,16 @@ export class ServiceFabric extends BaseManagedIdentitySource {
|
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
/**
|
|
62
|
-
* Retrieves the environment variables required for Service Fabric managed identity.
|
|
63
|
-
*
|
|
67
|
+
* Retrieves the environment variables required for Service Fabric managed identity authentication.
|
|
68
|
+
*
|
|
69
|
+
* Service Fabric managed identity requires three specific environment variables to be set by the
|
|
70
|
+
* Service Fabric runtime:
|
|
71
|
+
* - IDENTITY_ENDPOINT: The endpoint URL for the Managed Identity Token Service (MITS)
|
|
72
|
+
* - IDENTITY_HEADER: A secret value used for authentication with the MITS
|
|
73
|
+
* - IDENTITY_SERVER_THUMBPRINT: The thumbprint of the MITS server certificate for secure communication
|
|
74
|
+
*
|
|
75
|
+
* @returns An array containing the identity endpoint, identity header, and identity server thumbprint values.
|
|
76
|
+
* Elements will be undefined if the corresponding environment variables are not set.
|
|
64
77
|
*/
|
|
65
78
|
public static getEnvironmentVariables(): Array<string | undefined> {
|
|
66
79
|
const identityEndpoint: string | undefined =
|
|
@@ -81,14 +94,23 @@ export class ServiceFabric extends BaseManagedIdentitySource {
|
|
|
81
94
|
}
|
|
82
95
|
|
|
83
96
|
/**
|
|
84
|
-
* Attempts to create a ServiceFabric managed identity source if
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
97
|
+
* Attempts to create a ServiceFabric managed identity source if the runtime environment supports it.
|
|
98
|
+
*
|
|
99
|
+
* Checks for the presence of all required Service Fabric environment variables
|
|
100
|
+
* and validates the endpoint URL format. It will only create a ServiceFabric instance if the application
|
|
101
|
+
* is running in a properly configured Service Fabric cluster with managed identity enabled.
|
|
102
|
+
*
|
|
103
|
+
* Note: User-assigned managed identities must be configured at the cluster level, not at runtime.
|
|
104
|
+
* This method will log a warning if a user-assigned identity is requested.
|
|
105
|
+
*
|
|
106
|
+
* @param logger - Logger instance for logging creation events and validation results
|
|
107
|
+
* @param nodeStorage - NodeStorage instance for caching tokens and authentication artifacts
|
|
108
|
+
* @param networkClient - Network client for making HTTP requests to the identity endpoint
|
|
109
|
+
* @param cryptoProvider - Crypto provider for cryptographic operations
|
|
110
|
+
* @param disableInternalRetries - Whether to disable internal retry logic for failed requests
|
|
111
|
+
* @param managedIdentityId - Managed identity identifier specifying system-assigned or user-assigned identity
|
|
112
|
+
*
|
|
113
|
+
* @returns A ServiceFabric instance if all environment variables are valid and present, otherwise null
|
|
92
114
|
*/
|
|
93
115
|
public static tryCreate(
|
|
94
116
|
logger: Logger,
|
|
@@ -140,10 +162,22 @@ export class ServiceFabric extends BaseManagedIdentitySource {
|
|
|
140
162
|
}
|
|
141
163
|
|
|
142
164
|
/**
|
|
143
|
-
* Creates
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
165
|
+
* Creates HTTP request parameters for acquiring an access token from the Service Fabric Managed Identity Token Service (MITS).
|
|
166
|
+
*
|
|
167
|
+
* This method constructs a properly formatted HTTP GET request that includes:
|
|
168
|
+
* - The secret header for authentication with MITS
|
|
169
|
+
* - API version parameter for the Service Fabric MSI endpoint
|
|
170
|
+
* - Resource parameter specifying the target Azure service
|
|
171
|
+
* - Optional identity parameters for user-assigned managed identities
|
|
172
|
+
*
|
|
173
|
+
* The request follows the Service Fabric managed identity protocol and uses the 2019-07-01-preview API version.
|
|
174
|
+
* For user-assigned identities, the appropriate query parameter (client_id, object_id, or resource_id) is added
|
|
175
|
+
* based on the identity type.
|
|
176
|
+
*
|
|
177
|
+
* @param resource - The Azure resource URI for which the access token is requested (e.g., "https://vault.azure.net/")
|
|
178
|
+
* @param managedIdentityId - The managed identity configuration specifying system-assigned or user-assigned identity details
|
|
179
|
+
*
|
|
180
|
+
* @returns A configured ManagedIdentityRequestParameters object ready for network execution
|
|
147
181
|
*/
|
|
148
182
|
public createRequest(
|
|
149
183
|
resource: string,
|
package/src/packageMetadata.ts
CHANGED