feat: migrate certificate creation from bicep to CreateCertificate pipeline steps#5929
Conversation
…ate pipeline step""
There was a problem hiding this comment.
Pull request overview
Reintroduces Maestro EventGrid certificate provisioning via the native CreateCertificate pipeline step (removing deployment-script-based cert creation for SFI-ID4.2.1 compliance), and updates infra/config so Bicep can configure EventGrid authentication using SAN-based validation (prod) and thumbprint matching (self-signed dev) sourced from Key Vault tags.
Changes:
- Adds a post-create reconciliation in the
CreateCertificatestep implementation to tag KV certificates with their thumbprint (so Bicep can read it via ARM tags). - Updates SVC/MGMT pipelines and cluster templates to create Maestro server/consumer certs before deployments and pass explicit
certSAN/issuer values. - Replaces the previous cert-creation/access pattern with a new RBAC-only Key Vault secret access module and adds schema + CEL validation for SAN consistency.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tooling/templatize/pkg/pipeline/certificate.go | Tags KV certificates with thumbprints after create/skip to enable Bicep consumption. |
| dev-infrastructure/templates/svc-cluster.bicep | Switches Maestro server module inputs from certDomain to explicit maestroServerCertSAN. |
| dev-infrastructure/templates/mgmt-cluster.bicep | Switches Maestro consumer module inputs from certDomain to explicit maestroConsumerCertSAN. |
| dev-infrastructure/svc-pipeline.yaml | Adds maestro-server-cert CreateCertificate step and wires it into cluster dependencies. |
| dev-infrastructure/modules/maestro/maestro-server.bicep | Replaces cert-creation module with secret RBAC + reads thumbprint from KV secret tags for EventGrid config. |
| dev-infrastructure/modules/maestro/maestro-consumer.bicep | Replaces cert-creation module with secret RBAC + reads thumbprint from KV secret tags for EventGrid config. |
| dev-infrastructure/modules/keyvault/key-vault-secret-access.bicep | New module to grant MI RBAC access to a specific Key Vault secret. |
| dev-infrastructure/mgmt-pipeline.yaml | Adds maestro-consumer-cert CreateCertificate step and wires it into dependencies. |
| dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam | Maps config maestro.server.certSAN into the SVC cluster deployment parameter. |
| dev-infrastructure/configurations/mgmt-cluster.tmpl.bicepparam | Maps config maestro.agent.certSAN into the MGMT cluster deployment parameter. |
| config/rendered/dev/pers/westus3.yaml | Adds rendered Maestro server/agent certSAN and removes certDomain. |
| config/rendered/dev/perf/westus3.yaml | Adds rendered Maestro server/agent certSAN and removes certDomain. |
| config/rendered/dev/dev/westus3.yaml | Adds rendered Maestro server/agent certSAN and removes certDomain. |
| config/rendered/dev/cspr/westus3.yaml | Adds rendered Maestro server/agent certSAN and removes certDomain. |
| config/rendered/dev/ci01/centralus.yaml | Adds rendered Maestro server/agent certSAN and removes certDomain. |
| config/rendered/dev/ci00/centralus.yaml | Adds rendered Maestro server/agent certSAN and removes certDomain. |
| config/config.yaml | Replaces Maestro certDomain with templated server.certSAN / agent.certSAN defaults/overrides. |
| config/config.schema.json | Removes maestro.certDomain, adds required certSAN fields, and adds CEL validations tying SANs to DNS + names. |
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
87af47f to
e945dd7
Compare
Implements the manage gate for CreateCertificate steps, allowing pipelines to conditionally skip certificate creation based on a config-driven "Enabled"/"Disabled" value. When manage is nil (default), the step proceeds as before, preserving backward compatibility. Upstream: Azure/ARO-Tools#261 Ref: https://redhat.atlassian.net/browse/ARO-28053
ec97ed7 to
085902b
Compare
…ine steps Extract FPA, Geneva Actions, and Geneva RP/cluster logs certificates from bicep ARM templates into CreateCertificate pipeline steps with config-driven manage (Enabled/Disabled) gating. - Remove cert modules from svc-cluster, mgmt-cluster, geneva-identities - Replace key-vault-cert-with-access with standalone keyvault-secret-access for CSI secret provider access grants - Drop keyCredentials from Geneva Actions Entra app (SNI only) - Remove manageCertificates (bool), replaced by manage (string enum) - Add CEL rules enforcing SAN construction - Add certificateManage shared schema definition Ref: https://redhat.atlassian.net/browse/ARO-28053
085902b to
7193ebc
Compare
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: geoberle, raelga The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-parallel |
What
Migrate all certificate creation from bicep ARM templates to native
CreateCertificatepipeline steps:Maestro (ARO-28055)
CreateCertificatesteps tosvc-pipeline.yamlandmgmt-pipeline.yamlfor maestro-server and maestro-consumermaestro.certDomainconfig with explicitmaestro.server.certSANandmaestro.agent.certSANwith CEL validationkey-vault-secret-access.bicepmodule for RBAC-only cert secret accessmaestro-server.bicepandmaestro-consumer.bicepto only handle RBAC and EventGrid registrationtagsproperty on secrets that predate the tag patternFPA, Geneva Actions, Geneva logs (ARO-28053)
CreateCertificatepipeline stepssvc-cluster,mgmt-cluster,geneva-identitiesbicepkey-vault-cert-with-accesswith standalonekeyvault-secret-accessfor CSI secret provider access grantskeyCredentialsfrom Geneva Actions Entra app (SNI only)manageCertificatesbool with per-certmanage(Enabled/Disabled) enum for conditional gatingcertificateManageshared schema definitionTooling
managefield onCreateCertificatepipeline steps — whenDisabled, step is skipped; when nil, proceeds as before (backward compatible)Why
Deployment scripts for certificate creation violate SFI-ID4.2.1 compliance requirements. The
CreateCertificatepipeline step is a native replacement that avoids deployment scripts entirely. Self-signed certificates require ThumbprintMatch validation in EventGrid since we cannot register them as CA certificates — the thumbprint-as-tag pattern bridges the gap between the pipeline step (which creates the cert) and the bicep deployment (which configures EventGrid). Themanagegate allows environments to opt out of pipeline-managed cert creation where certs are provisioned externally.https://redhat.atlassian.net/browse/ARO-28055
https://redhat.atlassian.net/browse/ARO-28053
Testing
managefield gatingPR Checklist