Cache the API key in the CredentialsData object instead of in a variable in memory. This allows us to provide it from saved storage (either netrc file or keystore), and allows us to be explicit about whether we're using a user password or an actual API key, which currently are used somewhat interchangeably in the code.
Implemented Changes
Add an api_key field to CredentialsData
Modify AuthnAuthenticationStrategy and LdapAuthenticationStrategy to store and retrieve the api token from the credentials provider instead of in an instance variable.
Connected Issue/Story
Resolves N/A
Changelog
[x] The CHANGELOG has been updated, or
[ ] This PR does not include user-facing changes and doesn't require a
CHANGELOG update
Test coverage
[x] This PR includes new unit and integration tests to go with the code
changes, or
[ ] The changes in this PR do not require tests
Documentation
[ ] Docs (e.g. READMEs) were updated in this PR
[ ] A follow-up issue to update official docs has been filed here: [insert issue ID]()
[x] This PR does not require updating any documentation
Behavior
[ ] This PR changes product behavior and has been reviewed by a PO, or
[x] These changes are part of a larger initiative that will be reviewed later, or
[ ] No behavior was changed with this PR
Security
[ ] Security architect has reviewed the changes in this PR,
[x] These changes are part of a larger initiative with a separate security review, or
[ ] There are no security aspects to these changes
Desired Outcome
Cache the API key in the
CredentialsData
object instead of in a variable in memory. This allows us to provide it from saved storage (either netrc file or keystore), and allows us to be explicit about whether we're using a user password or an actual API key, which currently are used somewhat interchangeably in the code.Implemented Changes
api_key
field toCredentialsData
AuthnAuthenticationStrategy
andLdapAuthenticationStrategy
to store and retrieve the api token from the credentials provider instead of in an instance variable.Connected Issue/Story
Resolves N/A
Changelog
Test coverage
Documentation
README
s) were updated in this PRBehavior
Security