Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-66851] Publish over SSH plugin not using Jenkins credentials for providing username, key and passphrase #70

Open
jira-importer opened this issue Oct 11, 2021 · 12 comments

Comments

@jira-importer
Copy link
Collaborator

As the summary says, the Publish over SSH plugin still uses custom fields for providing the username, private key and passphrase instead of a credentials selector. This also makes it necessary to put variables into JCasC files instead of a credentials ID which undermines security (because that variable has to be set somewhere).

Please fix.


Originally reported by dhs, imported from: Publish over SSH plugin not using Jenkins credentials for providing username, key and passphrase
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
@jira-importer
Copy link
Collaborator Author

JIRAUSER140920:

Can anyone tell, has this issue been fixed?

@markuschen
Copy link

No changes here with latest version 1.24

@ttodua
Copy link

ttodua commented Mar 21, 2022

Hi @markuschen can this be considered as an important security matter? Should we refrain from installing this plugin until update is applied?

@markuschen
Copy link

This is a feature enhancement, not an explicit security problem. All known security related issues where solved in the last two releases.

@proski
Copy link

proski commented May 25, 2022

It's a duplicate of #177.
I tried wrapping sshPublisher in sshagent as a workaround, but I'm getting "Auth Fail".
I don't think sshagent is a good workaround anyway, it's better to have precise control which credential is used.
@ttodua: The answer depends on your tolerance to having credentials configured in multiple places.

@dhs-rec
Copy link

dhs-rec commented May 27, 2022

@proski, could you please elaborate why you don't have precise control which credential is used with ssh-agent? As far as I can see you add exactly the credential(s) you want to the agent. How can this not be precise?

@proski
Copy link

proski commented Jan 13, 2023

I believe that using sshagent doesn't prevent ssh from using other private keys.

@dhs-rec
Copy link

dhs-rec commented Jan 16, 2023

Of course not. but that's not a problem of ssh-agent. However, which keys are effective can be precisely controlled by adding them to the user's authorized_keys file on the remote side. So you have precise control.

@Isegrimm
Copy link

Any update on this? Just for my understanding, somewhere between versions 1.21 and 1.25 the Jenkins credential provider is not used anymore, requiring credentials to be entered directly in the 'Publis over SSH' configuration, right?

This issue is the only information I have found that's related to my problem. We have an exisiting Jenkins instance running 1.21 which runs this plugin with a stored Global credential just fine, and a new Jenkins instance running 1.25 with the same setup, on which the plugin fails to connect, unless I enter the key in the Publish over SSH config.

Is this a feature or a bug?

@dhs-rec
Copy link

dhs-rec commented Jul 22, 2024

This is of course a bug.

@Isegrimm
Copy link

Thanks for your reply @dhs-rec.
Seeing that the bug was reported more than 2 years ago, this will probably mean it will not be fixed soon, so I'll better configure the key on each node individually.

@gmcdonald
Copy link
Contributor

Hi All, I aim to take a look and some issues soon and look towards a new release, but it would be great if anyone would PR some of these issues to make it easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants