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

Run integration tests on alpine:latest #1553

Closed
wants to merge 10 commits into from
Closed

Conversation

Rob-Hague
Copy link
Collaborator

@Rob-Hague Rob-Hague commented Dec 9, 2024

edit: the integration tests started failing with Alpine Linux 3.21. This tracks setting the image back to alpine:latest after #1554

@Rob-Hague
Copy link
Collaborator Author

Integration tests failing with "Killing sshd.pam service failed with exit code 1" e.g.

  Failed Common_DisposeAfterLossOfNetworkConnectivity [900 ms]
  Error Message:
   Test method Renci.SshNet.IntegrationTests.ConnectivityTests.Common_DisposeAfterLossOfNetworkConnectivity threw exception: 
System.ApplicationException: Killing sshd.pam service failed with exit code 1.


  Stack Trace:
      at Renci.SshNet.IntegrationTests.SshConnectionDisruptor.PauseSshd(SshClient client) in /home/runner/work/SSH.NET/SSH.NET/test/Renci.SshNet.IntegrationTests/SshConnectionDisruptor.cs:line 36
   at Renci.SshNet.IntegrationTests.SshConnectionDisruptor.BreakConnections() in /home/runner/work/SSH.NET/SSH.NET/test/Renci.SshNet.IntegrationTests/SshConnectionDisruptor.cs:line 18
   at Renci.SshNet.IntegrationTests.ConnectivityTests.Common_DisposeAfterLossOfNetworkConnectivity() in /home/runner/work/SSH.NET/SSH.NET/test/Renci.SshNet.IntegrationTests/ConnectivityTests.cs:line 75
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Started between 4Dec and 7Dec. Looks like it is caused by alpine:latest bumping to 3.21. It uses OpenSSH 9.9

@Rob-Hague
Copy link
Collaborator Author

Rob-Hague commented Dec 9, 2024

works with Alpine Linux 3.20 & OpenSSH 9.7

can reproduce locally now (my "alpine:latest" was still at 3.18)

output = command.Execute();
if (command.ExitStatus != 0)

using (var command = client.CreateCommand("sudo pkill -9 -U sshnet -f sshd-session.pam"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sshd.pam -> sshd-session.pam is the fix for OpenSSH 9.8+. However, that release also completely removes DSA at compile time, so now the DSA tests fail.

I think it is time to remove DSA

DSA is removed at compile time from OpenSSH 9.8 and higher.
That means we can no longer test it in our integration tests. It seems like a
good time to remove it. From the OpenSSH release notes:

    DSA, as specified in the SSHv2 protocol, is inherently weak - being
    limited to a 160 bit private key and use of the SHA1 digest. Its
    estimated security level is only 80 bits symmetric equivalent.

    OpenSSH has disabled DSA keys by default since 2015 but has retained
    run-time optional support for them. DSA was the only mandatory-to-
    implement algorithm in the SSHv2 RFCs, mostly because alternative
    algorithms were encumbered by patents when the SSHv2 protocol was
    specified.

    This has not been the case for decades at this point and better
    algorithms are well supported by all actively-maintained SSH
    implementations. We do not consider the costs of maintaining DSA
    in OpenSSH to be justified and hope that removing it from OpenSSH
    can accelerate its wider deprecation in supporting cryptography
    libraries.
@Rob-Hague Rob-Hague mentioned this pull request Dec 22, 2024
@Rob-Hague Rob-Hague changed the title CI debugging Run integration tests on alpine:latest Dec 22, 2024
Rob-Hague added a commit that referenced this pull request Jan 3, 2025
Rob-Hague added a commit that referenced this pull request Jan 3, 2025
…1567)

* Bump alpine from 3.20 to 3.21 in /test/Renci.SshNet.IntegrationTests

Bumps alpine from 3.20 to 3.21.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* merge #1553

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Hague <[email protected]>
@Rob-Hague Rob-Hague closed this Jan 3, 2025
@Rob-Hague Rob-Hague deleted the ci branch January 3, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants