justinmclean opened a new issue, #4463: URL: https://github.com/apache/iggy/issues/4463
Split from #4451. ## Problem The CLI reads credentials from `IGGY_USERNAME` and `IGGY_PASSWORD` (`core/cli/src/credentials.rs:38-39`, `:148`), but no variable holds a token. A CI job has to pass the token with `-t`, where the process list shows it, or write it to `contexts.toml`. ## Proposal - Read `IGGY_TOKEN` in `credentials.rs`, next to the `IGGY_USERNAME` and `IGGY_PASSWORD` pair. - Order: the flags win over `IGGY_TOKEN`, and `IGGY_TOKEN` wins over the username and password pair. - Keep this in `credentials.rs`, not as a clap `env` attribute. In its conflict rules clap treats an environment value like a flag, so `-u` would fail while the variable is set. - Mention `IGGY_TOKEN`, `IGGY_USERNAME` and `IGGY_PASSWORD` in the `--help` text of the credential flags. ## Acceptance - With `IGGY_TOKEN` set to a valid PAT and no credential flags, `iggy stream list` succeeds. - `-u`/`-p` or `-t` on the command line override `IGGY_TOKEN`. - With `IGGY_TOKEN` and the username and password pair all set, the token is used. - A test in `core/integration/tests/cli/user/test_login_options.rs` covers the three cases and passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
