Skip to content

feat(agent): add Helm chart support for Conjur JWT authentication - #824

Open
roeezis wants to merge 7 commits into
jetstack:masterfrom
roeezis:split/07-helm-chart
Open

feat(agent): add Helm chart support for Conjur JWT authentication#824
roeezis wants to merge 7 commits into
jetstack:masterfrom
roeezis:split/07-helm-chart

Conversation

@roeezis

@roeezis roeezis commented Aug 23, 2026

Copy link
Copy Markdown

Summary

Part 7 (final) of the SMS/Conjur JWT authentication series (split out of #817). Stacked on the prior 6 PRs in this series — diff will shrink to just this PR's own change once they merge.

Exposes config.cyberark's new 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.

Test plan

  • go build ./...
  • helm lint deploy/charts/disco-agent/

rzisholz added 7 commits August 23, 2026 13:48
Introduces a small, isolated interface for reading a JWT from a file
path — the first piece of the upcoming Conjur JWT authentication path,
split out on its own since nothing else in this PR depends on it yet.
identity.go mixed the shared client/token-cache plumbing with the
CyberArk Identity username/password (UP) login flow. Move the UP-specific
code into username_password.go so the shared plumbing stays easy to find
once a second login mechanism (Conjur JWT) is added alongside it.

No behavior change — pure extraction, plus unexporting ActionAnswer and
exporting the mock's success credentials for other packages' tests.
The Service Discovery API returns several independently-hosted services;
the authn-jwt exchange this PR series adds is served by secrets_manager,
a different host from identity_administration. Add a SecretsManager
field to Services and parse it, so callers have it available — nothing
reads it yet, that lands in a later PR alongside the client that needs
it.
Exchanges a projected ServiceAccount JWT (via jwtsource) for a Conjur
access token through the authn-jwt endpoint, and authenticates requests
with it as identity.RequestAuthenticator. Nothing wires this in yet —
that's the next PR, once both this and the legacy identity client exist
side by side.

The identity returned for audit tagging is the token's own sub claim
when it can be extracted, falling back to the configured service ID
otherwise, so an unusual token shape degrades rather than fails the
request.
Adds NewRequestAuthenticator, choosing between the new Conjur JWT
exchange and the legacy CyberArk Identity username/password login based
on which config is present — Conjur JWT takes priority when both are
set. Conjur JWT requires service_id and resolves its base URL from the
secrets_manager service discovered in the prior PR, not
identity_administration; the two are different hosts.

Switches keyfetch's client over to the new authenticator selection
instead of constructing a username/password identity client directly,
so JWKS fetching supports both authentication methods too.
NewCyberArk and the agent config schema were still legacy-username/password-only
at the top level, even though the underlying authenticator selection (previous
PR) already supports Conjur JWT. Thread service_id/account/jwt_source/jwt_file_path
through cyberark.service_id in the agent config down to NewCyberArk, so the
config file is the single place an operator chooses which authentication method
to use.

config.go's call site and client_cyberark.go's signature change together —
splitting them across two PRs would leave one non-building at every commit
in between.
Exposes config.cyberark's new 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.
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.

1 participant