-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scheme: freshness check for PSA_IOT and CCA_SSD_PLATFORM
Update PSA_IOT and CCA_SSD_PLATFORM schemes to perform a freshness check as part of token integrity validation. Freshness check is integral to attestation validation to prevent replay attacks. Thus far, we have not performed it as part of our verification pipeline, and instead left it the RP. However, PSA and CCA both mandate freshness claims, and so there is no reason why this check cannot be performed as part of the scheme evidence handling, therefore reducing the risk of the RP neglecting to consider freshness and taking an affirming attestation result from Veraison at face value. Signed-off-by: Sergei Trofimov <[email protected]>
- Loading branch information
Showing
17 changed files
with
245 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"ear.appraisal-policy-id": "policy:CCA_SSD_PLATFORM", | ||
"ear.status": "contraindicated", | ||
"ear.trustworthiness-vector": { | ||
"configuration": 99, | ||
"executables": 99, | ||
"file-system": 99, | ||
"hardware": 99, | ||
"instance-identity": 99, | ||
"runtime-opaque": 99, | ||
"sourced-data": 99, | ||
"storage-opaque": 99 | ||
}, | ||
"ear.veraison.policy-claims": { | ||
"problem": "integrity validation failed" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"ear.appraisal-policy-id": "policy:PSA_IOT", | ||
"ear.status": "contraindicated", | ||
"ear.trustworthiness-vector": { | ||
"configuration": 99, | ||
"executables": 99, | ||
"file-system": 99, | ||
"hardware": 99, | ||
"instance-identity": 99, | ||
"runtime-opaque": 99, | ||
"sourced-data": 99, | ||
"storage-opaque": 99 | ||
}, | ||
"ear.veraison.policy-claims": { | ||
"problem": "integrity validation failed" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
integration-tests/tests/test_freshness_check_fail.tavern.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
test_name: freshness-check-fail | ||
|
||
marks: | ||
- parametrize: | ||
key: | ||
# Attestation scheme -- this is used to indicate how test cases should | ||
# be constructed (e.g. how the evidence token will be compiled. | ||
- scheme | ||
# Some attestation schemes (currently, only PSA) may support multiple | ||
# profiles. If a scheme does not support multiple profiles, specify it | ||
# as '_'. | ||
- profile | ||
# Which evidence description will be used to construct the evidence token. | ||
- evidence | ||
# The name of the endorsements spec within common.yaml | ||
- endorsements | ||
# Signing keys that will be used to construct the evidence. How this is | ||
# used is dependent on the scheme. | ||
- signing | ||
# Expected structure of the returned EAR (EAT (Entity Attestation | ||
# Token) Attestation Result). | ||
- expected | ||
# Indicates which nonce configurations ought to be used. | ||
- nonce | ||
vals: | ||
- [psa, p1, good, full, ec.p256, freshness-fail, nonce32] | ||
- [cca, _, good, full, ccakeys, freshness-fail, nonce64] | ||
|
||
includes: | ||
- !include common.yaml | ||
|
||
stages: | ||
- name: submit post request to the provisioning service successfully | ||
request: | ||
method: POST | ||
url: http://{provisioning-service}/endorsement-provisioning/v1/submit | ||
headers: | ||
content-type: '{endorsements-content-type}' # set via hook | ||
authorization: '{authorization}' # set via hook | ||
file_body: __generated__/endorsements/corim-{scheme}-{endorsements}.cbor | ||
response: | ||
status_code: 200 | ||
|
||
- name: verify as relying party - creation of session resource | ||
request: | ||
method: POST | ||
url: http://{verification-service}/challenge-response/v1/newSession?nonce={nonce-bad-value} | ||
response: | ||
status_code: 201 | ||
save: | ||
headers: | ||
relying-party-session: Location | ||
|
||
- name: verify as relying party - submitting the evidence | ||
request: | ||
method: POST | ||
url: http://{verification-service}/challenge-response/v1/{relying-party-session} | ||
headers: | ||
content-type: '{evidence-content-type}' # set via hook | ||
file_body: __generated__/evidence/{scheme}.{evidence}.cbor | ||
response: | ||
status_code: 200 | ||
verify_response_with: | ||
- function: checkers:save_result | ||
extra_kwargs: | ||
scheme: '{scheme}' | ||
evidence: '{evidence}' | ||
- function: checkers:compare_to_expected_result | ||
extra_kwargs: | ||
expected: data/results/{scheme}.{expected}.json | ||
verifier_key: data/keys/verifier.jwk | ||
|
||
- name: verify as relying party - deleting the session object | ||
request: | ||
method: DELETE | ||
url: http://{verification-service}/challenge-response/v1/{relying-party-session} | ||
response: | ||
status_code: 204 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.