Fix some secrets
This commit is contained in:
Родитель
4a169f7fab
Коммит
101643456d
|
@ -1,4 +1,4 @@
|
|||
![Banner](../Assets/TipsTricks.png)
|
||||
![Banner](Assets/TipsTricks.png)
|
||||
# Tips & Tricks
|
||||
You've now deployed your first App Service instance! We'll now review some 'Pro tips' to help you get the most out of your Azure service.
|
||||
|
||||
|
@ -59,7 +59,7 @@ You’ll notice that an App Service scale unit is deployed on Azure Cloud Servic
|
|||
## Outbound Virtual IPs
|
||||
Most likely your application is connected to other Azure and non-Azure services. As such, your application makes outbound network calls to endpoints, not on the scale unit of your application. This includes calling out to Azure services such as SQL Database and Azure Storage. There are up to five VIPs (the one public VIP and four outbound dedicated VIPs) used for outbound communication. You can’t choose which VIP your app uses, and all outbound calls from all apps in scale unit are using the five allocated VIPs. If your application uses a service that requires you to whitelist IPs that are allowed to make API calls into such a service, you’ll need to register all five VIPs of the scale unit. To view which IPs are allocated to outbound VIPs for a given unit of scale (or for your app from your perspective) go to the Azure portal, as shown in the below image.
|
||||
|
||||
![Create new App Service Plan](../Assets/OutboundVIP.png)
|
||||
![Create new App Service Plan](Assets/OutboundVIP.png)
|
||||
|
||||
If you require a dedicated set of inbound and outbound IPs, you should explore using a fully isolated and dedicated App Service Environment.
|
||||
|
||||
|
|
|
@ -145,10 +145,13 @@ For Kubernetes, those places are called [Kubernetes Secrets](https://kubernetes.
|
|||
|
||||
```bash
|
||||
kubectl create secret generic appsettings \
|
||||
--from-literal=CosmosDb__Endpoint=<YOUR_COSMOSDB_ENDPOINT> \
|
||||
--from-literal=CosmosDb__Key=<YOUR_COSMOSDB_KEY> \
|
||||
--from-literal=AzureCosmosDb__Endpoint=<YOUR_COSMOSDB_ENDPOINT> \
|
||||
--from-literal=AzureCosmosDb__Key=<YOUR_COSMOSDB_KEY> \
|
||||
--from-literal=AzureStorage__StorageAccountName=<YOUR_STORAGEACCOUNT_NAME> \
|
||||
--from-literal=AzureStorage__Key=<YOUR_STORAGEACCOUNT_KEY> \
|
||||
--from-literal=ActiveDirectory__Tenant=<YOUR_ACTIVEDIRECTORY_TENANT> \
|
||||
--from-literal=ActiveDirectory__ApplicationId=<YOUR_ACTIVEDIRECTORY_APPLICATIONID> \
|
||||
--from-literal=ActiveDirectory__SignUpSignInPolicy=<YOUR_ACTIVEDIRECTORY_POLICY> \
|
||||
--from-literal=ApplicationInsights__InstrumentationKey=<YOUR_APPINSIGHTS_KEY>
|
||||
```
|
||||
|
||||
|
|
|
@ -199,9 +199,9 @@ Add the following secrets to your application as described in the according Secr
|
|||
|
||||
> **Hint:** Here you can find the [App Service Secrets](/Walkthrough%20Guide/03%20Web%20API/01%20App%20Service#use-secrets) and [ Kubernetes Secrets](/Walkthrough%20Guide/03%20Web%20API/02%20Kubernetes#use-secrets) sections.
|
||||
|
||||
- **`ActiveDirectory:Tenant`:** "{OUR_AD}.onmicrosoft.com"
|
||||
- **`ActiveDirectory:ApplicationId`:** *{ID_OF_THE_REGISTERED_APPLICATION}*
|
||||
- **`ActiveDirectory:SignUpSignInPolicy`:** B2C_1_GenericSignUpSignIn
|
||||
- **`ActiveDirectory__Tenant`:** "{OUR_AD}.onmicrosoft.com"
|
||||
- **`ActiveDirectory__ApplicationId`:** *{ID_OF_THE_REGISTERED_APPLICATION}*
|
||||
- **`ActiveDirectory__SignUpSignInPolicy`:** B2C_1_GenericSignUpSignIn
|
||||
|
||||
Some of the API calls to our backend requires, that a user is authenticated to proceed. `DELETE` operations are a good example for that. The code in the [`BaseController.cs`](/Backend/Monolithic/Controllers/BaseController.cs) has an `[Authenticate]` attribute added to the Delete function. This will automatically refuse calls from unauthenticated clients. In a real-word scenario, you would also want to check if the User's ID matches the owner ID of the item that gets deleted to make sure the client has the right permissions.
|
||||
|
||||
|
|
|
@ -26,12 +26,42 @@ spec:
|
|||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: CosmosDb__Endpoint
|
||||
key: AzureCosmosDb__Endpoint
|
||||
- name: AzureCosmosDb__Key
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: CosmosDb__Key
|
||||
key: AzureCosmosDb__Key
|
||||
- name: AzureStorage__StorageAccountName
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: AzureStorage__StorageAccountName
|
||||
- name: AzureStorage__Key
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: AzureStorage__Key
|
||||
- name: ActiveDirectory__Tenant
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: ActiveDirectory__Tenant
|
||||
- name: ActiveDirectory__ApplicationId
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: ActiveDirectory__ApplicationId
|
||||
- name: ActiveDirectory__SignUpSignInPolicy
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: ActiveDirectory__SignUpSignInPolicy
|
||||
- name: ApplicationInsights__InstrumentationKey
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: appsettings
|
||||
key: ApplicationInsights__InstrumentationKey
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 443
|
||||
|
|
Загрузка…
Ссылка в новой задаче