You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
rzisholz
committed
CP-21164: add Helm chart support for Conjur JWT authentication
Exposes config.cyberark's Conjur JWT fields (serviceId, account,
jwtSource) in values.yaml/values.schema.json, and documents per-cluster
Conjur onboarding as a prerequisite in the chart README — the tenant
administrator's own Conjur Cloud credentials, no admin credential needed
at deploy time.
Drops the jwtFilePath knob: it let an operator set a path the chart's
projected-volume mount couldn't actually honor (mountPath was hardcoded
independently of it), producing a deployment that renders cleanly but
never authenticates. The agent's own DefaultTokenPath already matches
the chart's fixed mount path, so there's nothing to configure.
Gates the projected token volume on serviceId being set, not just
jwtSource (which defaults to "file") — a pure username/password install
was getting an unused audience=conjur token volume for no reason,
unnecessary surface for clusters with admission policies constraining
projected-token audiences. Factored the condition into a named template
since it's needed in two places and needs to stay in sync.
Documents that the volume's audience is fixed at conjur, not a
values.yaml setting, and that the config-validation fix in the previous
PR makes the README's "fails closed at startup" claim actually true
(previously that only held because sendSecretValues:true is the chart
default and triggers eager authenticator construction).
jwtSource now has an enum constraint in values.schema.json, so a typo
fails at `helm install` with a clear message instead of a CrashLoopBackOff
— ValidateJWTSource already rejects it at agent startup, this just moves
where the operator finds out.
Dropped the <!-- AUTO-GENERATED --> markers around the Values section:
nothing regenerates it for this chart (the repo's generate target only
covers venafi-kubernetes-agent), and the markers implied otherwise —
the cyberark.* fields are already hand-documented above, outside that
block, which the markers made look like an oversight rather than intent.
You will require tenant details and credentials for the CyberArk Identity Security Platform.
20
-
Put them in the following environment variables:
19
+
The agent supports **two authentication methods**, selected automatically by
20
+
config:
21
+
22
+
| Set this | Method used |
23
+
|---|---|
24
+
|`config.cyberark.serviceId` (Conjur authn-jwt service-id) |**Conjur JWT exchange** — exchanges a projected ServiceAccount token for a short-lived Conjur access token. No stored password. Preferred for new installs. |
25
+
|`ARK_USERNAME` + `ARK_SECRET` in the Secret (and no `serviceId`) |**Legacy CyberArk Identity username/password** — backward compatible with existing GA installs. |
26
+
27
+
If **both** are set, the Conjur `serviceId` wins (so a migrating install can add
28
+
the service-id before removing its old credentials) and a warning is logged. If
29
+
**neither** is set, the agent fails closed at startup.
30
+
31
+
The only credential always required in the Kubernetes Secret is the CyberArk
32
+
tenant subdomain (`ARK_SUBDOMAIN`).
21
33
22
34
```sh
23
-
export ARK_SUBDOMAIN= # your CyberArk tenant subdomain e.g. tlskp-test
24
-
export ARK_USERNAME= # your CyberArk username
25
-
export ARK_SECRET= # your CyberArk password
26
-
# OPTIONAL: the URL for the CyberArk Discovery API if not using the production environment
35
+
export ARK_SUBDOMAIN= # your CyberArk tenant subdomain, e.g. tlskp-test
36
+
# OPTIONAL: Discovery API URL for non-production environments
| Agent logs `401 Unauthorized` from Conjur | ServiceAccount token `audience` does not match the authenticator's configured `audience` value, or the authn-jwt authenticator is not enabled for the account | The chart's projected volume always requests `audience=conjur` — this is fixed, not a values.yaml setting. Confirm the Conjur `conjur/authn-jwt/<serviceId>/audience` variable is also set to `conjur`, and that the authenticator is enabled (`CONJUR_AUTHENTICATORS` includes `authn-jwt/<serviceId>`) |
146
+
| Agent logs `403 Forbidden` from the upload API | The agent's workload is authenticated but not authorized to upload | Confirm in the CyberArk console that this cluster's workload was granted the uploader permission during onboarding |
147
+
| Agent logs `500` / no upload attempt | Conjur is unreachable or returned an unexpected error | Check network policy / DNS; inspect Conjur audit logs for the host identity |
Copy file name to clipboardExpand all lines: deploy/charts/disco-agent/tests/__snapshot__/configmap_test.yaml.snap
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ custom-cluster-description:
6
6
cluster_name: ""
7
7
cluster_description: "A cloud hosted Kubernetes cluster hosting production workloads.\n\nteam: team-1\nemail: team-1@example.com\npurpose: Production workloads\n"
"description": "A human readable name for the cluster where the agent is deployed (optional).\n\nThis cluster name will be associated with the data that the agent uploads to the Discovery and Context service. If empty (the default), the service account name will be used instead.",
150
153
"type": "string"
151
154
},
155
+
"helm-values.config.cyberark": {
156
+
"additionalProperties": false,
157
+
"description": "CyberArk Conjur JWT authentication settings. The agent exchanges a projected ServiceAccount token (audience=conjur) for a short-lived Conjur access token used to authenticate to the Discovery & Context upload API.",
"description": "The Conjur account name. For CyberArk-hosted tenants this is always \"conjur\".",
174
+
"type": "string"
175
+
},
176
+
"helm-values.config.cyberark.jwtSource": {
177
+
"default": "file",
178
+
"description": "Token source for Conjur JWT authentication. \"file\" reads the token from the chart's own projected SA-token volume (fixed mount path, not configurable). \"spiffe\" is deferred and not implemented in this POC.",
179
+
"enum": ["", "file"],
180
+
"type": "string"
181
+
},
182
+
"helm-values.config.cyberark.serviceId": {
183
+
"default": "",
184
+
"description": "The Conjur authn-jwt authenticator service ID configured for this tenant. Bare segment, not the policy path. Example: disco-agent",
"description": "You can configure the agent to exclude some annotations or labels from being pushed . All Kubernetes objects are affected. The objects are still pushed, but the specified annotations and labels are removed before being pushed.\n\nDots is the only character that needs to be escaped in the regex. Use either double quotes with escaped single quotes or unquoted strings for the regex to avoid YAML parsing issues with `\\.`.\n\nExample: excludeAnnotationKeysRegex: ['^kapp\\.k14s\\.io/original.*']",
0 commit comments