-
Notifications
You must be signed in to change notification settings - Fork 27
CP-25864: fall back cluster_name to cyberark.service_id under Conjur JWT #827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -793,6 +793,14 @@ func ValidateAndCombineConfig(log logr.Logger, cfg Config, flags AgentCmdFlags) | |
| clusterName = arkUsername | ||
| } | ||
| } | ||
| if clusterName == "" && cfg.CyberArk != nil && cfg.CyberArk.ServiceID != "" { | ||
| // Conjur JWT installs have no ARK_USERNAME to fall back to. | ||
| // cyberark.service_id (the Conjur authn-jwt service ID, | ||
| // typically the cluster UUID) is always set for these | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The genuine per-cluster UUID is already collected elsewhere: Concrete failure: a tenant onboards one authn-jwt authenticator and installs the agent on ten clusters with the wizard's Helm command, which omits If the wizard genuinely mints a per-cluster service ID, please say so here and cite it, because the chart documentation currently says the opposite and one of the two needs correcting.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verified against the actual wizard code (not just the chart README), since this determines whether the fallback is safe:
So two clusters onboarded by the same tenant get different One caveat I can't verify from code: |
||
| // installs, so it's a better last resort than an empty name. | ||
| log.Info("Using cyberark.service_id as cluster name because cluster_name, cluster_id, and ARK_USERNAME are all unset; prefer setting cluster_name explicitly", "clusterName", cfg.CyberArk.ServiceID) | ||
| clusterName = cfg.CyberArk.ServiceID | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth confirming against the backend before merging: this changes what existing Conjur JWT installs send, not only what new ones send.
The other clients deliberately avoid this:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checked this against the actual DCS/FIS persistence path, since it's the right question:
So the mechanism you're describing is real: every periodic upload replaces the stored name. However — I searched discoverycontext-frontend for any existing rename/update-name mutation against this field and found none; only read paths exist today. There's no UI feature yet that lets an operator set a name for this to clobber. So the specific failure (operator renames in UI, agent silently reverts it) is currently hypothetical, not a live regression this PR introduces. What this PR does change for already-deployed Conjur JWT installs: they go from uploading |
||
| } | ||
| if cfg.OrganizationID != "" { | ||
| log.Info(fmt.Sprintf(`Ignoring the organization_id field in the config file. This field is not needed in %s mode.`, res.OutputMode)) | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.