feat(agent): split legacy username/password login into its own file - #819
Open
roeezis wants to merge 2 commits into
Open
feat(agent): split legacy username/password login into its own file#819roeezis wants to merge 2 commits into
roeezis wants to merge 2 commits into
Conversation
added 2 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.
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 2 of the SMS/Conjur JWT authentication series (split out of #817 for reviewability). Stacked on #818 — includes #818's commit until that merges, so the diff here will shrink to just this PR's own change once #818 lands.
identity.gomixed shared client/token-cache plumbing with the CyberArk Identity username/password (UP) login flow. Moves the UP-specific code intousername_password.goso 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
ActionAnswerand exporting the mock's success credentials for other packages' tests.Test plan
go build ./...go test ./internal/cyberark/identity/...