Repository navigation
Conversation
Running 'rc alias set' without keys wrote the credentials into shell history when they were passed on the command line. Prompt instead when stdin is a terminal and output is not JSON. The access key is echoed and the secret key is hidden, matching 'mc alias set'. Non-interactive runs keep the existing usage error so scripts and CI do not hang. Interactive prompts use the existing SecretSource and read_code_interactive helpers.
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
rc alias setrequired the access key and the secret key on the command line.rc alias set local http://localhost:9000 MYKEY MYSECRETis saved in bash history as plain text.~/.bash_history, or the terminal scrollback, can see the credentials.psoutput while the command runs.Changes
Enter Access Key:and read the value with echo on.Enter Secret Key:and read the value with echo off.--jsonis set or stdin is not a terminal. Non-interactive runs keep the current error:Access key and secret key are required unless --anonymous is set, exit code 2.docs/reference/rc/alias.md.Behavior notes
mc alias setfrom MinIO.This is the same trade-off as
mc.Testing
cargo fmt --all --check— passcargo clippy --workspace -- -D warnings— passcargo test --workspace— pass