From 9770f55db97ef16714aa4532b8e60f4a48c30e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 9 Apr 2024 16:22:41 +0000 Subject: [PATCH] fix: tests: don't test FIDO2 on unsupported distros --- doc/sphinx/development/setup.rst | 1 + docker/Dockerfile.debian11 | 2 +- docker/Dockerfile.debian12 | 2 +- docker/Dockerfile.opensuse15 | 4 +- docker/Dockerfile.rockylinux8 | 2 +- docker/Dockerfile.rockylinux9 | 2 +- docker/Dockerfile.ubuntu2004 | 2 +- docker/Dockerfile.ubuntu2204 | 2 +- tests/functional/launch_tests_on_instance.sh | 3 +- tests/functional/tests.d/330-selfkeys.sh | 121 ++++++++++--------- 10 files changed, 74 insertions(+), 67 deletions(-) diff --git a/doc/sphinx/development/setup.rst b/doc/sphinx/development/setup.rst index 72cc4c10b..e00926564 100644 --- a/doc/sphinx/development/setup.rst +++ b/doc/sphinx/development/setup.rst @@ -160,6 +160,7 @@ to get up-to-date information): --has-mfa-password=[0|1] PAM is usable to check passwords (default: 0) --has-pamtester=[0|1] The `pamtester` binary is available, and PAM is usable (default: 1) --has-piv=[0|1] The `yubico-piv-tool` binary is available (default: 1) + --has-sk=[0|1] The openssh-server supports Secure Keys (FIDO2) (default: 0) Without Docker -------------- diff --git a/docker/Dockerfile.debian11 b/docker/Dockerfile.debian11 index b3bb80ea5..9067718c4 100644 --- a/docker/Dockerfile.debian11 +++ b/docker/Dockerfile.debian11 @@ -32,4 +32,4 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 +# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 --has-sk=1 diff --git a/docker/Dockerfile.debian12 b/docker/Dockerfile.debian12 index 10e88640b..0969b6d2b 100644 --- a/docker/Dockerfile.debian12 +++ b/docker/Dockerfile.debian12 @@ -32,4 +32,4 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 +# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 --has-sk=1 diff --git a/docker/Dockerfile.opensuse15 b/docker/Dockerfile.opensuse15 index ee4cec94c..7eec47047 100644 --- a/docker/Dockerfile.opensuse15 +++ b/docker/Dockerfile.opensuse15 @@ -30,5 +30,5 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=0 --has-pamtester=0 --has-piv=0 -# TESTFROM opensuse/leap:15.2 opensuse/leap:15.3 +# TESTOPT --has-mfa=0 --has-pamtester=0 --has-piv=0 --has-sk=1 +# TESTFROM opensuse/leap:15.4 opensuse/leap:15.5 diff --git a/docker/Dockerfile.rockylinux8 b/docker/Dockerfile.rockylinux8 index 4d4a473b3..888d7c734 100644 --- a/docker/Dockerfile.rockylinux8 +++ b/docker/Dockerfile.rockylinux8 @@ -29,4 +29,4 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 +# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 --has-sk=1 diff --git a/docker/Dockerfile.rockylinux9 b/docker/Dockerfile.rockylinux9 index 7b8d5dad3..e4e118548 100644 --- a/docker/Dockerfile.rockylinux9 +++ b/docker/Dockerfile.rockylinux9 @@ -29,4 +29,4 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 +# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 --has-sk=1 diff --git a/docker/Dockerfile.ubuntu2004 b/docker/Dockerfile.ubuntu2004 index 87faf7ace..589efdcdb 100644 --- a/docker/Dockerfile.ubuntu2004 +++ b/docker/Dockerfile.ubuntu2004 @@ -32,4 +32,4 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 +# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 --has-sk=1 diff --git a/docker/Dockerfile.ubuntu2204 b/docker/Dockerfile.ubuntu2204 index ecce83762..b17ca7c79 100644 --- a/docker/Dockerfile.ubuntu2204 +++ b/docker/Dockerfile.ubuntu2204 @@ -32,4 +32,4 @@ RUN ["/opt/bastion/bin/admin/install","--new-install"] # start at entrypoint ENTRYPOINT /opt/bastion/docker/entrypoint.sh -# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 +# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1 --has-sk=1 diff --git a/tests/functional/launch_tests_on_instance.sh b/tests/functional/launch_tests_on_instance.sh index 0bbc35467..a11ed17d0 100755 --- a/tests/functional/launch_tests_on_instance.sh +++ b/tests/functional/launch_tests_on_instance.sh @@ -17,7 +17,7 @@ opt_slowness_factor=1 opt_log_prefix= opt_module= opt_post_run= -declare -A capabilities=( [ed25519]=1 [mfa]=1 [mfa-password]=0 [pamtester]=1 [piv]=1 ) +declare -A capabilities=( [ed25519]=1 [mfa]=1 [mfa-password]=0 [pamtester]=1 [piv]=1 [sk]=0 ) # set the helptext now to get the proper default values help_text=$(cat <