Skip to content

Credential payload files retain trailing line endings #1210

Description

@agirault

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

  • I agree to follow NVIDIA OSMO's Code of Conduct.
  • I searched the open bugs and found no duplicate for this bug report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalThe author is not in @NVIDIA/osmo-dev

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions