Merge pull request #11 from pamelafox/secret-keyvault
Browse files- README.md +1 -1
- infra/main.bicep +2 -1
- infra/main.parameters.json +3 -0
README.md
CHANGED
@@ -118,7 +118,7 @@ It is important to secure the databases in web applications to prevent unwanted
|
|
118 |
This infrastructure uses the following mechanisms to secure the PostgreSQL database:
|
119 |
|
120 |
* Azure Firewall: The database is accessible only from other Azure IPs, not from public IPs. (Note that includes other customers using Azure).
|
121 |
-
* Admin Username:
|
122 |
* Admin Password: Randomly generated and stored in Key Vault.
|
123 |
* PostgreSQL Version: Latest available on Azure, version 14, which includes security improvements.
|
124 |
* Django Admin Interface: The URL (typically "/admin") is a unique string generated based on the App Service Plan ID.
|
|
|
118 |
This infrastructure uses the following mechanisms to secure the PostgreSQL database:
|
119 |
|
120 |
* Azure Firewall: The database is accessible only from other Azure IPs, not from public IPs. (Note that includes other customers using Azure).
|
121 |
+
* Admin Username: Randomly generated and stored in Key Vault.
|
122 |
* Admin Password: Randomly generated and stored in Key Vault.
|
123 |
* PostgreSQL Version: Latest available on Azure, version 14, which includes security improvements.
|
124 |
* Django Admin Interface: The URL (typically "/admin") is a unique string generated based on the App Service Plan ID.
|
infra/main.bicep
CHANGED
@@ -11,7 +11,7 @@ param location string
|
|
11 |
|
12 |
@secure()
|
13 |
@description('PostGreSQL Server administrator username')
|
14 |
-
param postgresAdminUser string
|
15 |
|
16 |
@secure()
|
17 |
@description('PostGreSQL Server administrator password')
|
@@ -163,3 +163,4 @@ module logAnalyticsWorkspace 'core/monitor/loganalytics.bicep' = {
|
|
163 |
|
164 |
output WEB_URI string = 'https://${web.outputs.uri}'
|
165 |
output AZURE_LOCATION string = location
|
|
|
|
11 |
|
12 |
@secure()
|
13 |
@description('PostGreSQL Server administrator username')
|
14 |
+
param postgresAdminUser string
|
15 |
|
16 |
@secure()
|
17 |
@description('PostGreSQL Server administrator password')
|
|
|
163 |
|
164 |
output WEB_URI string = 'https://${web.outputs.uri}'
|
165 |
output AZURE_LOCATION string = location
|
166 |
+
output AZURE_KEY_VAULT_NAME string = keyVault.outputs.name
|
infra/main.parameters.json
CHANGED
@@ -11,6 +11,9 @@
|
|
11 |
"principalId": {
|
12 |
"value": "${AZURE_PRINCIPAL_ID}"
|
13 |
},
|
|
|
|
|
|
|
14 |
"postgresAdminPassword": {
|
15 |
"value": "$(secretOrRandomPassword ${AZURE_KEY_VAULT_NAME} postgresAdminPassword)"
|
16 |
},
|
|
|
11 |
"principalId": {
|
12 |
"value": "${AZURE_PRINCIPAL_ID}"
|
13 |
},
|
14 |
+
"postgresAdminUser": {
|
15 |
+
"value": "$(secretOrRandomPassword ${AZURE_KEY_VAULT_NAME} postgresAdminUser)"
|
16 |
+
},
|
17 |
"postgresAdminPassword": {
|
18 |
"value": "$(secretOrRandomPassword ${AZURE_KEY_VAULT_NAME} postgresAdminPassword)"
|
19 |
},
|