Add Azure Container Registry setup and documentation
- Configure ACR name: zdlas in azure-pipelines.yml - Add Azure Container Registry documentation and guides - Add scripts for ACR creation and image building - Add docker-compose config for ACR deployment - Remove temporary Excel lock file
This commit is contained in:
207
docs/AZURE-ACR-DNL-SCOPE.md
Normal file
207
docs/AZURE-ACR-DNL-SCOPE.md
Normal file
@@ -0,0 +1,207 @@
|
||||
# Azure Container Registry - Domain Name Label Scope
|
||||
|
||||
## Wat is Domain Name Label Scope?
|
||||
|
||||
**Domain Name Label (DNL) Scope** is een security feature van Azure Container Registry die voorkomt dat iemand anders dezelfde DNS naam kan gebruiken als je registry wordt verwijderd (subdomain takeover prevention).
|
||||
|
||||
## Opties
|
||||
|
||||
### 1. **Unsecure** (Aanbevolen voor simpele setup) ⭐
|
||||
|
||||
**DNS Format:** `registryname.azurecr.io`
|
||||
|
||||
**Voorbeeld:**
|
||||
- Registry naam: `zuyderlandcmdbacr`
|
||||
- DNS naam: `zuyderlandcmdbacr.azurecr.io`
|
||||
|
||||
**Voordelen:**
|
||||
- ✅ Eenvoudig en voorspelbaar
|
||||
- ✅ Geen hash in de naam
|
||||
- ✅ Makkelijk te onthouden en configureren
|
||||
|
||||
**Nadelen:**
|
||||
- ❌ Minder security (maar meestal voldoende voor interne tools)
|
||||
|
||||
**Wanneer gebruiken:**
|
||||
- ✅ Simpele setup
|
||||
- ✅ Interne/corporate omgeving
|
||||
- ✅ Je wilt een voorspelbare DNS naam
|
||||
|
||||
---
|
||||
|
||||
### 2. **Resource Group Reuse** (Aanbevolen voor security) 🔒
|
||||
|
||||
**DNS Format:** `registryname-hash.azurecr.io`
|
||||
|
||||
**Voorbeeld:**
|
||||
- Registry naam: `zuyderlandcmdbacr`
|
||||
- DNS naam: `zuyderlandcmdbacr-abc123.azurecr.io` (met unieke hash)
|
||||
|
||||
**Voordelen:**
|
||||
- ✅ Extra security layer
|
||||
- ✅ Consistent binnen resource group
|
||||
- ✅ Voorkomt subdomain takeover
|
||||
|
||||
**Nadelen:**
|
||||
- ❌ Hash in de naam (minder voorspelbaar)
|
||||
- ❌ Moet alle configuraties aanpassen met volledige DNS naam
|
||||
|
||||
**Wanneer gebruiken:**
|
||||
- ✅ Productie omgevingen
|
||||
- ✅ Security is belangrijk
|
||||
- ✅ Je wilt extra bescherming
|
||||
|
||||
---
|
||||
|
||||
### 3. **Subscription Reuse**
|
||||
|
||||
**DNS Format:** `registryname-hash.azurecr.io` (hash gebaseerd op subscription)
|
||||
|
||||
**Wanneer gebruiken:**
|
||||
- Als je meerdere resource groups hebt binnen dezelfde subscription
|
||||
- Je wilt consistentie binnen de subscription
|
||||
|
||||
---
|
||||
|
||||
### 4. **Tenant Reuse**
|
||||
|
||||
**DNS Format:** `registryname-hash.azurecr.io` (hash gebaseerd op tenant)
|
||||
|
||||
**Wanneer gebruiken:**
|
||||
- Als je meerdere subscriptions hebt binnen dezelfde tenant
|
||||
- Je wilt consistentie binnen de tenant
|
||||
|
||||
---
|
||||
|
||||
### 5. **No Reuse**
|
||||
|
||||
**DNS Format:** `registryname-uniquehash.azurecr.io` (altijd unieke hash)
|
||||
|
||||
**Wanneer gebruiken:**
|
||||
- Maximale security vereist
|
||||
- Je wilt absoluut geen risico op DNS conflicts
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Aanbeveling voor Jouw Situatie
|
||||
|
||||
**Voor Zuyderland CMDB GUI (20 gebruikers, corporate omgeving):**
|
||||
|
||||
### Optie A: **"Unsecure"** (Aanbevolen) ⭐
|
||||
|
||||
**Waarom:**
|
||||
- ✅ Eenvoudigste setup
|
||||
- ✅ Voorspelbare DNS naam
|
||||
- ✅ Geen configuratie wijzigingen nodig
|
||||
- ✅ Voldoende voor interne corporate tool
|
||||
|
||||
**DNS naam wordt:** `zuyderlandcmdbacr.azurecr.io`
|
||||
|
||||
**Configuratie:**
|
||||
```yaml
|
||||
# azure-pipelines.yml
|
||||
acrName: 'zuyderlandcmdbacr' # Simpel, zonder hash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Optie B: **"Resource Group Reuse"** (Als je extra security wilt) 🔒
|
||||
|
||||
**Waarom:**
|
||||
- ✅ Extra security layer
|
||||
- ✅ Voorkomt subdomain takeover
|
||||
- ✅ Consistent binnen resource group
|
||||
|
||||
**DNS naam wordt:** `zuyderlandcmdbacr-abc123.azurecr.io` (met hash)
|
||||
|
||||
**⚠️ Belangrijk:** Je moet dan alle configuraties aanpassen!
|
||||
|
||||
**Configuratie wijzigingen nodig:**
|
||||
```yaml
|
||||
# azure-pipelines.yml
|
||||
acrName: 'zuyderlandcmdbacr-abc123' # Met hash!
|
||||
```
|
||||
|
||||
```yaml
|
||||
# docker-compose.prod.acr.yml
|
||||
image: zuyderlandcmdbacr-abc123.azurecr.io/zuyderland-cmdb-gui/backend:latest
|
||||
```
|
||||
|
||||
```bash
|
||||
# scripts/build-and-push-azure.sh
|
||||
REGISTRY="zuyderlandcmdbacr-abc123.azurecr.io" # Met hash!
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Belangrijke Waarschuwingen
|
||||
|
||||
### 1. **Permanente Keuze**
|
||||
De DNL Scope keuze is **permanent** en kan **niet meer worden gewijzigd** na aanmaken van de registry!
|
||||
|
||||
### 2. **Geen Streepjes in Registry Naam**
|
||||
Als je een DNL Scope met hash gebruikt, mag je **geen streepjes (`-`)** gebruiken in de registry naam, omdat de hash zelf al een streepje gebruikt als scheidingsteken.
|
||||
|
||||
**Goed:** `zuyderlandcmdbacr`
|
||||
**Fout:** `zuyderland-cmdb-acr` (streepje conflict met hash)
|
||||
|
||||
### 3. **Configuratie Aanpassingen**
|
||||
Als je een hash gebruikt, moet je **alle configuraties aanpassen** met de volledige DNS naam (inclusief hash).
|
||||
|
||||
---
|
||||
|
||||
## 📋 Checklist
|
||||
|
||||
### Als je "Unsecure" kiest:
|
||||
- [ ] Registry naam zonder streepjes (bijv. `zuyderlandcmdbacr`)
|
||||
- [ ] DNS naam wordt: `zuyderlandcmdbacr.azurecr.io`
|
||||
- [ ] Geen configuratie wijzigingen nodig
|
||||
- [ ] Gebruik `acrName: 'zuyderlandcmdbacr'` in pipeline
|
||||
|
||||
### Als je "Resource Group Reuse" kiest:
|
||||
- [ ] Registry naam zonder streepjes (bijv. `zuyderlandcmdbacr`)
|
||||
- [ ] Noteer de volledige DNS naam na aanmaken (met hash)
|
||||
- [ ] Pas `azure-pipelines.yml` aan met volledige DNS naam
|
||||
- [ ] Pas `docker-compose.prod.acr.yml` aan met volledige DNS naam
|
||||
- [ ] Pas `scripts/build-and-push-azure.sh` aan met volledige DNS naam
|
||||
|
||||
---
|
||||
|
||||
## 🔍 DNS Naam Vinden
|
||||
|
||||
Na het aanmaken van de ACR, vind je de DNS naam:
|
||||
|
||||
**Via Azure Portal:**
|
||||
1. Ga naar je Container Registry
|
||||
2. Klik op **"Overview"**
|
||||
3. De **"Login server"** is je DNS naam
|
||||
|
||||
**Via Azure CLI:**
|
||||
```bash
|
||||
az acr show --name zuyderlandcmdbacr --query loginServer -o tsv
|
||||
```
|
||||
|
||||
**Output voorbeelden:**
|
||||
- Unsecure: `zuyderlandcmdbacr.azurecr.io`
|
||||
- Met hash: `zuyderlandcmdbacr-abc123.azurecr.io`
|
||||
|
||||
---
|
||||
|
||||
## 💡 Mijn Aanbeveling
|
||||
|
||||
**Voor jouw situatie (corporate tool, 20 gebruikers):**
|
||||
|
||||
Kies **"Unsecure"** omdat:
|
||||
1. ✅ Eenvoudigste setup
|
||||
2. ✅ Geen configuratie wijzigingen nodig
|
||||
3. ✅ Voldoende security voor interne tool
|
||||
4. ✅ Voorspelbare DNS naam
|
||||
|
||||
Als je later meer security nodig hebt, kun je altijd een nieuwe registry aanmaken met een andere scope (maar dan moet je wel alles migreren).
|
||||
|
||||
---
|
||||
|
||||
## 📚 Meer Informatie
|
||||
|
||||
- [Azure Container Registry DNL Scope Documentation](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal)
|
||||
- [Subdomain Takeover Prevention](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-security)
|
||||
Reference in New Issue
Block a user