Skip to content

mbp-1005: Implement multi-role support for Vault JWT configuration - #61

Merged
mbaldessari merged 1 commit into
validatedpatterns:mainfrom
mlorenzofr:mbp-1005
Nov 13, 2025
Merged

mbaldessari merged 1 commit into
validatedpatterns:mainfrom
mlorenzofr:mbp-1005

Conversation

@mlorenzofr

Copy link
Copy Markdown
Contributor

This PR implements support for multiple roles in the Hashicorp Vault JWT configuration.
This only affects JWT and it has no effect on other Vault components.
We need this changes for Zero Trust Validated Pattern.
I have tested it and it works correctly, but I'm open to changes if you find any bugs.

Signed-off-by: Manuel Lorenzo <mlorenzofr@redhat.com>
@mbaldessari
mbaldessari merged commit fb358b4 into validatedpatterns:main Nov 13, 2025
7 checks passed
@mlorenzofr
mlorenzofr deleted the mbp-1005 branch November 13, 2025 17:04
minmzzhang added a commit to minmzzhang/layered-zero-trust that referenced this pull request Nov 14, 2025
Merge PR#69 changes to support multiple Vault JWT roles natively.

Changes:
1. Update common/scripts/vault-utils.sh (from validatedpatterns#69)
   - Simplify to use vault_jwt_roles variable (matches rhvp.cluster_utils v1.1.0)
   - Remove legacy single-role variables (default_role, spiffe_audience, etc.)
   - Pass vault_jwt_roles instead of jwt_roles to Ansible

2. Remove vault-role-creator workaround
   - Delete charts/rhtpa-operator/templates/vault-role-creator-job.yaml
   - Delete charts/rhtpa-operator/templates/vault-role-creator-script.yaml
   - No longer needed now that Ansible collection supports multi-role

Upstream Dependencies:
- rhvp.cluster_utils v1.1.0+ (PR validatedpatterns/rhvp.cluster_utils#61)
  - Implements vault_jwt_roles loop in vault_jwt_roles.yaml
  - Creates all JWT roles defined in values-hub.yaml
- validatedpatterns/layered-zero-trust PR#69 (vault-utils.sh update)

This properly creates all JWT roles (qtodo, rhtpa, syft) via Ansible
instead of using the Kubernetes Job workaround.

Testing:
After installation, verify all roles created:
  oc exec -n vault vault-0 -- vault list auth/jwt/role
  # Expected: qtodo, rhtpa, syft

Related: validatedpatterns#69
Related: validatedpatterns/rhvp.cluster_utils#61
Signed-off-by: Min Zhang <minzhang@redhat.com>
minmzzhang added a commit to minmzzhang/layered-zero-trust that referenced this pull request Nov 15, 2025
Merge PR#69 changes to support multiple Vault JWT roles natively.

Changes:
1. Update common/scripts/vault-utils.sh (from validatedpatterns#69)
   - Simplify to use vault_jwt_roles variable (matches rhvp.cluster_utils v1.1.0)
   - Remove legacy single-role variables (default_role, spiffe_audience, etc.)
   - Pass vault_jwt_roles instead of jwt_roles to Ansible

2. Remove vault-role-creator workaround
   - Delete charts/rhtpa-operator/templates/vault-role-creator-job.yaml
   - Delete charts/rhtpa-operator/templates/vault-role-creator-script.yaml
   - No longer needed now that Ansible collection supports multi-role

Upstream Dependencies:
- rhvp.cluster_utils v1.1.0+ (PR validatedpatterns/rhvp.cluster_utils#61)
  - Implements vault_jwt_roles loop in vault_jwt_roles.yaml
  - Creates all JWT roles defined in values-hub.yaml
- validatedpatterns/layered-zero-trust PR#69 (vault-utils.sh update)

This properly creates all JWT roles (qtodo, rhtpa, syft) via Ansible
instead of using the Kubernetes Job workaround.

Testing:
After installation, verify all roles created:
  oc exec -n vault vault-0 -- vault list auth/jwt/role
  # Expected: qtodo, rhtpa, syft

Related: validatedpatterns#69
Related: validatedpatterns/rhvp.cluster_utils#61
Signed-off-by: Min Zhang <minzhang@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants