Replace Microsoft Entra ID with Keycloak as sole authentication provider#2
Replace Microsoft Entra ID with Keycloak as sole authentication provider#2
Conversation
Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
…ication Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
|
@copilot here's more instructions: We’ll continue from the previous work on authentication and identity setup. 🎯 ObjectiveRefactor the entire authentication and authorization system so that Keycloak becomes the only identity provider for:
All identity provisioning, roles, and client registrations must be handled automatically with Terraform. 🛠️ Implementation Guidelines
🧩 Expected Behavior
✅ Acceptance Criteria
🚀 Next StepContinue from the existing project structure and let Copilot decide what needs to be created, updated, or removed to complete the transition to Keycloak. |
- Removed Azure AD Terraform module completely - Updated all Terraform configs to use only Keycloak - Removed Azure providers (azuread, azurerm) from terraform.tf and providers.tf - Removed Azure-specific variables and outputs - Updated export-env.sh to only support Keycloak (removed dual-provider logic) - Removed Entra ID token service files (entra_token_service.py, token_service_factory.py) - Updated products-agent to use only Keycloak token service - Updated products-web to use only Keycloak OAuth (removed provider detection) - Updated terraform.tfvars.example to only show Keycloak configuration - Removed MIGRATION.md and IMPLEMENTATION_SUMMARY.md (no longer needed) - Updated README.md to reflect Keycloak-only authentication Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
- Removed Microsoft Entra ID authentication provider section - Updated architecture overview to show only Keycloak - Removed Azure AD prerequisites and configuration - Updated terraform.tfvars.example section to show only Keycloak - Updated provider list to remove azuread and azurerm - Updated infrastructure deployment section to reference Keycloak - Updated module structure diagram to show keycloak module - Removed Azure from billing warning - Cleaned up export-env-old.sh temporary file Co-authored-by: shoootyou <19865273+shoootyou@users.noreply.github.com>
✅ Complete replacement done! All Microsoft Entra ID references have been removed. Changes Summary: Removed:
Updated:
Result: Zero references to Microsoft Entra ID remain. The application now authenticates exclusively through Keycloak with full Terraform automation. |
Completely replaces Microsoft Entra ID with Keycloak as the exclusive identity provider across all application components. This is a full substitution (not a migration) that removes all Azure AD dependencies and simplifies the authentication architecture to use only Keycloak.
Changes
Terraform Configuration
terraform/modules/azure-ad-app/modulemain.tfto use only Keycloak module for vault authenticationoutputs.tfto expose only Keycloak client IDs, secrets, and OIDC endpointsad_user_passwordtouser_passwordfor clarityKeycloak Terraform Module (
terraform/modules/keycloak/)confused-deputy-realm), clients, users, and groupsApplication Code
products-agent/auth/entra_token_service.pyandtoken_service_factory.pyproducts-agent/main.pyto directly use Keycloak token serviceproducts-web/app.pyto use only Keycloak OAuth URLs with hardcoded endpoint constructionInfrastructure
export-env.shwith single provider support:./export-env.sh [local|docker|aws]Documentation
README.mdto describe Keycloak-only architectureterraform/README.mdwith complete removal of Azure/Entra ID referencesterraform.tfvars.exampleto show only Keycloak configuration variablesArchitecture
The application now uses Keycloak exclusively for:
Security Model Preservation
All zero-trust patterns maintained:
Result
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.