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-64105] Add optional SSHAuthenticator implementation #13

Merged
merged 4 commits into from Jul 18, 2022

Conversation

Dohbedoh
Copy link
Contributor

@Dohbedoh Dohbedoh commented Jun 30, 2022

(move jenkinsci/ssh-credentials-plugin#126 here with ssh-credentials as an optional dependency)

JENKINS-64105: Added MinaSSHPasswordKeyAuthenticator and MinaSSHPublicKeyKeyAuthenticator to provide authentication support with an Apache Mina SSHD ClientSession.

See also:

Note: also added system property to control the auth timeout when doing the auth (those defaults to 15s which I believe is more than reasonable):

  • io.jenkins.plugins.mina_sshd_api.core.authenticators.MinaSSHPasswordKeyAuthenticator.authTimeout
  • io.jenkins.plugins.mina_sshd_api.core.authenticators.MinaSSHPublicKeyAuthenticator.authTimeout
  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@Dohbedoh Dohbedoh requested a review from a team as a code owner June 30, 2022 01:33
@Dohbedoh Dohbedoh added the enhancement New feature or request label Jun 30, 2022
@Dohbedoh
Copy link
Contributor Author

Dohbedoh commented Jun 30, 2022

While testing integration within on a Jenkins instance, I noticed that snakeyaml-api plugin causes a dependency cycle (due to an implied dependency on sshd):

2022-06-30 02:10:17.461+0000 [id=28]	SEVERE	hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:snakeyaml-api, deactivating all involved) Plugin:snakeyaml-api -> Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:snakeyaml-api

Would need to bump jenkins version requirement of snakeyaml-api apparently. I did exactly that and that fixed it.
Not sure if other dependent plugin might be impacted..

@jetersen
Copy link
Member

jetersen commented Jul 1, 2022

new version of BOM is available with fixed snakeyaml: https://github.com/jenkinsci/bom/releases/tag/1466.v85a_616ea_b_87c

@jetersen
Copy link
Member

jetersen commented Jul 1, 2022

Should be able to merge/rebase and all should be good 😄

@Dohbedoh Dohbedoh merged commit f9df646 into jenkinsci:main Jul 18, 2022
@Dohbedoh Dohbedoh deleted the JENKINS-64105 branch July 18, 2022 01:03
@fautpasycraindre
Copy link

fautpasycraindre commented Jul 18, 2022

hello @Dohbedoh . It seems to be an issue with SSHD from the new release. I had to rollback manually .jpi file to get Jenkins running again (it blocks all plugins). Could you have a look please ?

Edit: files to rollback (use .bak in plugins folder)

  • mina-sshd-api-core.jpi
  • mina-sshd-api-common.jpi

@TomHellier
Copy link

@Dohbedoh

can confirm, we're seeing the same issue.

image

Will try rolling back jpi file, thanks @fautpasycraindre

@Dohbedoh
Copy link
Contributor Author

Dohbedoh commented Jul 18, 2022

I did not test this with CasC or a dependent of commons-lang3-api-plugin installed. Sorry for the inconvenience.
But that seems to be a problem in jenkinsci/commons-lang3-api-plugin#18 actually. Will take a look in a bit.

@Dohbedoh
Copy link
Contributor Author

Should be fixed by jenkinsci/commons-lang3-api-plugin#19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants