@azure/identity 4.14.0 → 4.15.0-beta.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.
Files changed (70) hide show
  1. package/README.md +19 -0
  2. package/dist/browser/constants.d.ts +1 -1
  3. package/dist/browser/constants.d.ts.map +1 -1
  4. package/dist/browser/constants.js +1 -1
  5. package/dist/browser/constants.js.map +1 -1
  6. package/dist/browser/credentials/gitHubActionsCredential-browser.d.mts +14 -0
  7. package/dist/browser/credentials/gitHubActionsCredential-browser.d.mts.map +1 -0
  8. package/dist/browser/credentials/gitHubActionsCredential-browser.mjs +23 -0
  9. package/dist/browser/credentials/gitHubActionsCredential-browser.mjs.map +1 -0
  10. package/dist/browser/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
  11. package/dist/browser/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
  12. package/dist/browser/credentials/gitHubActionsCredentialOptions.js +4 -0
  13. package/dist/browser/credentials/gitHubActionsCredentialOptions.js.map +1 -0
  14. package/dist/browser/index.d.ts +2 -0
  15. package/dist/browser/index.d.ts.map +1 -1
  16. package/dist/browser/index.js +1 -0
  17. package/dist/browser/index.js.map +1 -1
  18. package/dist/browser/package.json +1 -1
  19. package/dist/commonjs/constants.d.ts +1 -1
  20. package/dist/commonjs/constants.d.ts.map +1 -1
  21. package/dist/commonjs/constants.js +1 -1
  22. package/dist/commonjs/constants.js.map +1 -1
  23. package/dist/commonjs/credentials/gitHubActionsCredential.d.ts +54 -0
  24. package/dist/commonjs/credentials/gitHubActionsCredential.d.ts.map +1 -0
  25. package/dist/commonjs/credentials/gitHubActionsCredential.js +184 -0
  26. package/dist/commonjs/credentials/gitHubActionsCredential.js.map +7 -0
  27. package/dist/commonjs/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
  28. package/dist/commonjs/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
  29. package/dist/commonjs/credentials/gitHubActionsCredentialOptions.js +16 -0
  30. package/dist/commonjs/credentials/gitHubActionsCredentialOptions.js.map +7 -0
  31. package/dist/commonjs/index.d.ts +2 -0
  32. package/dist/commonjs/index.d.ts.map +1 -1
  33. package/dist/commonjs/index.js +3 -0
  34. package/dist/commonjs/index.js.map +2 -2
  35. package/dist/commonjs/package.json +1 -1
  36. package/dist/esm/constants.d.ts +1 -1
  37. package/dist/esm/constants.d.ts.map +1 -1
  38. package/dist/esm/constants.js +1 -1
  39. package/dist/esm/constants.js.map +1 -1
  40. package/dist/esm/credentials/gitHubActionsCredential.d.ts +54 -0
  41. package/dist/esm/credentials/gitHubActionsCredential.d.ts.map +1 -0
  42. package/dist/esm/credentials/gitHubActionsCredential.js +179 -0
  43. package/dist/esm/credentials/gitHubActionsCredential.js.map +1 -0
  44. package/dist/esm/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
  45. package/dist/esm/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
  46. package/dist/esm/credentials/gitHubActionsCredentialOptions.js +4 -0
  47. package/dist/esm/credentials/gitHubActionsCredentialOptions.js.map +1 -0
  48. package/dist/esm/index.d.ts +2 -0
  49. package/dist/esm/index.d.ts.map +1 -1
  50. package/dist/esm/index.js +1 -0
  51. package/dist/esm/index.js.map +1 -1
  52. package/dist/esm/package.json +1 -1
  53. package/dist/workerd/constants.d.ts +1 -1
  54. package/dist/workerd/constants.d.ts.map +1 -1
  55. package/dist/workerd/constants.js +1 -1
  56. package/dist/workerd/constants.js.map +1 -1
  57. package/dist/workerd/credentials/gitHubActionsCredential.d.ts +54 -0
  58. package/dist/workerd/credentials/gitHubActionsCredential.d.ts.map +1 -0
  59. package/dist/workerd/credentials/gitHubActionsCredential.js +179 -0
  60. package/dist/workerd/credentials/gitHubActionsCredential.js.map +1 -0
  61. package/dist/workerd/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
  62. package/dist/workerd/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
  63. package/dist/workerd/credentials/gitHubActionsCredentialOptions.js +4 -0
  64. package/dist/workerd/credentials/gitHubActionsCredentialOptions.js.map +1 -0
  65. package/dist/workerd/index.d.ts +2 -0
  66. package/dist/workerd/index.d.ts.map +1 -1
  67. package/dist/workerd/index.js +1 -0
  68. package/dist/workerd/index.js.map +1 -1
  69. package/dist/workerd/package.json +1 -1
  70. package/package.json +1 -1
package/README.md CHANGED
@@ -241,10 +241,29 @@ Not all credentials require this configuration. Credentials that authenticate th
241
241
  | Credential | Usage | Example | Reference |
242
242
  | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
243
243
  | [`AzurePipelinesCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/azurepipelinescredential?view=azure-node-latest) | Supports [Microsoft Entra Workload ID](https://learn.microsoft.com/azure/devops/pipelines/release/configure-workload-identity?view=azure-devops) on Azure Pipelines. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-in-azure-pipelines-with-service-connections) |
244
+ | `GitHubActionsCredential` | Authenticates a service principal using GitHub Actions OIDC federation. | [example](#authenticate-in-github-actions) | [Configuring OpenID Connect in Azure](https://docs.github.com/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-azure) |
244
245
  | [`ClientAssertionCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/clientassertioncredential?view=azure-node-latest) | Authenticates a service principal using a signed client assertion. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-service-principal-with-a-client-assertion) | [Service principal authentication](https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals) |
