@azure/identity 3.3.0-alpha.20230811.1 → 3.3.1-alpha.20230815.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.

Potentially problematic release.


This version of @azure/identity might be problematic. Click here for more details.

package/README.md CHANGED
@@ -137,6 +137,12 @@ If used from Node.js, the `DefaultAzureCredential` will attempt to authenticate
137
137
  1. **Azure CLI** - If the developer has authenticated an account via the Azure CLI `az login` command, the `DefaultAzureCredential` will authenticate with that account.
138
138
  1. **Azure PowerShell** - If the developer has authenticated using the Azure PowerShell module `Connect-AzAccount` command, the `DefaultAzureCredential` will authenticate with that account.
139
139
 
140
+ #### Continuation policy
141
+
142
+ As of version 3.3.0, `DefaultAzureCredential` will attempt to authenticate with all developer credentials until one succeeds, regardless of any errors previous developer credentials experienced. For example, a developer credential may attempt to get a token and fail, so `DefaultAzureCredential` will continue to the next credential in the flow. Deployed service credentials will stop the flow with a thrown exception if they're able to attempt token retrieval, but don't receive one.
143
+
144
+ This allows for trying all of the developer credentials on your machine while having predictable deployed behavior.
145
+
140
146
  #### Note about `VisualStudioCodeCredential`
141
147
 
142
148
  Due to a [known issue](https://github.com/Azure/azure-sdk-for-js/issues/20500), `VisualStudioCodeCredential` has been removed from the `DefaultAzureCredential` token chain. When the issue is resolved in a future release, this change will be reverted.
@@ -298,6 +304,10 @@ Not all credentials require this configuration. Credentials that authenticate th
298
304
 
299
305
  Configuration is attempted in the above order. For example, if values for a client secret and certificate are both present, the client secret will be used.
300
306
 
307
+ ## Continuous Access Evaluation
308
+
309
+ As of version 3.3.0, accessing resources protected by [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) (CAE) is possible on a per-request basis. This can be enabled using the [`GetTokenOptions.enableCae(boolean)` API](https://learn.microsoft.com/javascript/api/@azure/core-auth/gettokenoptions?view=azure-node-latest#@azure-core-auth-gettokenoptions-enablecae). CAE isn't supported for developer credentials.
310
+
301
311
  ## Token caching
302
312
 
303
313
  Token caching is a feature provided by the Azure Identity library that allows apps to:
@@ -310,69 +320,6 @@ The Azure Identity library offers both in-memory and persistent disk caching. Fo
310
320
 
311
321
  ## Troubleshooting
312
322
 
313
- ### Error handling
314
-
315
- Credentials raise `AuthenticationError` when they fail to authenticate. This class has a `message` field which describes why authentication failed. An `AggregateAuthenticationError` will be raised by `ChainedTokenCredential` with an `errors` field containing an array of errors from each credential in the chain.
316
-
317
- ### Logging
318
-
319
- Enabling logging may help uncover useful information about failures.
320
-
321
- To see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`.
322
- You can read this environment variable from the _.env_ file by explicitly specifying a file path:
323
-
324
- ```javascript
325
- require("dotenv").config({ path: ".env" });
326
- ```
327
-
328
- Alternatively, logging can be enabled at runtime by calling `setLogLevel` from the `@azure/logger` package:
329
-
330
- ```typescript
331
- import { setLogLevel } from "@azure/logger";
332
-
333
- setLogLevel("info");
334
- ```
335
-
336
- In cases where the authenticate code might be running in an environment with more than one credential available,
337
- the `@azure/identity` package offers a unique form of logging. On the optional parameters for every credential,
338
- developers can set `allowLoggingAccountIdentifiers` to true in the
339
- `loggingOptions` to log information specific to the authenticated account after
340
- each successful authentication, including the Client ID, the Tenant ID, the
341
- Object ID of the authenticated user, and if possible the User Principal Name.
342
-
343
- For example, using the `DefaultAzureCredential`:
344
-
345
- ```ts
346
- import { setLogLevel } from "@azure/logger";
347
-
348
- setLogLevel("info");
349
-
350
- const credential = new DefaultAzureCredential({
351
- loggingOptions: { allowLoggingAccountIdentifiers: true },
352
- });
353
- ```
354
-
355
- Once that credential authenticates, the following message will appear in the logs (with the real information instead of `HIDDEN`):
356
-
357
- ```
358
- azure:identity:info [Authenticated account] Client ID: HIDDEN. Tenant ID: HIDDEN. User Principal Name: HIDDEN. Object ID (user): HIDDEN
359
- ```
360
-
361
- In cases where the user's [Personally Identifiable Information](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/PII) needs to be logged for customer support, developers can set `enableSupportLogging` to true in the
362
- `loggingOptions`.
363
-
364
- For example, using the `DefaultAzureCredential`:
365
-
366
- ```ts
367
- import { setLogLevel } from "@azure/logger";
368
-
369
- setLogLevel("info");
370
-
371
- const credential = new DefaultAzureCredential({
372
- loggingOptions: { enableSupportLogging: true },
373
- });
374
- ```
375
-
376
323
  For assistance with troubleshooting, see the [troubleshooting guide](https://aka.ms/azsdk/js/identity/troubleshoot).
377
324
 
378
325
  ## Next steps
package/dist/index.js CHANGED
@@ -257,7 +257,7 @@ function credentialLogger(title, log = logger$n) {
257
257
  /**
258
258
  * Current version of the `@azure/identity` package.
259
259
  */
260
- const SDK_VERSION = `3.3.0`;
260
+ const SDK_VERSION = `3.3.1`;
261
261
  /**
262
262
  * The default client ID for authentication
263
263
  * @internal