Entra ID Workload Identity Baseline
App registrations, service principals, groups and federated credentials (OIDC for GitHub/Terraform) - the identity plumbing every Azure org rebuilds by hand.
Verification
Live-testedReally deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.
Conformance
- Static validation (fmt · validate · tflint)
- Security scan clean (Checkov)
- Plan test superseded by live test
Provenance
- SHA-256 checksum
- Cosign signature
Functional
- Live-tested - applied, verified, destroyed
Last verified 2026-06-29 · how we verify
Verify this download
cosign · sha-256Don't take our word for it. Every release is signed with cosign - check the bytes against our pinned public key before you trust them.
# 1. Our pinned public key - fetch once, trust out-of-band
curl -O https://www.iac-bazaar.com/cosign.pub
# 2. This module's Sigstore bundle
curl -o azure-entra-id-baseline-1.0.0.sigstore.json \
https://www.iac-bazaar.com/api/artifacts/azure-entra-id-baseline/signature
# 3. Verify the tarball you downloaded
cosign verify-blob \
--key cosign.pub \
--bundle azure-entra-id-baseline-1.0.0.sigstore.json \
azure-entra-id-baseline-1.0.0.tar.gz
# → Verified OK
# 4. (optional) confirm the checksum too
echo "ada702c2a6f18da2c2d2c352188e63da222e7a491c5130d6505133a18c5e03c3 azure-entra-id-baseline-1.0.0.tar.gz" | sha256sum -cUse it from the registry
terraform · opentofumodule "entra_id_baseline" {
source = "www.iac-bazaar.com/iac-bazaar/azure-entra-id-baseline/azure"
version = "1.0.0"
}Needs a registry token from /account/tokens. The module itself is free; the account is what identifies you. Full setup: registry docs.
Cite it in your README
badge · attributionPaste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.
[](https://www.iac-bazaar.com/catalog/azure-entra-id-baseline?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)
Terraform module 1.0.0, live-tested on IaC Bazaar: [Entra ID Workload Identity Baseline](https://www.iac-bazaar.com/catalog/azure-entra-id-baseline?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)
```hcl
module "entra_id_baseline" {
source = "www.iac-bazaar.com/iac-bazaar/azure-entra-id-baseline/azure"
version = "1.0.0"
}
```Preview:
Inputs & outputs
Create a free account to read this module's contract
The declared contract - every input name, type, default and description, plus every output - is shown to signed-in accounts, not to anonymous visitors.
A free account sees the contract of every module in the catalogue. There is no subscription and nothing to buy - the modules are free to download, and they run under Vizier.
Documentation
azure-entra-id-baseline
The Entra ID workload-identity plumbing every Azure org rebuilds by hand:
app registrations, their service principals, keyless federated OIDC
credentials (GitHub Actions, Terraform Cloud, Kubernetes), security groups,
and Azure RBAC role assignments — all from one composable module call. Works
with Terraform and OpenTofu (>= 1.6), hashicorp/azuread >= 3.0, < 4.0
plus hashicorp/azurerm >= 4.0, < 5.0 (for the resource-plane role grants).
Prerequisites: creating app registrations needs Microsoft Graph admin consent for
Application.ReadWrite.AllandGroup.ReadWrite.All. Without those grants the apply fails on the first registration.
Design & secure defaults
- No secrets, ever. The module never creates a client secret or password.
External workloads federate via OIDC
(
azuread_application_federated_identity_credential) and present short-lived tokens — nothing exportable to leak, rotate, or commit by accident. - Deny-by-default app access. Service principals are created with
app_role_assignment_required = true: Entra issues tokens only to principals explicitly assigned to the app. Opt out per-app if you really mean to. - Least-privilege Graph permissions. No
required_resource_accessunless you declare it;Role(application) vsScope(delegated) is validated. - Implicit grant off. Web clients use auth-code + PKCE; legacy implicit token/ID-token issuance stays disabled.
- Owned by construction. Every app, service principal, and group requires at least one owner — ownerless directory objects are an operational hazard (no one can manage or clean them up). The deploying principal is a sane default.
- Security groups only. Groups are
security_enabled = true,mail_enabled = false— for RBAC/assignment, not mailboxes. - Duplicate-name guard.
prevent_duplicate_names = truestops a typo from silently adopting a stranger's existing registration. - No SP replication race. Role assignments to module-created service
principals set
skip_service_principal_aad_check = trueso a fresh apply does not fail while the SP propagates across Entra.
Requirements
| Requirement | Version |
|---|---|
| Terraform / OpenTofu | >= 1.6 |
hashicorp/azuread | >= 3.0, < 4.0 |
hashicorp/azurerm | >= 4.0, < 5.0 |
License
Commercial — LicenseRef-IaCBazaar-Commercial. © IaC Bazaar. Original work (not derived from a third-party module).
Usage code & full reference need an account
The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.
- Usage
- Inputs
- Outputs
- Notes for integrators
Related modules
azure-b2c
An Azure AD B2C tenant created where its customer directory should live, on PremiumP1 or P2, linked to the subscription that pays per monthly active user. Data residency and the onmicrosoft.com name are chosen once and cannot change; user flows, policies and app registrations are configured inside the tenant with an azuread provider pointed at the exported tenant ID.
azure-ddos-protection-plan
The plan is a fixed monthly charge of roughly three thousand dollars from the moment it exists, attached VNets or not; it protects only the VNets that reference it; and DDoS IP Protection on the addresses themselves is an order of magnitude cheaper for a handful. The charge accepted by name before the plan is created, the plan ID exported for azure-vnet, an output that says it bills unattached.
azure-firewall
Every security feature on this service defaults to telling you, not to stopping it: threat_intelligence_mode defaults to Alert, which logs traffic to known-malicious destinations and forwards it, and intrusion detection does the same. Deny for both here, with the DNS proxy on so FQDN rules and the client agree on an answer.
azure-entra-domain-services
Microsoft Entra Domain Services with NTLM v1, TLS 1.0 and RC4 off and Kerberos armoring on, the WinRM network security group the service insists on, the AAD DC Administrators group with the members you name, and the Domain Controller Services principal registered, all of which fail late when missing. Notifications go to the admins; filtered sync and LDAPS are inputs.
azure-purview
A Microsoft Purview account for the data map with public network access off, the managed Event Hub that bills monthly whether used or not turned off, a system identity, and Storage Blob Data Reader granted to that identity on every storage account it will scan, since a scan fails otherwise. The account bills for data map capacity from creation; public access is accepted by name.
azure-waf-policy
Detection mode evaluates every rule, logs every match and forwards every request - the dashboard fills with blocked-looking entries while the backend receives them all. Prevention by default, Detection only by name. A policy attached to no listener protects nothing, so the attached listeners are an output; every exclusion is a hole and has to carry a reason.