245
246
  | [`ClientCertificateCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/clientcertificatecredential?view=azure-node-latest) | Authenticates a service principal using a certificate. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-service-principal-with-a-client-certificate) | [Service principal authentication](https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals) |
246
247
  | [`ClientSecretCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/clientsecretcredential?view=azure-node-latest) | Authenticates a service principal using a secret. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-service-principal-with-a-client-secret) | [Service principal authentication](https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals) |
247
248
 
249
+ #### Authenticate in GitHub Actions
250
+
251
+ Configure the workflow with `id-token: write` permission and set `AZURE_TENANT_ID` and `AZURE_CLIENT_ID`. GitHub Actions supplies `ACTIONS_ID_TOKEN_REQUEST_URL` and `ACTIONS_ID_TOKEN_REQUEST_TOKEN` automatically.
252
+
253
+ ```yml
254
+ permissions:
255
+ id-token: write
256
+ contents: read
257
+ ```
258
+
259
+ ```ts snippet:ReadmeSampleGitHubActionsCredential
260
+ import { GitHubActionsCredential } from "@azure/identity";
261
+ import { KeyClient } from "@azure/keyvault-keys";
262
+
263
+ const credential = new GitHubActionsCredential();
264
+ const client = new KeyClient("https://<your-key-vault-name>.vault.azure.net", credential);
265
+ ```
266
+
248
267
  ### Authenticate users
249
268
 
250
269
  | Credential | Usage | Example | Reference |
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Current version of the `@azure/identity` package.
3
3
  */
4
- export declare const SDK_VERSION = "4.14.0";
4
+ export declare const SDK_VERSION = "4.15.0-beta.1";
5
5
  /**
6
6
  * The default client ID for authentication
7
7
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC;;;GAGG;AAIH,eAAO,MAAM,uBAAuB,yCAAyC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,e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AAO,MAAM,wBAAwB,eAAe,CAAC"}
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Current version of the `@azure/identity` package.
5
5
  */
6
- export const SDK_VERSION = `4.14.0`;
6
+ export const SDK_VERSION = `4.15.0-beta.1`;
7
7
  /**
8
8
  * The default client ID for authentication
9
9
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC;AAEpC;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.14.0`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.15.0-beta.1`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { GitHubActionsCredentialOptions } from "./gitHubActionsCredentialOptions.js";
3
+ /**
4
+ * Enables authentication to Microsoft Entra ID using GitHub Actions
5
+ * OIDC federated identity credentials.
6
+ */
7
+ export declare class GitHubActionsCredential implements TokenCredential {
8
+ /**
9
+ * Only available in Node.js
10
+ */
11
+ constructor(_options?: GitHubActionsCredentialOptions);
12
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
+ }
14
+ //# sourceMappingURL=gitHubActionsCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHubActionsCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAQ1F;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,eAAe;IAC7D;;OAEG;gBACS,QAAQ,CAAC,EAAE,8BAA8B;IAK9C,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -0,0 +1,23 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { credentialLogger, formatError } from "../util/logging.js";
4
+ const BrowserNotSupportedError = new Error("GitHubActionsCredential is not supported in the browser.");
5
+ const logger = credentialLogger("GitHubActionsCredential");
6
+ /**
7
+ * Enables authentication to Microsoft Entra ID using GitHub Actions
8
+ * OIDC federated identity credentials.
9
+ */
10
+ export class GitHubActionsCredential {
11
+ /**
12
+ * Only available in Node.js
13
+ */
14
+ constructor(_options) {
15
+ logger.info(formatError("", BrowserNotSupportedError));
16
+ throw BrowserNotSupportedError;
17
+ }
18
+ getToken(_scopes, _options) {
19
+ logger.getToken.info(formatError("", BrowserNotSupportedError));
20
+ throw BrowserNotSupportedError;
21
+ }
22
+ }
23
+ //# sourceMappingURL=gitHubActionsCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHubActionsCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,0DAA0D,CAC3D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAClC;;OAEG;IACH,YAAY,QAAyC;QACnD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { GitHubActionsCredentialOptions } from \"./gitHubActionsCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"GitHubActionsCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"GitHubActionsCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using GitHub Actions\n * OIDC federated identity credentials.\n */\nexport class GitHubActionsCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: GitHubActionsCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { AuthorityValidationOptions } from "./authorityValidationOptions.js";
2
+ import type { CredentialPersistenceOptions } from "./credentialPersistenceOptions.js";
3
+ import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
4
+ /**
5
+ * Optional parameters for the {@link GitHubActionsCredential} class.
6
+ */
7
+ export interface GitHubActionsCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
8
+ }
9
+ //# sourceMappingURL=gitHubActionsCredentialOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHubActionsCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,8BACf,SACE,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B;CAAG"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=gitHubActionsCredentialOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHubActionsCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Optional parameters for the {@link GitHubActionsCredential} class.\n */\nexport interface GitHubActionsCredentialOptions\n extends\n MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"]}
@@ -37,6 +37,8 @@ export type { DeviceCodeCredentialOptions } from "./credentials/deviceCodeCreden
37
37
  export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential-browser.mjs";
38
38
  export type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from "./credentials/azurePipelinesCredentialOptions.js";
39
39
  export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential-browser.mjs";
40
+ export { GitHubActionsCredential } from "./credentials/gitHubActionsCredential-browser.mjs";
41
+ export type { GitHubActionsCredentialOptions } from "./credentials/gitHubActionsCredentialOptions.js";
40
42
  export type { AuthorizationCodeCredentialOptions } from "./credentials/authorizationCodeCredentialOptions.js";
