@microsoft/vscode-azext-azureauth 4.0.3 → 4.1.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/AzureFederatedCredentialsGuide.md +174 -174
- package/CHANGELOG.md +98 -90
- package/LICENSE.md +21 -21
- package/README.md +156 -152
- package/out/src/AzureAuthentication.d.ts +21 -21
- package/out/src/AzureAuthentication.js +6 -6
- package/out/src/AzureDevOpsSubscriptionProvider.d.ts +68 -68
- package/out/src/AzureDevOpsSubscriptionProvider.js +256 -256
- package/out/src/AzureSubscription.d.ts +49 -49
- package/out/src/AzureSubscription.js +6 -6
- package/out/src/AzureSubscriptionProvider.d.ts +82 -63
- package/out/src/AzureSubscriptionProvider.js +6 -6
- package/out/src/AzureTenant.d.ts +5 -5
- package/out/src/AzureTenant.js +6 -6
- package/out/src/NotSignedInError.d.ts +15 -15
- package/out/src/NotSignedInError.js +29 -29
- package/out/src/VSCodeAzureSubscriptionProvider.d.ts +117 -113
- package/out/src/VSCodeAzureSubscriptionProvider.js +394 -386
- package/out/src/getSessionFromVSCode.d.ts +12 -12
- package/out/src/getSessionFromVSCode.js +64 -64
- package/out/src/index.d.ts +10 -10
- package/out/src/index.js +30 -30
- package/out/src/signInToTenant.d.ts +6 -6
- package/out/src/signInToTenant.js +64 -64
- package/out/src/utils/configuredAzureEnv.d.ts +24 -24
- package/out/src/utils/configuredAzureEnv.js +94 -94
- package/out/src/utils/getUnauthenticatedTenants.d.ts +6 -6
- package/out/src/utils/getUnauthenticatedTenants.js +57 -57
- package/package.json +61 -61
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
# Setting up workflow identity federation with Azure DevOps
|
|
2
|
-
|
|
3
|
-
This guide describes how to set up your Azure DevOps (ADO) and Azure environment to leverage [workflow identity federation](https://learn.microsoft.com/entra/workload-id/workload-identity-federation), enabling you to use
|
|
4
|
-
`AzureDevOpsSubscriptionProvider` provided in this section. See the [README](README.md#azure-devops-subscription-provider) for more details.
|
|
5
|
-
|
|
6
|
-
## 1. Create a new service principal
|
|
7
|
-
|
|
8
|
-
Create a new service principal on which you will assign the necessary permissions. In this example, we use an app registration:
|
|
9
|
-
|
|
10
|
-
1. Navigate to the [App Registrations](https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page on the Azure portal
|
|
11
|
-
2. Click on `New Registration`
|
|
12
|
-
|
|
13
|
-

|
|
14
|
-
|
|
15
|
-
3. Assign any name
|
|
16
|
-
4. Make sure to select the first option for the account type (`Accounts in this organization directory only (Microsoft only - Single tenant)`)
|
|
17
|
-
5. Leave the Redirect URI and Service Tree ID fields empty
|
|
18
|
-
6. Click on `Register`
|
|
19
|
-
|
|
20
|
-

|
|
21
|
-
|
|
22
|
-
## 2. Create a new Azure DevOps (ADO) Service Connection:
|
|
23
|
-
|
|
24
|
-
Create a new ADO service connection under your organization's project. In this example, we create it under the DevDiv project:
|
|
25
|
-
|
|
26
|
-
1. Navigate to the [organization's (DevDiv) ADO page](https://devdiv.visualstudio.com/DevDiv)
|
|
27
|
-
2. Navigate to the settings page by clicking on the gear icon on the bottom left
|
|
28
|
-
3. Select the ["service connections"](https://devdiv.visualstudio.com/DevDiv/_settings/adminservices) blade from the panel on the left
|
|
29
|
-
|
|
30
|
-

|
|
31
|
-
|
|
32
|
-
4. Create a new service connection by clicking on the `New service connection` button
|
|
33
|
-
|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
5. Select `Azure Resource Manager` as the type
|
|
37
|
-
6. Select `Workload Identity federation (manual)` for the authentication type
|
|
38
|
-
7. Provide a new name for your new service connection
|
|
39
|
-
8. Click on `Next`
|
|
40
|
-
9. This will create a new draft service connection, with the `issuer` and `subject identifier` fields already filled in.
|
|
41
|
-
10. Leave this window open while you finish the next step, which will require those `issuer` and `subject identifier` fields, then you will return to this window to finish creating the service principal
|
|
42
|
-
|
|
43
|
-

|
|
44
|
-
|
|
45
|
-
## 3. Create a federated credential:
|
|
46
|
-
|
|
47
|
-
Create a new "federated credential" on your service principal to connect it to your new service connection:
|
|
48
|
-
|
|
49
|
-
1. Navigate back to the Azure Portal page for your service connection (app registration) from step 1
|
|
50
|
-
2. Navigate to the `Certificates & secrets` blade
|
|
51
|
-
3. Navigate to the `Federated credentials` tab
|
|
52
|
-
4. Click on the `Add credential` button
|
|
53
|
-
|
|
54
|
-

|
|
55
|
-
|
|
56
|
-
5. For the scenario, select `Other issuer`
|
|
57
|
-
6. For the `issuer` and `subject identifier` fields, fill in with the details of your draft service connection from the previous step
|
|
58
|
-
7. Select a new name for your new federated credential
|
|
59
|
-
|
|
60
|
-

|
|
61
|
-
|
|
62
|
-
8. Click on `Add`
|
|
63
|
-
|
|
64
|
-
## 4. (Temporary but required) Grant your service principal reader role on the desired subscription:
|
|
65
|
-
|
|
66
|
-
This step is not required for running your tests, but _is_ required to finish creating the service connection. This should be revoked after successful creation of the service connection and only necessary roles applied to the service principal.
|
|
67
|
-
|
|
68
|
-
1. On the Azure Portal, navigate to the page for the subscription you want the service principal to have access to.
|
|
69
|
-
2. Navigate to the `Access control (IAM)` blade
|
|
70
|
-
|
|
71
|
-

|
|
72
|
-
|
|
73
|
-
3. Navigate to the `Roles` tab
|
|
74
|
-
4. Click on the `+ Add` button, and choose `Add role assignment`
|
|
75
|
-
|
|
76
|
-

|
|
77
|
-
|
|
78
|
-
5. Choose `Reader` and click `Next`
|
|
79
|
-
6. Choose `User, group, or service principal`, then click on `+ Select members`
|
|
80
|
-
|
|
81
|
-

|
|
82
|
-
|
|
83
|
-
7. Select your service principal from step 1
|
|
84
|
-
8. Click on `Review and assign`
|
|
85
|
-
|
|
86
|
-
## 5. Finish creating your service connection:
|
|
87
|
-
|
|
88
|
-
Finish creating the draft service connection you created in step 2.
|
|
89
|
-
|
|
90
|
-
1. Navigate back to your draft service connection from step 2
|
|
91
|
-
2. For Environment, select `Azure Cloud`
|
|
92
|
-
3. For Scope Level, choose `Subscription`
|
|
93
|
-
4. Under `Subscription Id`, and `Subscription Name`, write the subscription ID and name (must provide both) for the desired subscription
|
|
94
|
-
5. For `Service Principal Id`, provide the `Application (client) ID` of your app registration from step 1 (can be found in the `Overview` blade)
|
|
95
|
-
6. For the `Tenant ID`, provide the `Directory (tenant) ID` of your app registration from step 1 (can be found in `Overview` blade)
|
|
96
|
-
7. Click on `Verify and save`
|
|
97
|
-
|
|
98
|
-
## 6. Revoke unnecessary read access and assign only necessary roles
|
|
99
|
-
|
|
100
|
-
Revoke the `Reader` role on the subscription for the service connection after it is created. This is no longer necessary.
|
|
101
|
-
|
|
102
|
-
1. Navigate to `Access control (IAM)` blade.
|
|
103
|
-
2. Under the `Role assignments` tab, find the role assignment corresponding to the App registered on step 1
|
|
104
|
-
3. Click on `Remove` then `Yes`
|
|
105
|
-
4. You can then assign the required roles to specific resources only if required, instead of assigning `Reader` role to the entire subscription.
|
|
106
|
-
|
|
107
|
-
## 7. Create a dummy Key Vault
|
|
108
|
-
|
|
109
|
-
A dummy Key vault step is required to propagate the necessary environment variables in the context of the pipeline.
|
|
110
|
-
|
|
111
|
-
1. Create a new Key Vault resource in the subscription you want to test on
|
|
112
|
-
2. Give it a new name as appropriate. You can keep the default settings
|
|
113
|
-
|
|
114
|
-

|
|
115
|
-
|
|
116
|
-
## 8. Assign your service principal "key vault reader" role on the dummy Key Vault:
|
|
117
|
-
|
|
118
|
-
1. Navigate to `Access control (IAM)` blade on your newly created dummy key vault
|
|
119
|
-
|
|
120
|
-

|
|
121
|
-
|
|
122
|
-
2. Navigate to the `Roles` tab
|
|
123
|
-
3. Click on the `+ Add` button, and choose `Add role assignment`
|
|
124
|
-
|
|
125
|
-

|
|
126
|
-
|
|
127
|
-
4. Choose `Key Vault Reader` (**NOT** `Reader`) and click `Next`
|
|
128
|
-
5. Choose `User, group, or service principal`, then click on `+ Select members`
|
|
129
|
-
|
|
130
|
-

|
|
131
|
-
|
|
132
|
-
6. Select your app registration from step 1
|
|
133
|
-
7. Click on `Review and assign`
|
|
134
|
-
|
|
135
|
-
## 9. Add the dummy Key Vault step in the pipeline
|
|
136
|
-
|
|
137
|
-
To ensure that the appropriate env variables are propagated in the context of running the pipeline, a dummy Key Vault step is required in that pipeline:
|
|
138
|
-
|
|
139
|
-
1. In the desired pipeline's `.yml` file, add a step as below. The `azureSubscription` field should correspond to the name of your service connection from step 2, while the `keyVaultName` field should correspond to the dummy key vault created in step 7:
|
|
140
|
-
|
|
141
|
-
```yml
|
|
142
|
-
# This gives the TestServiceConnection service connection access to this pipeline.
|
|
143
|
-
- task: AzureKeyVault@1
|
|
144
|
-
displayName: 'Authorize TestServiceConnection service connection'
|
|
145
|
-
inputs:
|
|
146
|
-
azureSubscription: 'TestServiceConnection'
|
|
147
|
-
KeyVaultName: 'TestDummyKeyVault'
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
2. In the step which runs your code (e.g., the npm test step), make sure that the `$(System.AccessToken)` variable is manually propagated as a `SYSTEM_ACCESSTOKEN` environment variable. All other required environment variables should be propagated automatically:
|
|
151
|
-
|
|
152
|
-
```yml
|
|
153
|
-
- task: Npm@1
|
|
154
|
-
displayName: "Test"
|
|
155
|
-
inputs:
|
|
156
|
-
command: custom
|
|
157
|
-
customCommand: test
|
|
158
|
-
env:
|
|
159
|
-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## 10. Pass the appropriate values to identify your service connection:
|
|
163
|
-
|
|
164
|
-
The constructor for `AzureDevOpsSubscriptionProvider` expects three arguments in an initializer object in order to identify your service connection you setup in step 5.
|
|
165
|
-
|
|
166
|
-
These are:
|
|
167
|
-
|
|
168
|
-
- `serviceConnectionId`: The resource ID of the service connection created in step 2, which can be found on the `resourceId` field of the URL at the address bar, when viewing the service connection in the Azure DevOps portal
|
|
169
|
-
- `domain`: The `Tenant ID` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
|
|
170
|
-
- `clientId`: The `Service Principal Id` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
|
|
171
|
-
|
|
172
|
-

|
|
173
|
-
|
|
174
|
-
Make sure you pass an object containing these variables for the `new AzureDevOpsServiceProvider()` constructor. These values are _not_ secrets, so they can be set as environment variables, assigned as pipeline variables in ADO, accessed and assigned using an Azure Key Vault step, or even manually hardcoded in code (not recommended).
|
|
1
|
+
# Setting up workflow identity federation with Azure DevOps
|
|
2
|
+
|
|
3
|
+
This guide describes how to set up your Azure DevOps (ADO) and Azure environment to leverage [workflow identity federation](https://learn.microsoft.com/entra/workload-id/workload-identity-federation), enabling you to use
|
|
4
|
+
`AzureDevOpsSubscriptionProvider` provided in this section. See the [README](README.md#azure-devops-subscription-provider) for more details.
|
|
5
|
+
|
|
6
|
+
## 1. Create a new service principal
|
|
7
|
+
|
|
8
|
+
Create a new service principal on which you will assign the necessary permissions. In this example, we use an app registration:
|
|
9
|
+
|
|
10
|
+
1. Navigate to the [App Registrations](https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page on the Azure portal
|
|
11
|
+
2. Click on `New Registration`
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
3. Assign any name
|
|
16
|
+
4. Make sure to select the first option for the account type (`Accounts in this organization directory only (Microsoft only - Single tenant)`)
|
|
17
|
+
5. Leave the Redirect URI and Service Tree ID fields empty
|
|
18
|
+
6. Click on `Register`
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
## 2. Create a new Azure DevOps (ADO) Service Connection:
|
|
23
|
+
|
|
24
|
+
Create a new ADO service connection under your organization's project. In this example, we create it under the DevDiv project:
|
|
25
|
+
|
|
26
|
+
1. Navigate to the [organization's (DevDiv) ADO page](https://devdiv.visualstudio.com/DevDiv)
|
|
27
|
+
2. Navigate to the settings page by clicking on the gear icon on the bottom left
|
|
28
|
+
3. Select the ["service connections"](https://devdiv.visualstudio.com/DevDiv/_settings/adminservices) blade from the panel on the left
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
4. Create a new service connection by clicking on the `New service connection` button
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
5. Select `Azure Resource Manager` as the type
|
|
37
|
+
6. Select `Workload Identity federation (manual)` for the authentication type
|
|
38
|
+
7. Provide a new name for your new service connection
|
|
39
|
+
8. Click on `Next`
|
|
40
|
+
9. This will create a new draft service connection, with the `issuer` and `subject identifier` fields already filled in.
|
|
41
|
+
10. Leave this window open while you finish the next step, which will require those `issuer` and `subject identifier` fields, then you will return to this window to finish creating the service principal
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
## 3. Create a federated credential:
|
|
46
|
+
|
|
47
|
+
Create a new "federated credential" on your service principal to connect it to your new service connection:
|
|
48
|
+
|
|
49
|
+
1. Navigate back to the Azure Portal page for your service connection (app registration) from step 1
|
|
50
|
+
2. Navigate to the `Certificates & secrets` blade
|
|
51
|
+
3. Navigate to the `Federated credentials` tab
|
|
52
|
+
4. Click on the `Add credential` button
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
5. For the scenario, select `Other issuer`
|
|
57
|
+
6. For the `issuer` and `subject identifier` fields, fill in with the details of your draft service connection from the previous step
|
|
58
|
+
7. Select a new name for your new federated credential
|
|
59
|
+
|
|
60
|
+

|
|
61
|
+
|
|
62
|
+
8. Click on `Add`
|
|
63
|
+
|
|
64
|
+
## 4. (Temporary but required) Grant your service principal reader role on the desired subscription:
|
|
65
|
+
|
|
66
|
+
This step is not required for running your tests, but _is_ required to finish creating the service connection. This should be revoked after successful creation of the service connection and only necessary roles applied to the service principal.
|
|
67
|
+
|
|
68
|
+
1. On the Azure Portal, navigate to the page for the subscription you want the service principal to have access to.
|
|
69
|
+
2. Navigate to the `Access control (IAM)` blade
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
3. Navigate to the `Roles` tab
|
|
74
|
+
4. Click on the `+ Add` button, and choose `Add role assignment`
|
|
75
|
+
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
5. Choose `Reader` and click `Next`
|
|
79
|
+
6. Choose `User, group, or service principal`, then click on `+ Select members`
|
|
80
|
+
|
|
81
|
+

|
|
82
|
+
|
|
83
|
+
7. Select your service principal from step 1
|
|
84
|
+
8. Click on `Review and assign`
|
|
85
|
+
|
|
86
|
+
## 5. Finish creating your service connection:
|
|
87
|
+
|
|
88
|
+
Finish creating the draft service connection you created in step 2.
|
|
89
|
+
|
|
90
|
+
1. Navigate back to your draft service connection from step 2
|
|
91
|
+
2. For Environment, select `Azure Cloud`
|
|
92
|
+
3. For Scope Level, choose `Subscription`
|
|
93
|
+
4. Under `Subscription Id`, and `Subscription Name`, write the subscription ID and name (must provide both) for the desired subscription
|
|
94
|
+
5. For `Service Principal Id`, provide the `Application (client) ID` of your app registration from step 1 (can be found in the `Overview` blade)
|
|
95
|
+
6. For the `Tenant ID`, provide the `Directory (tenant) ID` of your app registration from step 1 (can be found in `Overview` blade)
|
|
96
|
+
7. Click on `Verify and save`
|
|
97
|
+
|
|
98
|
+
## 6. Revoke unnecessary read access and assign only necessary roles
|
|
99
|
+
|
|
100
|
+
Revoke the `Reader` role on the subscription for the service connection after it is created. This is no longer necessary.
|
|
101
|
+
|
|
102
|
+
1. Navigate to `Access control (IAM)` blade.
|
|
103
|
+
2. Under the `Role assignments` tab, find the role assignment corresponding to the App registered on step 1
|
|
104
|
+
3. Click on `Remove` then `Yes`
|
|
105
|
+
4. You can then assign the required roles to specific resources only if required, instead of assigning `Reader` role to the entire subscription.
|
|
106
|
+
|
|
107
|
+
## 7. Create a dummy Key Vault
|
|
108
|
+
|
|
109
|
+
A dummy Key vault step is required to propagate the necessary environment variables in the context of the pipeline.
|
|
110
|
+
|
|
111
|
+
1. Create a new Key Vault resource in the subscription you want to test on
|
|
112
|
+
2. Give it a new name as appropriate. You can keep the default settings
|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
116
|
+
## 8. Assign your service principal "key vault reader" role on the dummy Key Vault:
|
|
117
|
+
|
|
118
|
+
1. Navigate to `Access control (IAM)` blade on your newly created dummy key vault
|
|
119
|
+
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+
2. Navigate to the `Roles` tab
|
|
123
|
+
3. Click on the `+ Add` button, and choose `Add role assignment`
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
4. Choose `Key Vault Reader` (**NOT** `Reader`) and click `Next`
|
|
128
|
+
5. Choose `User, group, or service principal`, then click on `+ Select members`
|
|
129
|
+
|
|
130
|
+

|
|
131
|
+
|
|
132
|
+
6. Select your app registration from step 1
|
|
133
|
+
7. Click on `Review and assign`
|
|
134
|
+
|
|
135
|
+
## 9. Add the dummy Key Vault step in the pipeline
|
|
136
|
+
|
|
137
|
+
To ensure that the appropriate env variables are propagated in the context of running the pipeline, a dummy Key Vault step is required in that pipeline:
|
|
138
|
+
|
|
139
|
+
1. In the desired pipeline's `.yml` file, add a step as below. The `azureSubscription` field should correspond to the name of your service connection from step 2, while the `keyVaultName` field should correspond to the dummy key vault created in step 7:
|
|
140
|
+
|
|
141
|
+
```yml
|
|
142
|
+
# This gives the TestServiceConnection service connection access to this pipeline.
|
|
143
|
+
- task: AzureKeyVault@1
|
|
144
|
+
displayName: 'Authorize TestServiceConnection service connection'
|
|
145
|
+
inputs:
|
|
146
|
+
azureSubscription: 'TestServiceConnection'
|
|
147
|
+
KeyVaultName: 'TestDummyKeyVault'
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
2. In the step which runs your code (e.g., the npm test step), make sure that the `$(System.AccessToken)` variable is manually propagated as a `SYSTEM_ACCESSTOKEN` environment variable. All other required environment variables should be propagated automatically:
|
|
151
|
+
|
|
152
|
+
```yml
|
|
153
|
+
- task: Npm@1
|
|
154
|
+
displayName: "Test"
|
|
155
|
+
inputs:
|
|
156
|
+
command: custom
|
|
157
|
+
customCommand: test
|
|
158
|
+
env:
|
|
159
|
+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## 10. Pass the appropriate values to identify your service connection:
|
|
163
|
+
|
|
164
|
+
The constructor for `AzureDevOpsSubscriptionProvider` expects three arguments in an initializer object in order to identify your service connection you setup in step 5.
|
|
165
|
+
|
|
166
|
+
These are:
|
|
167
|
+
|
|
168
|
+
- `serviceConnectionId`: The resource ID of the service connection created in step 2, which can be found on the `resourceId` field of the URL at the address bar, when viewing the service connection in the Azure DevOps portal
|
|
169
|
+
- `domain`: The `Tenant ID` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
|
|
170
|
+
- `clientId`: The `Service Principal Id` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
|
|
171
|
+
|
|
172
|
+

|
|
173
|
+
|
|
174
|
+
Make sure you pass an object containing these variables for the `new AzureDevOpsServiceProvider()` constructor. These values are _not_ secrets, so they can be set as environment variables, assigned as pipeline variables in ADO, accessed and assigned using an Azure Key Vault step, or even manually hardcoded in code (not recommended).
|
package/CHANGELOG.md
CHANGED
|
@@ -1,90 +1,98 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
## 4.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* [#
|
|
13
|
-
|
|
14
|
-
## 4.0.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* [#
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* [#
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* Add `
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* [#
|
|
45
|
-
|
|
46
|
-
## 2.
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
## 2.1
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
## 2.
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
## 1.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
* [#
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* [#
|
|
83
|
-
|
|
84
|
-
## 1.1.
|
|
85
|
-
|
|
86
|
-
* [#
|
|
87
|
-
|
|
88
|
-
## 1.
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## 4.1.1 - 2025-02-03
|
|
4
|
+
|
|
5
|
+
* Fix `VSCodeAzureSubscriptionProvider` implementation of `getSubscriptions` filtering returned subscriptions by `getSubscriptionFilters()` when the `filter` parameter is a `GetSubscriptionsFilter` object.
|
|
6
|
+
|
|
7
|
+
## 4.1.0 - 2025-01-31
|
|
8
|
+
|
|
9
|
+
* Add filtering `getSubscriptions` by a specific account and/or tenant.
|
|
10
|
+
|
|
11
|
+
## 4.0.3 - 2024-12-20
|
|
12
|
+
* [#1862](https://github.com/microsoft/vscode-azuretools/pull/1862) Display account name on duplicate tenant picks
|
|
13
|
+
|
|
14
|
+
## 4.0.2 - 2024-12-19
|
|
15
|
+
|
|
16
|
+
* [#1861](https://github.com/microsoft/vscode-azuretools/pull/1861) Remove unecessary if statement
|
|
17
|
+
|
|
18
|
+
## 4.0.1 - 2024-12-17
|
|
19
|
+
|
|
20
|
+
* [#1856](https://github.com/microsoft/vscode-azuretools/pull/1856) Fix tenantId undefined error
|
|
21
|
+
|
|
22
|
+
## 4.0.0 - 2024-12-06
|
|
23
|
+
|
|
24
|
+
### What's new
|
|
25
|
+
Pass in a `vscode.LogOutputChannel` to the `VSCodeAzureSubscriptionProvider` constructor to enable logging. [#1851](https://github.com/microsoft/vscode-azuretools/pull/1851)
|
|
26
|
+
|
|
27
|
+
`AzureSubscriptionProvider.getTenants()` now returns `AzureTenant[]` instead of `TenantIdDescription[]`. This is a breaking change for implementors of `AzureSubscriptionProvider`. [#1849](https://github.com/microsoft/vscode-azuretools/pull/1849)
|
|
28
|
+
|
|
29
|
+
### All Changes
|
|
30
|
+
* [#1849](https://github.com/microsoft/vscode-azuretools/pull/1849) Create `AzureTenant` interface which includes account property
|
|
31
|
+
* [#1850](https://github.com/microsoft/vscode-azuretools/pull/1850) Clean up `isSignedIn` implementation
|
|
32
|
+
* [#1851](https://github.com/microsoft/vscode-azuretools/pull/1851) Add logging to `VSCodeAzureSubscriptionProvider`
|
|
33
|
+
|
|
34
|
+
## 3.1.0 - 2024-11-26
|
|
35
|
+
|
|
36
|
+
* [#1827](https://github.com/microsoft/vscode-azuretools/pull/1827) Add more comprehensive support for multi-account scenarios
|
|
37
|
+
* [#1815](https://github.com/microsoft/vscode-azuretools/issues/1815) Fix `VSCodeAzureSubscriptionProvider.getSubscriptions()` returning empty
|
|
38
|
+
|
|
39
|
+
## 3.0.1 - 2024-11-19
|
|
40
|
+
* [#1819](https://github.com/microsoft/vscode-azuretools/pull/1819) Add account parameter to `AzureSubscriptionProvider.isSignedIn()` function to fix a multi-account issue [#1809](https://github.com/microsoft/vscode-azuretools/issues/1809)
|
|
41
|
+
* [#1822](https://github.com/microsoft/vscode-azuretools/pull/1822) Add check in `VSCodeAzureSubscriptionProvider.getTenants()` to fix a multi-account issue [#1809](https://github.com/microsoft/vscode-azuretools/issues/1809)
|
|
42
|
+
|
|
43
|
+
## 3.0.0 - 2024-09-19
|
|
44
|
+
* [#1789](https://github.com/microsoft/vscode-azuretools/pull/1789) Change `getTenants` to be compatible with the new Azure Resources tenants view. This also includes a possible breaking change where an optional parameter `account` which when passed in `getTenants` will return the tenants associated with that single account. Otherwise `getTenants` will return the tenants for all authenticated accounts.
|
|
45
|
+
|
|
46
|
+
## 2.5.0 - 2024-08-06
|
|
47
|
+
|
|
48
|
+
* Add `getSessionWithScopes` to get a session that has the proper scoping instead of always the default management plane
|
|
49
|
+
|
|
50
|
+
## 2.4.1 - 2024-05-15
|
|
51
|
+
|
|
52
|
+
* [#1729](https://github.com/microsoft/vscode-azuretools/pull/1729) Change AzureDevOpsSubscriptionProvider so that it accepts values as arguments
|
|
53
|
+
|
|
54
|
+
## 2.4.0 - 2024-05-07
|
|
55
|
+
|
|
56
|
+
* [#1723](https://github.com/microsoft/vscode-azuretools/pull/1723) Implementation fo AzureSub provider that leverages federated credentials
|
|
57
|
+
|
|
58
|
+
## 2.1.0 - 2023-12-13
|
|
59
|
+
|
|
60
|
+
* Use management endpoint for scope by default to fix deploying app service projects with sovereign clouds
|
|
61
|
+
|
|
62
|
+
## 2.0.0 - 2023-11-20
|
|
63
|
+
|
|
64
|
+
* Switches to use `@azure/arm-resources-subscriptions` instead of `@azure/arm-subscriptions`. Potentially a breaking change so I revved the major version.
|
|
65
|
+
* Fixes an issue where the `endpoint` wasn't set for the subscription client, breaking sovereign clouds
|
|
66
|
+
|
|
67
|
+
## 1.4.0 - 2023-11-03
|
|
68
|
+
* [#1619](https://github.com/microsoft/vscode-azuretools/pull/1619) Make `getSession` synchronous to fix an issue that broke app service deployments
|
|
69
|
+
|
|
70
|
+
## 1.3.0 - 2023-10-23
|
|
71
|
+
|
|
72
|
+
* [#1610](https://github.com/microsoft/vscode-azuretools/pull/1610) Add `signInToTenant` command which facilitates signing in to a specific tenant.
|
|
73
|
+
* [#1610](https://github.com/microsoft/vscode-azuretools/pull/1610) Add `getUnauthenticatedTenants` utility.
|
|
74
|
+
|
|
75
|
+
## 1.2.2 - 2023-10-19
|
|
76
|
+
|
|
77
|
+
* [#1608](https://github.com/microsoft/vscode-azuretools/pull/1608) Fix appending `.default` to tenant id scope which caused sign in to fail
|
|
78
|
+
|
|
79
|
+
## 1.2.1 - 2023-09-26
|
|
80
|
+
|
|
81
|
+
* [#1594](https://github.com/microsoft/vscode-azuretools/pull/1594) Fix getScopes always injecting the management scope, even if a scope for a different resource is specified
|
|
82
|
+
* [#1597](https://github.com/microsoft/vscode-azuretools/pull/1597) Make `authentication.getSession` use scopes argument
|
|
83
|
+
|
|
84
|
+
## 1.1.3 - 2023-09-14
|
|
85
|
+
|
|
86
|
+
* [#1585](https://github.com/microsoft/vscode-azuretools/pull/1585) Check if tenant is signed in before listing subscriptions
|
|
87
|
+
|
|
88
|
+
## 1.1.2 - 2023-07-26
|
|
89
|
+
|
|
90
|
+
* [#1542](https://github.com/microsoft/vscode-azuretools/pull/1542) Fix Azure subscriptions are not returned in alphabetical order
|
|
91
|
+
|
|
92
|
+
## 1.1.1 - 2023-07-26
|
|
93
|
+
|
|
94
|
+
* [#1540](https://github.com/microsoft/vscode-azuretools/pull/1540) Ignore .default if it is passed as a scope
|
|
95
|
+
|
|
96
|
+
## 1.0.0 - 2023-06-05
|
|
97
|
+
|
|
98
|
+
Initial release
|
package/LICENSE.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|