Describe the bug.
Secret files commonly end with an LF or CRLF line ending. osmo credential set --payload-file reads the complete file and includes that terminal line ending in the credential value. Registry authentication can then fail even though the token itself is valid.
The CLI should remove terminal line-ending characters from payload-file values while preserving the rest of the content.
Minimum reproducible example
printf 'token-value\n' > /tmp/osmo-token
osmo credential set example --type REGISTRY --payload-file auth=/tmp/osmo-token
The submitted auth value contains the final newline.
Relevant log output
Authentication fails with the registry's normal invalid-credential response because the submitted value differs from the valid token.
Environment
- OSMO
main
- Any environment using
osmo credential set --payload-file
Code of Conduct
Describe the bug.
Secret files commonly end with an LF or CRLF line ending.
osmo credential set --payload-filereads the complete file and includes that terminal line ending in the credential value. Registry authentication can then fail even though the token itself is valid.The CLI should remove terminal line-ending characters from payload-file values while preserving the rest of the content.
Minimum reproducible example
The submitted
authvalue contains the final newline.Relevant log output
Authentication fails with the registry's normal invalid-credential response because the submitted value differs from the valid token.
Environment
mainosmo credential set --payload-fileCode of Conduct