Skip to content

Commit a5599b9

Browse files
authored
Adding an option to ACS to use cluster CA, not self signed for ACS Central (#131)
* Adding an option to ACS to use cluster CA, not self signed, for ACS Central * Adding explanation how ACS handles two OCP routes * switching from the internal OCP image registry (image-registry.openshift-image-registry.svc:5000/openshift/cli) to the public Red Hat registry (registry.redhat.io/openshift4/ose-cli) * UX polish, the user-facing URL becomes central.apps.<domain> which is simpler and more intuitive * Using the newest OC CLI image, built based on RHEL9
1 parent 96fbaa7 commit a5599b9

6 files changed

Lines changed: 59 additions & 4 deletions

File tree

charts/acs-central/templates/central-cr.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ spec:
2121
port: 443
2222
route:
2323
enabled: {{ .Values.central.exposure.route.enabled }}
24+
{{- if .Values.central.exposure.route.host }}
25+
host: {{ .Values.central.exposure.route.host }}
26+
{{- end }}
27+
{{- if .Values.central.exposure.route.reencrypt.enabled }}
28+
reencrypt:
29+
enabled: true
30+
{{- if .Values.central.exposure.route.reencrypt.host }}
31+
host: {{ .Values.central.exposure.route.reencrypt.host }}
32+
{{- end }}
33+
{{- end }}
2434

2535
{{- if .Values.central.persistence.enabled }}
2636
persistence:

charts/acs-central/templates/console-link.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@ metadata:
88
annotations:
99
argocd.argoproj.io/sync-wave: "46"
1010
spec:
11+
{{- if .Values.central.exposure.route.reencrypt.enabled }}
12+
{{- if .Values.central.exposure.route.reencrypt.host }}
13+
href: https://{{ .Values.central.exposure.route.reencrypt.host }}
14+
{{- else }}
15+
href: https://central.{{ .Values.global.localClusterDomain }}
16+
{{- end }}
17+
{{- else }}
18+
{{- if .Values.central.exposure.route.host }}
19+
href: https://{{ .Values.central.exposure.route.host }}
20+
{{- else }}
1121
href: https://central-{{ .Release.Namespace }}.{{ .Values.global.localClusterDomain }}
22+
{{- end }}
23+
{{- end }}
1224
location: ApplicationMenu
1325
text: Advanced Cluster Security
1426
applicationMenu:

charts/acs-central/templates/jobs/create-auth-provider.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ spec:
8686
exit 0
8787
fi
8888
89-
ACS_CENTRAL_HOSTNAME="$(oc get route central -n stackrox -o jsonpath='{.spec.host}')"
89+
ACS_CENTRAL_HOSTNAME="$(oc get route central-reencrypt -n stackrox -o jsonpath='{.spec.host}' 2>/dev/null || oc get route central -n stackrox -o jsonpath='{.spec.host}')"
9090
echo "ACS Central hostname: $ACS_CENTRAL_HOSTNAME"
9191
9292
cat > /tmp/oidc-config.json << 'OIDCEOF'

charts/acs-central/values.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ central:
7373
exposure:
7474
route:
7575
enabled: true
76-
# Use cluster wildcard certificate
76+
host: "" # Autogenerate if not specified
7777
tls:
7878
enabled: true
7979
termination: passthrough
80+
reencrypt:
81+
enabled: true
82+
host: "" # Autogenerate if not specified
8083
loadBalancer:
8184
enabled: false
8285

@@ -170,8 +173,8 @@ integration:
170173
# Container image for the auth provider configuration job
171174
# Uses OpenShift CLI tools (curl, oc, jq, etc.)
172175
jobImage:
173-
registry: image-registry.openshift-image-registry.svc:5000
174-
repository: openshift/cli
176+
registry: registry.redhat.io
177+
repository: openshift4/ose-cli-rhel9
175178
tag: latest
176179
pullPolicy: IfNotPresent
177180
# Service account used by jobs (init bundle, auth provider, htpasswd)

docs/acs-deployment.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,34 @@ The ACS deployment in the Layered Zero Trust pattern is implemented using:
4848
- Admission Controller (policy enforcement)
4949
- Collector (DaemonSet for runtime monitoring)
5050

51+
## Route and TLS Configuration
52+
53+
ACS Central exposes two OpenShift routes with different TLS termination modes:
54+
55+
| Route | TLS Mode | Purpose |
56+
|---|---|---|
57+
| `central` | Passthrough | Sensor/SecuredCluster gRPC communication (mTLS) |
58+
| `central-reencrypt` | Reencrypt | Browser UI access using cluster wildcard certificate |
59+
60+
The **passthrough route is required** for sensor communication. Sensors use
61+
mutual TLS with certificates from the cluster init bundle, and the RHACS
62+
operator [explicitly states](https://github.com/stackrox/stackrox/blob/master/operator/api/v1alpha1/central_types.go)
63+
that the reencrypt route *"should not be used for sensor communication"*
64+
because the router terminates the sensor's TLS session, breaking mTLS
65+
authentication.
66+
67+
The **reencrypt route** is enabled by default (`central.exposure.route.reencrypt.enabled: true`)
68+
so that browser users see the cluster's wildcard certificate instead of
69+
Central's self-signed certificate. This works on all platforms:
70+
71+
- **Cloud (AWS, Azure, GCP)**: wildcard cert is signed by a public CA — no browser warning
72+
- **BareMetal / vSphere**: wildcard cert uses the cluster ingress CA — trusted
73+
if `ztvp-certificates` has injected it via `proxyCA`
74+
75+
The RHACS operator auto-generates the reencrypt route hostname
76+
(`central-reencrypt-stackrox.apps.<domain>`). The ConsoleLink and OIDC auth
77+
provider `uiEndpoint` automatically point to the reencrypt route when enabled.
78+
5179
## Deployment Workflow
5280

5381
### Phase 1: Operator Installation (Managed by Pattern Framework)

values-hub.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ clusterGroup:
596596
# value: gp3-csi # Example for AWS
597597
- name: central.exposure.route.enabled
598598
value: "true"
599+
- name: central.exposure.route.reencrypt.host
600+
value: "central.{{ $.Values.global.localClusterDomain }}"
599601
- name: integration.keycloak.enabled
600602
value: "true"
601603
- name: integration.keycloak.realm

0 commit comments

Comments
 (0)