Skip to content

Commit c93b713

Browse files
committed
updating pr
1 parent 78350b0 commit c93b713

3 files changed

Lines changed: 51 additions & 138 deletions

File tree

common/scripts/vault-utils.sh

Lines changed: 0 additions & 78 deletions
This file was deleted.

overrides/values-vault-jwt.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
vault_jwt_config: true
2+
vault_jwt_policies:
3+
# ============================================================
4+
# JWT/SPIFFE Auth Policies (for application workloads)
5+
# These are used by apps authenticating via SPIFFE JWT tokens
6+
# Only define policies for apps that need direct Vault access
7+
# K8s auth policies (<prefix>-k8s-secret) are auto-created by Ansible
8+
# ============================================================
9+
- name: apps-qtodo-jwt-secret
10+
policy: |
11+
path "secret/data/apps/qtodo/*" {
12+
capabilities = ["read"]
13+
}
14+
- name: hub-infra-rhtpa-jwt-secret
15+
policy: |
16+
path "secret/data/hub/infra/rhtpa/*" {
17+
capabilities = ["read"]
18+
}
19+
- name: hub-supply-chain-jwt-secret
20+
policy: |
21+
path "secret/data/hub/infra/quay/*" {
22+
capabilities = ["read"]
23+
}
24+
path "secret/data/hub/infra/registry/*" {
25+
capabilities = ["read", "create", "update"]
26+
}
27+
path "secret/data/hub/infra/rhtpa/rhtpa-oidc-cli" {
28+
capabilities = ["read"]
29+
}
30+
vault_jwt_roles:
31+
- name: qtodo
32+
audience: https://keycloak.apps.{{ $.Values.global.clusterDomain }}/realms/ztvp
33+
subject: spiffe://apps.{{ $.Values.global.clusterDomain }}/ns/qtodo/sa/qtodo
34+
policies:
35+
- apps-qtodo-jwt-secret
36+
# RHTPA vault role
37+
# - name: rhtpa
38+
# audience: rhtpa
39+
# subject: spiffe://apps.{{ $.Values.global.clusterDomain }}/ns/trusted-profile-analyzer/sa/rhtpa
40+
# policies:
41+
# - hub-infra-rhtpa-jwt-secret
42+
# Supply chain vault role (for Tekton pipelines; enable with supply-chain app / Option 3 or BYO registry)
43+
# - name: supply-chain
44+
# audience: supply-chain
45+
# subject: spiffe://apps.{{ $.Values.global.clusterDomain }}/ns/{{ $.Values.global.pattern }}-hub/sa/pipeline
46+
# policies:
47+
# - hub-supply-chain-jwt-secret
48+
oidc_discovery_url: https://spire-spiffe-oidc-discovery-provider.zero-trust-workload-identity-manager.svc.cluster.local
49+
# oidcDiscoveryCa: /run/secrets/kubernetes.io/serviceaccount/service-ca.crt
50+
# defaultRole: qtodo

values-hub.yaml

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ clusterGroup:
197197
sharedValueFiles:
198198
- '/overrides/values-{{ $.Values.global.clusterPlatform }}.yaml'
199199
- '/overrides/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml'
200+
- '/overrides/values-vault-jwt.yaml'
200201
# sharedValueFiles is a flexible mechanism that will add the listed valuefiles to every app defined in the
201202
# applications section. We intend this to supplement and possibly even replace previous "magic" mechanisms, though
202203
# we do not at present have a target date for removal.
@@ -330,66 +331,6 @@ clusterGroup:
330331
chartVersion: 0.1.*
331332
annotations:
332333
argocd.argoproj.io/sync-wave: "25"
333-
# Custom Vault policies for least-privilege access
334-
# Each application gets access only to its specific secrets path
335-
#
336-
# TWO types of policies needed:
337-
# 1. <prefix>-k8s-secret - for Kubernetes auth (ClusterSecretStore/ExternalSecrets)
338-
# 2. <prefix>-jwt-secret - for JWT/SPIFFE auth (application workloads)
339-
#
340-
# NOTE: K8s auth policies are auto-created by Ansible from vaultPrefixes
341-
# JWT auth policies below are manually defined for apps that need direct Vault access
342-
policies:
343-
# ============================================================
344-
# JWT/SPIFFE Auth Policies (for application workloads)
345-
# These are used by apps authenticating via SPIFFE JWT tokens
346-
# Only define policies for apps that need direct Vault access
347-
# K8s auth policies (<prefix>-k8s-secret) are auto-created by Ansible
348-
# ============================================================
349-
- name: apps-qtodo-jwt-secret
350-
policy: |
351-
path "secret/data/apps/qtodo/*" {
352-
capabilities = ["read"]
353-
}
354-
- name: hub-infra-rhtpa-jwt-secret
355-
policy: |
356-
path "secret/data/hub/infra/rhtpa/*" {
357-
capabilities = ["read"]
358-
}
359-
- name: hub-supply-chain-jwt-secret
360-
policy: |
361-
path "secret/data/hub/infra/quay/*" {
362-
capabilities = ["read"]
363-
}
364-
path "secret/data/hub/infra/registry/*" {
365-
capabilities = ["read", "create", "update"]
366-
}
367-
path "secret/data/hub/infra/rhtpa/rhtpa-oidc-cli" {
368-
capabilities = ["read"]
369-
}
370-
jwt:
371-
enabled: true
372-
oidcDiscoveryUrl: https://spire-spiffe-oidc-discovery-provider.zero-trust-workload-identity-manager.svc.cluster.local
373-
oidcDiscoveryCa: /run/secrets/kubernetes.io/serviceaccount/service-ca.crt
374-
defaultRole: qtodo
375-
roles:
376-
- name: qtodo
377-
audience: https://keycloak.apps.{{ $.Values.global.clusterDomain }}/realms/ztvp
378-
subject: spiffe://apps.{{ $.Values.global.clusterDomain }}/ns/qtodo/sa/qtodo
379-
policies:
380-
- apps-qtodo-jwt-secret
381-
# RHTPA vault role
382-
# - name: rhtpa
383-
# audience: rhtpa
384-
# subject: spiffe://apps.{{ $.Values.global.clusterDomain }}/ns/trusted-profile-analyzer/sa/rhtpa
385-
# policies:
386-
# - hub-infra-rhtpa-jwt-secret
387-
# Supply chain vault role (for Tekton pipelines; enable with supply-chain app / Option 3 or BYO registry)
388-
# - name: supply-chain
389-
# audience: supply-chain
390-
# subject: spiffe://apps.{{ $.Values.global.clusterDomain }}/ns/{{ $.Values.global.pattern }}-hub/sa/pipeline
391-
# policies:
392-
# - hub-supply-chain-jwt-secret
393334
# Shared Object Storage Backend
394335
# Required for RHTPA and QUAY (provides S3-compatible storage via NooBaa MCG)
395336
# NooBaa MCG provides S3-compatible object storage for multiple applications

0 commit comments

Comments
 (0)