41
43
  export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential-browser.mjs";
42
44
  export type { AzurePowerShellCredentialOptions } from "./credentials/azurePowerShellCredentialOptions.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,4BAA4B,CAAC;AAE3C,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,KAAK,kCAAkC,GACxC,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AACjG,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AAC5G,YAAY,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAI9F,YAAY,EAA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AAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,eAAe,CAE3D;AAED,OAAO,EAAE,sBAAsB,EAAE,KAAK,6BAA6B,EAAE,MAAM,oBAAoB,CAAC"}
@@ -17,6 +17,7 @@ export { ManagedIdentityCredential } from "./credentials/managedIdentityCredenti
17
17
  export { DeviceCodeCredential } from "./credentials/deviceCodeCredential-browser.mjs";
18
18
  export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential-browser.mjs";
19
19
  export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential-browser.mjs";
20
+ export { GitHubActionsCredential } from "./credentials/gitHubActionsCredential-browser.mjs";
20
21
  export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential-browser.mjs";
21
22
  export { UsernamePasswordCredential } from "./credentials/usernamePasswordCredential-browser.mjs";
22
23
  export { VisualStudioCodeCredential } from "./credentials/visualStudioCodeCredential-browser.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,4BAA4B,CAAC;AAK3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,GAE5B,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAejG,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEjF,OAAO,EAAE,sBAAsB,EAAE,MAA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dentityPlugin } from \"./plugins/provider.js\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n type ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n type AuthenticationRequiredErrorOptions,\n} from \"./errors.js\";\n\nexport type { AuthenticationRecord } from \"./msal/types.js\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils.js\";\nexport type { TokenCredentialOptions } from \"./tokenCredentialOptions.js\";\nexport type { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions.js\";\nexport type { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions.js\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport type { BrokerAuthOptions } from \"./credentials/brokerAuthOptions.js\";\nexport type {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions.js\";\nexport type { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions.js\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential.js\";\n\nexport { ClientSecretCredential } from \"#platform/credentials/clientSecretCredential\";\nexport type { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions.js\";\n\nexport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\nexport type {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n DefaultAzureCredentialEnvVars,\n} from \"./credentials/defaultAzureCredentialOptions.js\";\n\nexport { EnvironmentCredential } from \"#platform/credentials/environmentCredential\";\nexport type { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions.js\";\n\nexport { ClientCertificateCredential } from \"#platform/credentials/clientCertificateCredential\";\nexport type {\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredentialModels.js\";\nexport type { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions.js\";\nexport { ClientAssertionCredential } from \"#platform/credentials/clientAssertionCredential\";\nexport type { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions.js\";\nexport type { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions.js\";\nexport { AzureCliCredential } from \"#platform/credentials/azureCliCredential\";\nexport type { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions.js\";\nexport { AzureDeveloperCliCredential } from \"#platform/credentials/azureDeveloperCliCredential\";\nexport type { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions.js\";\nexport { InteractiveBrowserCredential } from \"#platform/credentials/interactiveBrowserCredential\";\nexport type {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions.js\";\nexport { ManagedIdentityCredential } from \"#platform/credentials/managedIdentityCredential/index\";\nexport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential/options.js\";\nexport { DeviceCodeCredential } from \"#platform/credentials/deviceCodeCredential\";\nexport type {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions.js\";\nexport type { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions.js\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"#platform/credentials/azurePipelinesCredential\";\nexport type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions.js\";\nexport { AuthorizationCodeCredential } from \"#platform/credentials/authorizationCodeCredential\";\nexport type { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions.js\";\nexport { AzurePowerShellCredential } from \"#platform/credentials/azurePowerShellCredential\";\nexport type { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions.js\";\nexport type {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions.js\";\nexport { UsernamePasswordCredential } from \"#platform/credentials/usernamePasswordCredential\";\nexport type { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions.js\";\nexport { VisualStudioCodeCredential } from \"#platform/credentials/visualStudioCodeCredential\";\nexport type { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions.js\";\nexport { OnBehalfOfCredential } from \"#platform/credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"#platform/credentials/workloadIdentityCredential\";\nexport type { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions.js\";\nexport type { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions.js\";\nexport type { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\nexport type { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging.js\";\n\nexport { AzureAuthorityHosts } from \"./constants.js\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, type GetBearerTokenProviderOptions } from \"./tokenProvider.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,4BAA4B,CAAC;AAK3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAE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M,kDAAkD,CAAC;AAM9F,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,IAAI,sBAAsB,EAAE,CAAC;AACtC,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAsC,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"#platform/plugins/consumer\";\n\nexport type { IdentityPlugin } from \"./plugins/provider.js\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n type ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n type AuthenticationRequiredErrorOptions,\n} from \"./errors.js\";\n\nexport type { AuthenticationRecord } from \"./msal/types.js\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils.js\";\nexport type { TokenCredentialOptions } from \"./tokenCredentialOptions.js\";\nexport type { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions.js\";\nexport type { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions.js\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport type { BrokerAuthOptions } from \"./credentials/brokerAuthOptions.js\";\nexport type {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions.js\";\nexport type { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions.js\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential.js\";\n\nexport { ClientSecretCredential } from \"#platform/credentials/clientSecretCredential\";\nexport type { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions.js\";\n\nexport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\nexport type {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n DefaultAzureCredentialEnvVars,\n} from \"./credentials/defaultAzureCredentialOptions.js\";\n\nexport { EnvironmentCredential } from \"#platform/credentials/environmentCredential\";\nexport type { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions.js\";\n\nexport { ClientCertificateCredential } from \"#platform/credentials/clientCertificateCredential\";\nexport type {\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredentialModels.js\";\nexport type { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions.js\";\nexport { ClientAssertionCredential } from \"#platform/credentials/clientAssertionCredential\";\nexport type { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions.js\";\nexport type { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions.js\";\nexport { AzureCliCredential } from \"#platform/credentials/azureCliCredential\";\nexport type { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions.js\";\nexport { AzureDeveloperCliCredential } from \"#platform/credentials/azureDeveloperCliCredential\";\nexport type { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions.js\";\nexport { InteractiveBrowserCredential } from \"#platform/credentials/interactiveBrowserCredential\";\nexport type {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions.js\";\nexport { ManagedIdentityCredential } from \"#platform/credentials/managedIdentityCredential/index\";\nexport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential/options.js\";\nexport { DeviceCodeCredential } from \"#platform/credentials/deviceCodeCredential\";\nexport type {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions.js\";\nexport type { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions.js\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"#platform/credentials/azurePipelinesCredential\";\nexport type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions.js\";\nexport { AuthorizationCodeCredential } from \"#platform/credentials/authorizationCodeCredential\";\nexport { GitHubActionsCredential } from \"#platform/credentials/gitHubActionsCredential\";\nexport type { GitHubActionsCredentialOptions } from \"./credentials/gitHubActionsCredentialOptions.js\";\nexport type { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions.js\";\nexport { AzurePowerShellCredential } from \"#platform/credentials/azurePowerShellCredential\";\nexport type { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions.js\";\nexport type {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions.js\";\nexport { UsernamePasswordCredential } from \"#platform/credentials/usernamePasswordCredential\";\nexport type { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions.js\";\nexport { VisualStudioCodeCredential } from \"#platform/credentials/visualStudioCodeCredential\";\nexport type { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions.js\";\nexport { OnBehalfOfCredential } from \"#platform/credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"#platform/credentials/workloadIdentityCredential\";\nexport type { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions.js\";\nexport type { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions.js\";\nexport type { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\nexport type { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging.js\";\n\nexport { AzureAuthorityHosts } from \"./constants.js\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, type GetBearerTokenProviderOptions } from \"./tokenProvider.js\";\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/identity",
3
- "version": "4.14.0",
3
+ "version": "4.15.0-beta.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json"
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Current version of the `@azure/identity` package.
3
3
  */
4
- export declare const SDK_VERSION = "4.14.0";
4
+ export declare const SDK_VERSION = "4.15.0-beta.1";
5
5
  /**
6
6
  * The default client ID for authentication
7
7
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC;;;GAGG;AAIH,eAAO,MAAM,uBAAuB,yCAAyC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,UAAU,mCAAmC;IAC7C;;;;;SAKK;IACL,YAAY,qCAAqC;IACjD;;OAEG;IACH,eAAe,qCAAqC;IACpD;;OAEG;IACH,gBAAgB,sCAAsC;CACvD;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,EAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,eAAe,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAE3C;;;GAGG;AAIH,eAAO,MAAM,uBAAuB,yCAAyC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,UAAU,mCAAmC;IAC7C;;;;;SAKK;IACL,YAAY,qCAAqC;IACjD;;OAEG;IACH,eAAe,qCAAqC;IACpD;;OAEG;IACH,gBAAgB,sCAAsC;CACvD;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,EAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,eAAe,CAAC"}
@@ -29,7 +29,7 @@ __export(constants_exports, {
29
29
  SDK_VERSION: () => SDK_VERSION
30
30
  });
31
31
  module.exports = __toCommonJS(constants_exports);
32
- const SDK_VERSION = `4.14.0`;
32
+ const SDK_VERSION = `4.15.0-beta.1`;
33
33
  const DeveloperSignOnClientId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46";
34
34
  const DefaultTenantId = "common";
35
35
  var AzureAuthorityHosts = /* @__PURE__ */ ((AzureAuthorityHosts2) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.14.0`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.15.0-beta.1`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,cAAc;AASpB,MAAM,0BAA0B;AAMhC,MAAM,kBAAkB;AAKxB,IAAK,sBAAL,kBAAKA,yBAAL;AAIL,EAAAA,qBAAA,gBAAa;AAOb,EAAAA,qBAAA,kBAAe;AAIf,EAAAA,qBAAA,qBAAkB;AAIlB,EAAAA,qBAAA,sBAAmB;AAnBT,SAAAA;AAAA,GAAA;AA0BL,MAAM,uBAAuB;AAM7B,MAAM,mBAAmB;AAMzB,MAAM,cAAwB,CAAC,GAAG;AAKlC,MAAM,mBAAmB;AAKzB,MAAM,uBAAuB;AAQ7B,MAAM,2BAA2B;",
6
6
  "names": ["AzureAuthorityHosts"]
7
7
  }
