Skip to content

Commit 34571aa

Browse files
fix(webauthn): drop large_blob_key from public Assertion model
Per review on #198: keep the per-credential largeBlobKey only on the CTAP-level Ctap2GetAssertionResponse. Surfacing it on the public Assertion struct gives callers a foot-gun to forward straight to the RP, which is exactly the disclosure this PR is meant to prevent. The follow-up authenticatorLargeBlobs PR (#206) can read the key directly off the CTAP response.
1 parent 7eb0025 commit 34571aa

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

libwebauthn/src/ops/webauthn/get_assertion.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ pub struct Assertion {
399399
pub user: Option<Ctap2PublicKeyCredentialUserEntity>,
400400
pub credentials_count: Option<u32>,
401401
pub user_selected: Option<bool>,
402-
pub large_blob_key: Option<Vec<u8>>,
403402
pub unsigned_extensions_output: Option<GetAssertionResponseUnsignedExtensions>,
404403
pub enterprise_attestation: Option<bool>,
405404
pub attestation_statement: Option<Ctap2AttestationStatement>,
@@ -768,7 +767,6 @@ mod tests {
768767
user: None,
769768
credentials_count: None,
770769
user_selected: None,
771-
large_blob_key: None,
772770
unsigned_extensions_output: None,
773771
enterprise_attestation: None,
774772
attestation_statement: None,

libwebauthn/src/proto/ctap2/model/get_assertion.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ impl Ctap2GetAssertionResponse {
493493
user: self.user,
494494
credentials_count: self.credentials_count,
495495
user_selected: self.user_selected,
496-
large_blob_key: self.large_blob_key.map(ByteBuf::into_vec),
497496
unsigned_extensions_output,
498497
enterprise_attestation: self.enterprise_attestation,
499498
attestation_statement: self.attestation_statement,
@@ -680,9 +679,5 @@ mod tests {
680679
.expect("largeBlob extension output present");
681680

682681
assert!(large_blob.blob.is_none());
683-
assert_eq!(
684-
assertion.large_blob_key.as_deref(),
685-
Some(&device_returned_key[..])
686-
);
687682
}
688683
}

0 commit comments

Comments
 (0)