Skip to content

SDKQE-3975: carry Capella v4 API key credentials through fit-cli - #17

Open
emilienbev wants to merge 2 commits into
mainfrom
SDKQE-3975
Open

SDKQE-3975: carry Capella v4 API key credentials through fit-cli#17
emilienbev wants to merge 2 commits into
mainfrom
SDKQE-3975

Conversation

@emilienbev

Copy link
Copy Markdown
Contributor

cbdinocluster now authenticates to Capella with a v4 organization API key. init --auto disables the cloud deployer when the API secret is empty, and the later health check fails with a misleading message. fit-cli only carried v2 credentials, so this change adds the v4 values on every credential surface.

  • Resolve a v4 API key, secret, and endpoint per Capella environment, from environments.json5 and the same AWS secret, with personal overrides via config, CAPELLA_API_KEY / CAPELLA_API_SECRET, or --capella-api-key / --capella-api-secret.
  • Forward CAPELLA_V4_ENDPOINT, CAPELLA_API_KEY, and CAPELLA_API_SECRET to the remote box so cbdinocluster init --auto enables the cloud deployer.
  • Keep the v2 username and password. Custom image deploys, server version changes, and columnar operations still need them.

Verified with bun run typecheck and bun run test (894 pass). Lint failures are pre-existing on main; this change adds none. Not verified against live Capella.

Note for reviewers: the AWS secrets fit-cli/capella/{prod,dev,stage} need apiKey and apiSecret entries before this can work, and the stage v4 endpoint is derived from the dev naming pattern and still needs confirmation.

- Resolve a v4 organization API key, secret, and v4 endpoint per Capella
  environment, from environments.json5 and the same AWS secret, with
  personal overrides via config, CAPELLA_API_KEY / CAPELLA_API_SECRET,
  or --capella-api-key / --capella-api-secret
- Forward CAPELLA_V4_ENDPOINT, CAPELLA_API_KEY, and CAPELLA_API_SECRET
  to the remote box so cbdinocluster init --auto enables the cloud
  deployer, which now requires the API secret
- Keep the v2 username/password: custom image deploys, server version
  changes, and columnar operations still need them
- CodeQL reported clear-text logging of the API key at the prompt
  replay log sites in src/util/non-fit/replay.ts.
- Use a masked password prompt for the API key and do not put the
  saved key in the prompt message. The replay log masks password
  prompts, so neither the message nor the answer shows the key.
- A blank answer keeps the saved key, the same as the API secret.
- Add capella.apiKey to SECRET_FIELDS so the init --auto resolution
  log masks it too.
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.

2 participants