Skip to content

JFrog CLI Fails to Download CLI when STDIN support is disabled #61

@aidanleuck

Description

@aidanleuck

Describe the bug

We use Kubernetes agents for our builds which uses a custom launcher that is lacking STDIN support. Without the JFROG_CLI_PASSWORD_STDIN_SUPPORT = "false" being set in our pipeline, the build hangs. This is expected based off my understanding of how the plugin works.

However, when disabling this when we use a username and password that contain special characters such as $, you can erroneously receive permission denied errors. I believe this is because the shell is not properly escaping values when not passing the value via stdin.

I receive a 404 when using credentials with special characters in it, I have validated username and passwords without special characters work as expected. Using an Artifactory token instead of a password appears to be a workaround for now, but it would be nice if we were able to use normal username and password fields as users can only generate tokens that expire after a year making things fail after some time.

Current behavior

When credentials contain special characters, such as $ authentication fails when using JFROG_CLI_PASSWORD_STDIN_SUPPORT = "false". This occurs when downloading the binary from Artifactory.

{
18:36:43    "errors": [
18:36:43      {
18:36:43        "status": 401,
18:36:43        "message": "Bad credentials"
18:36:43      }
18:36:43    ]
18:36:43  } 

Reproduction steps

  1. Setup the JFrog plugin with a username and password, make the password contain a $ character (note I've only tested on Linux)
  2. Set JFROG_CLI_PASSWORD_STDIN_SUPPORT = "false" in your pipeline
  3. Run the build
  4. Notice you receive a 404 from Artifactory

Expected behavior

The plugin to handle special characters when JFROG_CLI_PASSWORD_STDIN_SUPPORT = "false" and not fail with a 404

JFrog plugin version

1.5.10

JFrog CLI version

2.92.0

Operating system type and version

Linux Ubuntu 24.04 Kubernetes container

JFrog Artifactory version

No response

JFrog Xray version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions