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

Add phase checking keylime_tenant --key and --payload options #200

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is secret message!
8 changes: 8 additions & 0 deletions functional/keylime_tenant-commands-on-localhost/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,21 @@ rlJournalStart
rlRun "limeWaitForAgentRegistration ${AGENT_ID}"
# create allowlist and excludelist
limeCreateTestPolicy
#encrypting of message
rlRun "keylime_userdata_encrypt payload/secret_message.txt"
rlPhaseEnd

rlPhaseStartTest "-c add"
rlRun "keylime_tenant -v 127.0.0.1 -t 127.0.0.1 -u $AGENT_ID --runtime-policy policy.json -f /etc/hostname -c add"
rlRun "limeWaitForAgentStatus $AGENT_ID 'Get Quote'"
rlPhaseEnd

rlPhaseStartTest "-c update"
#deliver payload with keys
rlRun "keylime_tenant -v 127.0.0.1 -t 127.0.0.1 -u $AGENT_ID --runtime-policy policy.json -p content_payload.txt -k content_keys.txt -c update"
rlRun "limeWaitForAgentStatus $AGENT_ID 'Get Quote'"
rlPhaseEnd

rlPhaseStartTest "-c cvlist"
rlRun -s "keylime_tenant -c cvlist"
rlAssertGrep "{'code': 200, 'status': 'Success', 'results': {'uuids':.*'$AGENT_ID'" $rlRun_LOG
Expand Down