Skip to content

Commit

Permalink
Add ssh keygen directly to the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncpa authored and kkaarreell committed Aug 30, 2023
1 parent 238edaf commit 8e18d14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions functional/basic-attestation-on-containers/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ rlJournalStart
#create network for containers
rlRun "limeconCreateNetwork ${CONT_NETWORK_NAME} 172.18.0.0/16"

#preparation for ssh access
rlRun "rlFileBackup --clean ~/.ssh/"
rlRun 'ls /root/.ssh/id_*.pub &>/dev/null || ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa'
rlRun "cp /root/.ssh/id_*.pub ."

#build verifier container
TAG_ATTESTATION_SERVER="keylime_server_image"
rlRun "limeconPrepareImage ${limeLibraryDir}/${DOCKERFILE_SYSTEMD} ${TAG_ATTESTATION_SERVER}"
Expand Down Expand Up @@ -90,6 +95,7 @@ EOF"
limeSubmitCommonLogs
limeClearData
limeRestoreConfig
rlRun "rlFileRestore"
rlPhaseEnd

rlJournalEnd
Expand Down
6 changes: 6 additions & 0 deletions functional/basic-attestation-with-custom-certificates/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ rlJournalStart
# assign cert ownership to keylime user if it exists
id keylime && rlRun "chown -R keylime:keylime $CERTDIR"

rlRun "rlFileBackup --clean ~/.ssh/"
#preparation for ssh access
rlRun 'ls /root/.ssh/id_*.pub &>/dev/null || ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa'
rlRun "cp /root/.ssh/id_*.pub ."

#build verifier container
TAG_ATTESTATION_SERVER="keylime_server_image"
rlRun "limeconPrepareImage ${limeLibraryDir}/${DOCKERFILE_SYSTEMD} ${TAG_ATTESTATION_SERVER}"
Expand Down Expand Up @@ -146,6 +151,7 @@ EOF"
limeSubmitCommonLogs
limeClearData
limeRestoreConfig
rlRun "rlFileRestore"
rlPhaseEnd

rlJournalEnd
Expand Down
7 changes: 6 additions & 1 deletion functional/basic-attestation-with-postgresql-db/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ rlJournalStart
#create network for containers
rlRun "limeconCreateNetwork ${CONT_NETWORK_NAME} 172.18.0.0/16"

rlRun "rlFileBackup --clean ~/.ssh/"
#preparation for ssh access
rlRun 'ls /root/.ssh/id_*.pub &>/dev/null || ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa'
rlRun "cp /root/.ssh/id_*.pub ."

#build verifier container
TAG_ATTESTATION_SERVER="keylime_server_image"
rlRun "limeconPrepareImage ${limeLibraryDir}/${DOCKERFILE_SYSTEMD} ${TAG_ATTESTATION_SERVER}"
Expand Down Expand Up @@ -112,7 +117,7 @@ EOF"
limeClearData
limeRestoreConfig
rlServiceStop postgresql
rlFileRestore
rlRun "rlFileRestore"
rlServiceRestore postgresql
rlPhaseEnd

Expand Down

0 comments on commit 8e18d14

Please sign in to comment.