Skip to content

Commit

Permalink
Add phase checking keylime_tenant --key and --payload options
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncpa authored Feb 16, 2023
1 parent 84b653a commit 1d08bbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit 1d08bbb

Please sign in to comment.