Skip to content

Commit 410a4a4

Browse files
authored
Merge pull request #32 from microsoft/users/v-ragjos
.NET Upgrade for all component and use Managed Service Identity (MSI) to connect to Azure resources.
2 parents 90edc0b + 07d629e commit 410a4a4

File tree

424 files changed

+45371
-44623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

424 files changed

+45371
-44623
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE
21+
SOFTWARE

README.md

Lines changed: 81 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Microsoft Assent
22
## Assent <sub>**A***pproval* **S***olution* **S***implified for* **ENT***erprise*<sub>
3-
Microsoft Assent (*a.k.a Approvals*) as a platform provides the “one stop shop” solution for approvers via a model that brings together disparate different approval requests in a consistent and ultra-modern model. Approvals delivers a unified approvals experience for any approval on multiple form factors - Website, Outlook Actionable email, Teams. It consolidates approvals across organization's line of business applications, building on modern technology and powered by Microsoft Azure. It serves as a showcase for solving modern IT scenarios using the latest technologies.
4-
- Payload API - Accepts payload from tenant system.
5-
- Audit Agent Processor - Logs the payload data into Cosmos db.
6-
- Primary Processor - Processes the payload pushed by payload API to service bus.
7-
- Notification Processor - Sends email notifications to Approvers/ Submitters.
8-
- Core API - Set of Web APIs to support the Approvals UI.
3+
Microsoft Assent (*a.k.a Approvals*) as a platform provides the "one stop shop" solution for approvers via a model that brings together disparate different approval requests in a consistent and ultra-modern model. Approvals delivers a unified approvals experience for any approval on multiple form factors - Website, Outlook Actionable email, Teams. It consolidates approvals across organization's line of business applications, building on modern technology and powered by Microsoft Azure. It serves as a showcase for solving modern IT scenarios using the latest technologies.
4+
- Payload Receiver Service API - Accepts payload from tenant system.
5+
- Audit Processor - Azure Function that logs the payload data into Azure Cosmos DB.
6+
- Primary Processor - Azure Function that processes the payload pushed by payload receiver service API to service bus.
7+
- Notification Processor - Azure Function that sends email notifications to Approvers/ Submitters as per configurations.
8+
- WatchdogProcessor - as per configurations from tenant sends reminder email notifications to Approvers for pending approvals as per configurations from tenant.
9+
- Core Services API - Set of Web APIs to support the Approvals UI.
910

1011
## Getting Started
1112

@@ -47,13 +48,13 @@ Step 3: Select 'Build your own template in the editor' and paste the content of
4748

4849
```
4950
Step 4: Save and go the next step. Select the subscription, resource group & location.
50-
Update the settings to update any of the parameter values if required and click on purchase
51+
Update the settings to update any of the parameter values if required and click on purchase
5152
5253
Note : If there is any failure, try re-deploying again before proceeding for any troubleshooting.
5354
```
5455

5556
## Clean-up
56-
It might have happened that some of the resources which got created may be already present in your subscription.
57+
It might have happened that some of the resources which got created may be already present in your subscription.
5758
In that case, you can continue to use the same and delete the newly created resources. (e.g. Storage Account, Application Insights, ServiceBus - In case of ServiceBus make sure to create the Topics in your exisiting ServiceBus namespace before deleting).
5859

5960
The following table will help in deciding which components can be cleaned-up.
@@ -90,7 +91,6 @@ Step 1: Download the configuration file (AppCofiguration.json) from the samples
9091
```
9192
Step 2: Add/update the values for the following keys in the JSON
9293
```
93-
9494
| Key Name | Source | In KeyVault ? |
9595
|--------|------|--------|
9696
| AADTenantId | Azure Active Directory (AAD) Tenant ID | No |
@@ -127,21 +127,21 @@ Step 2: Add/update the values for the following keys in the JSON
127127
| UrlPlaceholderTenants | [Optional] Int32 identifiers for simulating LoB apps in self-server portal | No |
128128

129129
```
130-
Step 3: Go to the App Configuration service on Azure Portal and select the resource
130+
Step 3: Go to the App Configuration service on Azure Portal and select the resource
131131
where the configuration needs to be imported.
132132
```
133133
```
134134
Step 4: Go to 'Operations' -> 'Import/Export'
135135
```
136136
```
137-
Step 5: Select 'Import' in the toggle button and
137+
Step 5: Select 'Import' in the toggle button and
138138
choose 'Configuration file' from the dropdown 'Source service'.
139139
```
140-
```
140+
```
141141
Step 6: In the 'For language' drop down select 'Other'
142142
```
143143
```
144-
Step 7: Choose 'Json' as the value from the 'File type' dropdown and
144+
Step 7: Choose 'Json' as the value from the 'File type' dropdown and
145145
select the 'AppConfiguration.json' updated in the previous step file from the File Explorer.
146146
```
147147
```
@@ -154,19 +154,19 @@ Select the 'Label' under which the configurations needs to be added (e.g., DEV)
154154
* For the Function Apps add/update the below AppSetting keys:
155155
> APPINSIGHTS_INSTRUMENTATIONKEY
156156
> > This is an instrumentation key of Application Insights which was created from ARM Template.
157-
>
158-
> AzureAppConfiguration
159-
> > This would be Key vault Reference to Azure App Configuration's connection string.
157+
>
158+
> AzureAppConfigurationUrl
159+
> > This would be Azure App Configuration's endpoint URL.
160160
>
161161
> AppConfigurationLabel
162162
> > This would be Azure App Configuration's label value corresponding to the environment the App service is running for.
163163
>
164164
> AzureWebJobsStorage
165165
> > This would be Key vault Reference to storage account's connection string.
166-
>
166+
>
167167
> AzureWebJobsDashboard
168168
> > This would be Key vault Reference to storage account's connection string.
169-
>
169+
>
170170
> ComponentName
171171
> > Name of the component which could be name of the component like *ApprovalsPrimaryProcessor or ApprovalsNotificationProcessor*.
172172
>
@@ -181,36 +181,87 @@ Select the 'Label' under which the configurations needs to be added (e.g., DEV)
181181
> APPINSIGHTS_INSTRUMENTATIONKEY
182182
> > This is an instrumentation key of Application Insights which was created from ARM Template.
183183
>
184-
> AzureAppConfiguration
185-
> > This would be Key vault Reference to Azure App Configuration's connection string.
184+
> AzureAppConfigurationUrl
185+
> > This would be Azure App Configuration's endpoint URL.
186186
>
187187
> AppConfigurationLabel
188188
> > This would be Azure App Configuration's label value corresponding to the environment the App service is running for.
189-
>
189+
>
190190
> ComponentName
191191
> > Name of the component which could be name of the component like *ApprovalsCoreServicesAPI or ApprovalsPayloadServiceAPI*.
192192
>
193193
> ValidAppIds
194194
> > This is AzureAD App's ClientIds which are authorized to access this component (; separated).
195-
>
195+
>
196196
```
197197
Note: The connection string should be the KeyVault url
198198
i.e. Enter the value in this format: @Microsoft.KeyVault(SecretUri=<keyvault Secret Identifier url for AzureAppConfigurationConnectionString>)
199199
```
200200
#### Setup Authentication/Access Permission
201-
* For all the System assinged Managed Identity created earlier assign the following roles to the Azure Storage Account
202-
> Storage Blob Data Contributor
203-
201+
204202
* Setup Authentication for APIs and Function Apps
205-
* Update the Reply Urls section of the AzureAD App created earlier with the URLs of the App Services and FunctionApps (HttpTriggered) URLs suffixed with '/auth/login/aad/callback'
203+
* Update the Reply Urls section of the AzureAD App created earlier with the URLs of the App Services and FunctionApps (HttpTriggered) URLs suffixed with '/auth/login/aad/callback'
206204
* In the 'Authentication' section of the AppServices / FunctionApps (HttpTriggered),
207205
* Add or update the Authentication values (ClientId/Secret/Issuer/Audience)
208206
* Select 'Login with Azure Active Directory' for the option 'Action to take when the request is not authenticated'
209207

208+
* Permissions needed needed for System assigned Managed Identity of below Azure Components
209+
* Payload Receiver Service API:
210+
* App Configuration Data Reader
211+
* Azure Service Bus Data Sender
212+
* Cosmos DB Built-in Data Contributor
213+
* Key Vault Secrets User
214+
* Storage Blob Data Contributor
215+
* Storage Table Data Contributor
216+
217+
* Audit Processor:
218+
* App Configuration Data Reader
219+
* Azure Service Bus Data Owner
220+
* Cosmos DB Built-in Data Contributor
221+
* Key Vault Secrets User
222+
* Storage Blob Data Contributor
223+
* Storage Table Data Contributor
224+
225+
* Primary Processor:
226+
* App Configuration Data Reader
227+
* Azure Service Bus Data Owner
228+
* Cosmos DB Built-in Data Contributor
229+
* Key Vault Secrets User
230+
* Storage Blob Data Contributor
231+
* Storage Table Data Contributor
232+
233+
* Notification Processor:
234+
* App Configuration Data Reader
235+
* Azure Service Bus Data Owner
236+
* Cosmos DB Built-in Data Contributor
237+
* Key Vault Secrets User
238+
* Storage Blob Data Contributor
239+
* Storage Table Data Contributor
240+
241+
* Watchdog Processor:
242+
* App Configuration Data Reader
243+
* Cosmos DB Built-in Data Contributor
244+
* Key Vault Secrets User
245+
* Storage Blob Data Contributor
246+
* Storage Table Data Contributor
247+
248+
* Core Services API:
249+
* App Configuration Data Reader
250+
* Cosmos DB Built-in Data Contributor
251+
* Key Vault Secrets User
252+
* Storage Blob Data Contributor
253+
* Storage Table Data Contributor
254+
255+
*Note: As of today only way to assign Cosmos DB Built-in Data Contributor is via the PowerShell or az cli below is the command fot the same:*
256+
```
257+
az cosmosdb sql role assignment create --account-name "Cosmosdb account name" --resource-group "Name of resource group where cosmosdb exists" --scope "/" --principal-id "System assigned identity to to which this Role Assignment is being granted" --role-definition-id "00000000-0000-0000-0000-000000000002"
258+
```
259+
For more information please read: [Configure role-based access control for your Azure Cosmos DB account with Azure AD | Microsoft Learn](https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac)
260+
210261
## Deploy
211262
Deploy the code in these new components using Azure DevOps (Build and Release pipelines)
212263
213-
The deployment might fail sometimes due to locked files. Try restarting the service, before redeploying.
264+
The deployment might fail sometimes due to locked files. Try restarting the service, before redeploying.
214265
If the issue persists, add the following AppSettings in the service configuration
215266
```
216267
"MSDEPLOY_RENAME_LOCKED_FILES": "1"
@@ -240,8 +291,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
240291
241292
## Trademarks
242293
243-
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
244-
trademarks or logos is subject to and must follow
294+
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
295+
trademarks or logos is subject to and must follow
245296
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
246297
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
247-
Any use of third-party trademarks or logos are subject to those third-party's policies.
298+
Any use of third-party trademarks or logos are subject to those third-party's policies.

scripts/template.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@
905905
"index.php",
906906
"hostingstart.html"
907907
],
908-
"netFrameworkVersion": "v4.0",
908+
"netFrameworkVersion": "v6.0",
909909
"requestTracingEnabled": false,
910910
"remoteDebuggingEnabled": false,
911911
"httpLoggingEnabled": false,
@@ -1060,7 +1060,7 @@
10601060
"index.php",
10611061
"hostingstart.html"
10621062
],
1063-
"netFrameworkVersion": "v4.0",
1063+
"netFrameworkVersion": "v6.0",
10641064
"requestTracingEnabled": false,
10651065
"remoteDebuggingEnabled": false,
10661066
"httpLoggingEnabled": false,
@@ -1155,7 +1155,7 @@
11551155
"AppConfigurationLabel": "",
11561156
"AppConfigurationPrefix": "",
11571157
"APPINSIGHTS_INSTRUMENTATIONKEY": "",
1158-
"AzureAppConfiguration": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/AzureAppConfigurationConnectionString)')]",
1158+
"AzureAppConfigurationUrl": "[concat('https://',parameters('appConfigurationName'), '.azconfig.io')]",
11591159
"ComponentName": "ApprovalsCoreServicesAPI",
11601160
"ValidAppIds": "",
11611161
"ValidAudienceUrl": "",
@@ -1233,7 +1233,7 @@
12331233
"index.php",
12341234
"hostingstart.html"
12351235
],
1236-
"netFrameworkVersion": "v4.0",
1236+
"netFrameworkVersion": "v6.0",
12371237
"requestTracingEnabled": false,
12381238
"remoteDebuggingEnabled": false,
12391239
"httpLoggingEnabled": false,
@@ -1328,7 +1328,7 @@
13281328
"AppConfigurationLabel": "",
13291329
"AppConfigurationPrefix": "",
13301330
"APPINSIGHTS_INSTRUMENTATIONKEY": "",
1331-
"AzureAppConfiguration": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/AzureAppConfigurationConnectionString)')]",
1331+
"AzureAppConfigurationUrl": "[concat('https://',parameters('appConfigurationName'), '.azconfig.io')]",
13321332
"ComponentName": "ApprovalsPayloadServiceAPI",
13331333
"ValidAppIds": "",
13341334
"ValidAudienceUrl": "",
@@ -1405,7 +1405,7 @@
14051405
"default.aspx",
14061406
"index.php"
14071407
],
1408-
"netFrameworkVersion": "v4.0",
1408+
"netFrameworkVersion": "v6.0",
14091409
"phpVersion": "5.6",
14101410
"requestTracingEnabled": false,
14111411
"remoteDebuggingEnabled": false,
@@ -1461,7 +1461,7 @@
14611461
"AppConfigurationLabel": "",
14621462
"AppConfigurationPrefix": "",
14631463
"APPINSIGHTS_INSTRUMENTATIONKEY": "",
1464-
"AzureAppConfiguration": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/AzureAppConfigurationConnectionString)')]",
1464+
"AzureAppConfigurationUrl": "[concat('https://',parameters('appConfigurationName'), '.azconfig.io')]",
14651465
"AzureWebJobsDashboard": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/StorageConnectionString)')]",
14661466
"AzureWebJobsStorage": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/StorageConnectionString)')]",
14671467
"ComponentName": "ApprovalsNotificationProcessor",
@@ -1539,7 +1539,7 @@
15391539
"default.aspx",
15401540
"index.php"
15411541
],
1542-
"netFrameworkVersion": "v4.0",
1542+
"netFrameworkVersion": "v6.0",
15431543
"phpVersion": "5.6",
15441544
"requestTracingEnabled": false,
15451545
"remoteDebuggingEnabled": false,
@@ -1595,7 +1595,7 @@
15951595
"AppConfigurationLabel": "",
15961596
"AppConfigurationPrefix": "",
15971597
"APPINSIGHTS_INSTRUMENTATIONKEY": "",
1598-
"AzureAppConfiguration": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/AzureAppConfigurationConnectionString)')]",
1598+
"AzureAppConfigurationUrl": "[concat('https://',parameters('appConfigurationName'), '.azconfig.io')]",
15991599
"AzureWebJobsDashboard": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/StorageConnectionString)')]",
16001600
"AzureWebJobsStorage": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/StorageConnectionString)')]",
16011601
"ComponentName": "ApprovalsWatchdogProcessor",
@@ -1675,7 +1675,7 @@
16751675
"default.aspx",
16761676
"index.php"
16771677
],
1678-
"netFrameworkVersion": "v4.0",
1678+
"netFrameworkVersion": "v6.0",
16791679
"phpVersion": "5.6",
16801680
"requestTracingEnabled": false,
16811681
"remoteDebuggingEnabled": false,
@@ -1731,7 +1731,7 @@
17311731
"AppConfigurationLabel": "",
17321732
"AppConfigurationPrefix": "",
17331733
"APPINSIGHTS_INSTRUMENTATIONKEY": "",
1734-
"AzureAppConfiguration": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/AzureAppConfigurationConnectionString)')]",
1734+
"AzureAppConfigurationUrl": "[concat('https://',parameters('appConfigurationName'), '.azconfig.io')]",
17351735
"AzureWebJobsDashboard": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/StorageConnectionString)')]",
17361736
"AzureWebJobsStorage": "[concat('@Microsoft.KeyVault(SecretUri=https://',parameters('keyVaultName'), '.vault.azure.net/secrets/StorageConnectionString)')]",
17371737
"ComponentName": "ApprovalsPrimaryProcessor",

0 commit comments

Comments
 (0)