@@ -0,0 +1,54 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { GitHubActionsCredentialOptions } from "./gitHubActionsCredentialOptions.js";
3
+ import type { PipelineResponse } from "@azure/core-rest-pipeline";
4
+ /**
5
+ * Derives the OIDC audience from the authority host for sovereign cloud support.
6
+ * @internal
7
+ */
8
+ export declare function deriveAudience(authorityHost: string): string;
9
+ /**
10
+ * Enables authentication to Microsoft Entra ID using GitHub Actions
11
+ * OIDC federated identity credentials.
12
+ *
13
+ * This credential is designed for use in GitHub Actions workflows that have
14
+ * `permissions: id-token: write` configured. It reads the following environment
15
+ * variables:
16
+ * - `AZURE_TENANT_ID` — The Entra ID tenant.
17
+ * - `AZURE_CLIENT_ID` — The client ID of the app registration with a federated identity credential.
18
+ * - `ACTIONS_ID_TOKEN_REQUEST_URL` — Set automatically by GitHub Actions runner.
19
+ * - `ACTIONS_ID_TOKEN_REQUEST_TOKEN` — Set automatically by GitHub Actions runner.
20
+ */
21
+ export declare class GitHubActionsCredential implements TokenCredential {
22
+ private clientAssertionCredential;
23
+ private identityClient;
24
+ /**
25
+ * Creates a new instance of GitHubActionsCredential.
26
+ *
27
+ * Reads `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` from environment variables,
28
+ * as well as GitHub Actions OIDC variables `ACTIONS_ID_TOKEN_REQUEST_URL` and
29
+ * `ACTIONS_ID_TOKEN_REQUEST_TOKEN`.
30
+ *
31
+ * @param options - Options to configure the credential.
32
+ */
33
+ constructor(options?: GitHubActionsCredentialOptions);
34
+ /**
35
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
36
+ * If authentication fails, a {@link CredentialUnavailableError} or
37
+ * {@link AuthenticationError} will be thrown with the details of the failure.
38
+ *
39
+ * @param scopes - The list of scopes for which the token will have access.
40
+ * @param options - The options used to configure any requests this
41
+ * TokenCredential implementation might make.
42
+ */
43
+ getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
44
+ /**
45
+ * Requests an OIDC token from the GitHub Actions OIDC provider.
46
+ */
47
+ private requestOidcToken;
48
+ }
49
+ /**
50
+ * Parses the OIDC token response from GitHub's OIDC provider.
51
+ * @internal
52
+ */
53
+ export declare function handleOidcResponse(response: PipelineResponse): string;
54
+ //# sourceMappingURL=gitHubActionsCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHubActionsCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAItF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAgClE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAc5D;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CAAC,yBAAyB,CAA4B;IAC7D,OAAO,CAAC,cAAc,CAAiB;IAEvC;;;;;;;;OAQG;gBACS,OAAO,GAAE,8BAAmC;IA0CxD;;;;;;;;OAQG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,WAAW,CAAC;IAKvB;;OAEG;YACW,gBAAgB;CAuB/B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CA8CrE"}
@@ -0,0 +1,184 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var gitHubActionsCredential_exports = {};
19
+ __export(gitHubActionsCredential_exports, {
20
+ GitHubActionsCredential: () => GitHubActionsCredential,
21
+ deriveAudience: () => deriveAudience,
22
+ handleOidcResponse: () => handleOidcResponse
23
+ });
24
+ module.exports = __toCommonJS(gitHubActionsCredential_exports);
25
+ var import_errors = require("../errors.js");
26
+ var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
27
+ var import_clientAssertionCredential = require("./clientAssertionCredential.js");
28
+ var import_identityClient = require("../client/identityClient.js");
29
+ var import_tenantIdUtils = require("../util/tenantIdUtils.js");
30
+ var import_logging = require("../util/logging.js");
31
+ var import_authorityHost = require("../util/authorityHost.js");
32
+ const credentialName = "GitHubActionsCredential";
33
+ const logger = (0, import_logging.credentialLogger)(credentialName);
34
+ const troubleshootingGuide = "https://aka.ms/azsdk/js/identity/troubleshoot";
35
+ const ErrorMessages = {
36
+ TENANT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_TENANT_ID environment variable to use this credential.`,
37
+ CLIENT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_CLIENT_ID environment variable to use this credential.`,
38
+ GITHUB_ENV_VARS_REQUIRED: (missing) => `${credentialName}: is unavailable. Ensure that you're running this task in a GitHub Actions workflow with 'permissions: id-token: write' so that the following missing system variable(s) can be defined: ${missing}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,
39
+ UNSUPPORTED_AUTHORITY_HOST: (authorityHost) => `${credentialName}: is unavailable. The authority host "${authorityHost}" is not supported.`,
40
+ NULL_OIDC_TOKEN: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,
41
+ OIDC_REQUEST_FAILED: (status) => `${credentialName}: Authentication Failed. OIDC request returned status code ${status}.`,
42
+ OIDC_VALUE_MISSING: `${credentialName}: Authentication Failed. "value" field not detected in the response.`,
43
+ OIDC_RESPONSE_PARSE_FAILED: `${credentialName}: Authentication Failed. Failed to parse OIDC response.`
44
+ };
45
+ const audienceByAuthorityHost = {
46
+ "login.microsoftonline.com": "api://AzureADTokenExchange",
47
+ "login.chinacloudapi.cn": "api://AzureADTokenExchangeChina",
48
+ "login.microsoftonline.us": "api://AzureADTokenExchangeUSGov",
49
+ "login.sovcloud-identity.fr": "api://AzureADTokenExchangeFrance",
50
+ "login.sovcloud-identity.de": "api://AzureADTokenExchangeGermany",
51
+ "login.sovcloud-identity.sg": "api://AzureADTokenExchangeGovSG"
52
+ };
53
+ function deriveAudience(authorityHost) {
54
+ let hostname;
55
+ try {
56
+ hostname = new URL(authorityHost).hostname.toLowerCase();
57
+ } catch {
58
+ throw new import_errors.CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));
59
+ }
60
+ const audience = audienceByAuthorityHost[hostname];
61
+ if (!audience) {
62
+ throw new import_errors.CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));
63
+ }
64
+ return audience;
65
+ }
66
+ class GitHubActionsCredential {
67
+ clientAssertionCredential;
68
+ identityClient;
69
+ /**
70
+ * Creates a new instance of GitHubActionsCredential.
71
+ *
72
+ * Reads `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` from environment variables,
73
+ * as well as GitHub Actions OIDC variables `ACTIONS_ID_TOKEN_REQUEST_URL` and
74
+ * `ACTIONS_ID_TOKEN_REQUEST_TOKEN`.
75
+ *
76
+ * @param options - Options to configure the credential.
77
+ */
78
+ constructor(options = {}) {
79
+ const tenantId = process.env.AZURE_TENANT_ID;
80
+ const clientId = process.env.AZURE_CLIENT_ID;
81
+ if (!tenantId) {
82
+ throw new import_errors.CredentialUnavailableError(ErrorMessages.TENANT_ID_REQUIRED);
83
+ }
84
+ if (!clientId) {
85
+ throw new import_errors.CredentialUnavailableError(ErrorMessages.CLIENT_ID_REQUIRED);
86
+ }
87
+ this.identityClient = new import_identityClient.IdentityClient(options);
88
+ (0, import_tenantIdUtils.checkTenantId)(logger, tenantId);
89
+ const oidcRequestUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
90
+ const oidcRequestToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
91
+ if (!oidcRequestUrl || !oidcRequestToken) {
92
+ const missing = [
93
+ !oidcRequestUrl ? "ACTIONS_ID_TOKEN_REQUEST_URL" : "",
94
+ !oidcRequestToken ? "ACTIONS_ID_TOKEN_REQUEST_TOKEN" : ""
95
+ ].filter(Boolean).join(", ");
96
+ throw new import_errors.CredentialUnavailableError(ErrorMessages.GITHUB_ENV_VARS_REQUIRED(missing));
97
+ }
98
+ const authorityHost = (0, import_authorityHost.getAuthorityHost)(options);
99
+ const audience = deriveAudience(authorityHost);
100
+ logger.info(
101
+ `Invoking GitHubActionsCredential with tenant ID: ${tenantId}, client ID: ${clientId}`
102
+ );
103
+ this.clientAssertionCredential = new import_clientAssertionCredential.ClientAssertionCredential(
104
+ tenantId,
105
+ clientId,
106
+ this.requestOidcToken.bind(this, oidcRequestUrl, oidcRequestToken, audience),
107
+ options
108
+ );
109
+ }
110
+ /**
111
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
112
+ * If authentication fails, a {@link CredentialUnavailableError} or
113
+ * {@link AuthenticationError} will be thrown with the details of the failure.
114
+ *
115
+ * @param scopes - The list of scopes for which the token will have access.
116
+ * @param options - The options used to configure any requests this
117
+ * TokenCredential implementation might make.
118
+ */
119
+ async getToken(scopes, options) {
120
+ logger.getToken.info(`Using the scopes ${Array.isArray(scopes) ? scopes.join(", ") : scopes}`);
121
+ return this.clientAssertionCredential.getToken(scopes, options);
122
+ }
123
+ /**
124
+ * Requests an OIDC token from the GitHub Actions OIDC provider.
125
+ */
126
+ async requestOidcToken(oidcRequestUrl, oidcRequestToken, audience) {
127
+ logger.info("Requesting OIDC token from GitHub Actions...");
128
+ const url = new URL(oidcRequestUrl);
129
+ url.searchParams.set("audience", audience);
130
+ const request = (0, import_core_rest_pipeline.createPipelineRequest)({
131
+ url: url.toString(),
132
+ method: "GET",
133
+ headers: (0, import_core_rest_pipeline.createHttpHeaders)({
134
+ Authorization: `Bearer ${oidcRequestToken}`
135
+ })
136
+ });
137
+ const response = await this.identityClient.sendRequest(request);
138
+ return handleOidcResponse(response);
139
+ }
140
+ }
141
+ function handleOidcResponse(response) {
142
+ const text = response.bodyAsText;
143
+ if (!text) {
144
+ logger.error(`${ErrorMessages.NULL_OIDC_TOKEN} Status code: ${response.status}.`);
145
+ throw new import_errors.AuthenticationError(response.status, {
146
+ error: ErrorMessages.NULL_OIDC_TOKEN,
147
+ error_description: `Status code: ${response.status}. See the troubleshooting guide for more information: ${troubleshootingGuide}`
148
+ });
149
+ }
150
+ if (response.status !== 200) {
151
+ const errorMessage2 = ErrorMessages.OIDC_REQUEST_FAILED(response.status);
152
+ logger.error(errorMessage2);
153
+ throw new import_errors.AuthenticationError(response.status, {
154
+ error: errorMessage2,
155
+ error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`
156
+ });
157
+ }
158
+ let result;
159
+ try {
160
+ result = JSON.parse(text);
161
+ } catch {
162
+ logger.error(ErrorMessages.OIDC_RESPONSE_PARSE_FAILED);
163
+ throw new import_errors.AuthenticationError(response.status, {
164
+ error: ErrorMessages.OIDC_RESPONSE_PARSE_FAILED,
165
+ error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`
166
+ });
167
+ }
168
+ if (typeof result === "object" && result !== null && "value" in result && typeof result.value === "string" && result.value) {
169
+ return result.value;
170
+ }
171
+ const errorMessage = ErrorMessages.OIDC_VALUE_MISSING;
172
+ logger.error(errorMessage);
173
+ throw new import_errors.AuthenticationError(response.status, {
174
+ error: errorMessage,
175
+ error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`
176
+ });
177
+ }
178
+ // Annotate the CommonJS export names for ESM import in node:
179
+ 0 && (module.exports = {
180
+ GitHubActionsCredential,
181
+ deriveAudience,
182
+ handleOidcResponse
183
+ });
184
+ //# sourceMappingURL=gitHubActionsCredential.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/credentials/gitHubActionsCredential.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { AuthenticationError, CredentialUnavailableError } from \"../errors.js\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\n\nimport type { GitHubActionsCredentialOptions } from \"./gitHubActionsCredentialOptions.js\";\nimport { ClientAssertionCredential } from \"./clientAssertionCredential.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport { credentialLogger } from \"../util/logging.js\";\nimport { getAuthorityHost } from \"../util/authorityHost.js\";\n\nconst credentialName = \"GitHubActionsCredential\";\nconst logger = credentialLogger(credentialName);\nconst troubleshootingGuide = \"https://aka.ms/azsdk/js/identity/troubleshoot\";\n\nconst ErrorMessages = {\n TENANT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_TENANT_ID environment variable to use this credential.`,\n CLIENT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_CLIENT_ID environment variable to use this credential.`,\n GITHUB_ENV_VARS_REQUIRED: (missing: string) =>\n `${credentialName}: is unavailable. Ensure that you're running this task in a GitHub Actions workflow with 'permissions: id-token: write' so that the following missing system variable(s) can be defined: ${missing}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n UNSUPPORTED_AUTHORITY_HOST: (authorityHost: string) =>\n `${credentialName}: is unavailable. The authority host \"${authorityHost}\" is not supported.`,\n NULL_OIDC_TOKEN: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,\n OIDC_REQUEST_FAILED: (status: number) =>\n `${credentialName}: Authentication Failed. OIDC request returned status code ${status}.`,\n OIDC_VALUE_MISSING: `${credentialName}: Authentication Failed. \"value\" field not detected in the response.`,\n OIDC_RESPONSE_PARSE_FAILED: `${credentialName}: Authentication Failed. Failed to parse OIDC response.`,\n};\n\nconst audienceByAuthorityHost: Readonly<Record<string, string>> = {\n \"login.microsoftonline.com\": \"api://AzureADTokenExchange\",\n \"login.chinacloudapi.cn\": \"api://AzureADTokenExchangeChina\",\n \"login.microsoftonline.us\": \"api://AzureADTokenExchangeUSGov\",\n \"login.sovcloud-identity.fr\": \"api://AzureADTokenExchangeFrance\",\n \"login.sovcloud-identity.de\": \"api://AzureADTokenExchangeGermany\",\n \"login.sovcloud-identity.sg\": \"api://AzureADTokenExchangeGovSG\",\n};\n\n/**\n * Derives the OIDC audience from the authority host for sovereign cloud support.\n * @internal\n */\nexport function deriveAudience(authorityHost: string): string {\n let hostname: string;\n try {\n hostname = new URL(authorityHost).hostname.toLowerCase();\n } catch {\n throw new CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));\n }\n\n const audience = audienceByAuthorityHost[hostname];\n if (!audience) {\n throw new CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));\n }\n\n return audience;\n}\n\n/**\n * Enables authentication to Microsoft Entra ID using GitHub Actions\n * OIDC federated identity credentials.\n *\n * This credential is designed for use in GitHub Actions workflows that have\n * `permissions: id-token: write` configured. It reads the following environment\n * variables:\n * - `AZURE_TENANT_ID` \u2014 The Entra ID tenant.\n * - `AZURE_CLIENT_ID` \u2014 The client ID of the app registration with a federated identity credential.\n * - `ACTIONS_ID_TOKEN_REQUEST_URL` \u2014 Set automatically by GitHub Actions runner.\n * - `ACTIONS_ID_TOKEN_REQUEST_TOKEN` \u2014 Set automatically by GitHub Actions runner.\n */\nexport class GitHubActionsCredential implements TokenCredential {\n private clientAssertionCredential: ClientAssertionCredential;\n private identityClient: IdentityClient;\n\n /**\n * Creates a new instance of GitHubActionsCredential.\n *\n * Reads `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` from environment variables,\n * as well as GitHub Actions OIDC variables `ACTIONS_ID_TOKEN_REQUEST_URL` and\n * `ACTIONS_ID_TOKEN_REQUEST_TOKEN`.\n *\n * @param options - Options to configure the credential.\n */\n constructor(options: GitHubActionsCredentialOptions = {}) {\n const tenantId = process.env.AZURE_TENANT_ID;\n const clientId = process.env.AZURE_CLIENT_ID;\n\n if (!tenantId) {\n throw new CredentialUnavailableError(ErrorMessages.TENANT_ID_REQUIRED);\n }\n if (!clientId) {\n throw new CredentialUnavailableError(ErrorMessages.CLIENT_ID_REQUIRED);\n }\n\n this.identityClient = new IdentityClient(options);\n checkTenantId(logger, tenantId);\n\n const oidcRequestUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;\n const oidcRequestToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;\n\n if (!oidcRequestUrl || !oidcRequestToken) {\n const missing = [\n !oidcRequestUrl ? \"ACTIONS_ID_TOKEN_REQUEST_URL\" : \"\",\n !oidcRequestToken ? \"ACTIONS_ID_TOKEN_REQUEST_TOKEN\" : \"\",\n ]\n .filter(Boolean)\n .join(\", \");\n throw new CredentialUnavailableError(ErrorMessages.GITHUB_ENV_VARS_REQUIRED(missing));\n }\n\n const authorityHost = getAuthorityHost(options);\n const audience = deriveAudience(authorityHost);\n\n logger.info(\n `Invoking GitHubActionsCredential with tenant ID: ${tenantId}, client ID: ${clientId}`,\n );\n\n this.clientAssertionCredential = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.requestOidcToken.bind(this, oidcRequestUrl, oidcRequestToken, audience),\n options,\n );\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} or\n * {@link AuthenticationError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options?: GetTokenOptions,\n ): Promise<AccessToken> {\n logger.getToken.info(`Using the scopes ${Array.isArray(scopes) ? scopes.join(\", \") : scopes}`);\n return this.clientAssertionCredential.getToken(scopes, options);\n }\n\n /**\n * Requests an OIDC token from the GitHub Actions OIDC provider.\n */\n private async requestOidcToken(\n oidcRequestUrl: string,\n oidcRequestToken: string,\n audience: string,\n ): Promise<string> {\n logger.info(\"Requesting OIDC token from GitHub Actions...\");\n\n // GitHub OIDC endpoint uses GET (not POST like Azure Pipelines).\n // Audience is appended as a query parameter.\n const url = new URL(oidcRequestUrl);\n url.searchParams.set(\"audience\", audience);\n\n const request = createPipelineRequest({\n url: url.toString(),\n method: \"GET\",\n headers: createHttpHeaders({\n Authorization: `Bearer ${oidcRequestToken}`,\n }),\n });\n\n const response = await this.identityClient.sendRequest(request);\n return handleOidcResponse(response);\n }\n}\n\n/**\n * Parses the OIDC token response from GitHub's OIDC provider.\n * @internal\n */\nexport function handleOidcResponse(response: PipelineResponse): string {\n const text = response.bodyAsText;\n if (!text) {\n logger.error(`${ErrorMessages.NULL_OIDC_TOKEN} Status code: ${response.status}.`);\n throw new AuthenticationError(response.status, {\n error: ErrorMessages.NULL_OIDC_TOKEN,\n error_description: `Status code: ${response.status}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n }\n\n if (response.status !== 200) {\n const errorMessage = ErrorMessages.OIDC_REQUEST_FAILED(response.status);\n logger.error(errorMessage);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n }\n\n let result: unknown;\n try {\n result = JSON.parse(text) as unknown;\n } catch {\n logger.error(ErrorMessages.OIDC_RESPONSE_PARSE_FAILED);\n throw new AuthenticationError(response.status, {\n error: ErrorMessages.OIDC_RESPONSE_PARSE_FAILED,\n error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n }\n\n if (\n typeof result === \"object\" &&\n result !== null &&\n \"value\" in result &&\n typeof result.value === \"string\" &&\n result.value\n ) {\n return result.value;\n }\n\n const errorMessage = ErrorMessages.OIDC_VALUE_MISSING;\n logger.error(errorMessage);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAAgE;AAChE,gCAAyD;AAGzD,uCAA0C;AAC1C,4BAA+B;AAE/B,2BAA8B;AAC9B,qBAAiC;AACjC,2BAAiC;AAEjC,MAAM,iBAAiB;AACvB,MAAM,aAAS,iCAAiB,cAAc;AAC9C,MAAM,uBAAuB;AAE7B,MAAM,gBAAgB;AAAA,EACpB,oBAAoB,GAAG,cAAc;AAAA,EACrC,oBAAoB,GAAG,cAAc;AAAA,EACrC,0BAA0B,CAAC,YACzB,GAAG,cAAc,4LAA4L,OAAO,yDAAyD,oBAAoB;AAAA,EACnS,4BAA4B,CAAC,kBAC3B,GAAG,cAAc,yCAAyC,aAAa;AAAA,EACzE,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AS,QAAQ;AAAA,MAC7C,OAAO,cAAc;AAAA,MACrB,mBAAmB,gBAAgB,SAAS,MAAM,yDAAyD,oBAAoB;AAAA,IACjI,CAAC;AAAA,EACH;AAEA,MAAI,SAAS,WAAW,KAAK;AAC3B,UAAMA,gBAAe,cAAc,oBAAoB,SAAS,MAAM;AACtE,WAAO,MAAMA,aAAY;AACzB,UAAM,IAAI,kCAAoB,SAAS,QAAQ;AAAA,MAC7C,OAAOA;AAAA,MACP,mBAAmB,uDAAuD,oBAAoB;AAAA,IAChG,CAAC;AAAA,EACH;AAEA,MAAI;AACJ,MAAI;AACF,aAAS,KAAK,MAAM,IAAI;AAAA,EAC1B,QAAQ;AACN,WAAO,MAAM,cAAc,0BAA0B;AACrD,UAAM,IAAI,kCAAoB,SAAS,QAAQ;AAAA,MAC7C,OAAO,cAAc;AAAA,MACrB,mBAAmB,uDAAuD,oBAAoB;AAAA,IAChG,CAAC;AAAA,EACH;AAEA,MACE,OAAO,WAAW,YAClB,WAAW,QACX,WAAW,UACX,OAAO,OAAO,UAAU,YACxB,OAAO,OACP;AACA,WAAO,OAAO;AAAA,EAChB;AAEA,QAAM,eAAe,cAAc;AACnC,SAAO,MAAM,YAAY;AACzB,QAAM,IAAI,kCAAoB,SAAS,QAAQ;AAAA,IAC7C,OAAO;AAAA,IACP,mBAAmB,uDAAuD,oBAAoB;AAAA,EAChG,CAAC;AACH;",
6
+ "names": ["errorMessage"]
7
+ }
@@ -0,0 +1,9 @@
1
+ import type { AuthorityValidationOptions } from "./authorityValidationOptions.js";
2
+ import type { CredentialPersistenceOptions } from "./credentialPersistenceOptions.js";
3
+ import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
4
+ /**
5
+ * Optional parameters for the {@link GitHubActionsCredential} class.
6
+ */
7
+ export interface GitHubActionsCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
8
+ }
9
+ //# sourceMappingURL=gitHubActionsCredentialOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHubActionsCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,8BACf,SACE,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B;CAAG"}
@@ -0,0 +1,16 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var gitHubActionsCredentialOptions_exports = {};
15
+ module.exports = __toCommonJS(gitHubActionsCredentialOptions_exports);
16
+ //# sourceMappingURL=gitHubActionsCredentialOptions.js.map