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

runtime: allow SW_HARDENING_NEEDED IAS quote status #4491

Merged
merged 1 commit into from
Feb 17, 2022
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
1 change: 1 addition & 0 deletions .changelog/4491.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow launching enclaves with `SW_HARDENING_NEEDED` quote status
6 changes: 3 additions & 3 deletions go/common/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,15 +478,15 @@ type SGXConstraints struct {
// AllowedQuoteStatuses are the allowed quote statuses for the node
// to be scheduled as a compute worker.
//
// Note: QuoteOK is ALWAYS allowed, and does not need to be specified.
// Note: QuoteOK and QuoteSwHardeningNeeded are ALWAYS allowed, and do not need to be specified.
AllowedQuoteStatuses []ias.ISVEnclaveQuoteStatus `json:"allowed_quote_statuses,omitempty"`
}

func (constraints *SGXConstraints) quoteStatusAllowed(avr *ias.AttestationVerificationReport) bool {
status := avr.ISVEnclaveQuoteStatus

// Always allow "OK".
if status == ias.QuoteOK {
// Always allow "OK" and "SW_HARDENING_NEEDED".
if status == ias.QuoteOK || status == ias.QuoteSwHardeningNeeded {
return true
}

Expand Down
7 changes: 2 additions & 5 deletions runtime/src/common/sgx/avr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,8 @@ pub fn verify(avr: &AVR) -> Result<AuthenticatedAVR> {

let quote_status = avr_body.isv_enclave_quote_status()?;
match quote_status.as_str() {
"OK" => {}
"GROUP_OUT_OF_DATE"
| "CONFIGURATION_NEEDED"
| "SW_HARDENING_NEEDED"
| "CONFIGURATION_AND_SW_HARDENING_NEEDED" => {
"OK" | "SW_HARDENING_NEEDED" => {}
"GROUP_OUT_OF_DATE" | "CONFIGURATION_NEEDED" | "CONFIGURATION_AND_SW_HARDENING_NEEDED" => {
if !unsafe_lax_avr_verification {
return Err(AVRError::QuoteStatusInvalid {
status: quote_status.to_owned(),
Expand Down