ในขั้นตอนการออกข้อมูลเข้าสู่ระบบดิจิทัลทั่วไปโดยใช้
ข้อกำหนด OpenID for Verifiable Credential Issuance (OpenID4VCI) ผู้ออก
จะต้องทราบว่าคีย์ภายในข้อมูลเข้าสู่ระบบที่จะลงนามนั้นจัดเก็บไว้
ในตำแหน่งที่ปลอดภัย ประเภทหลักฐาน android_keystore_attestation ซึ่งเป็นรูปแบบสำหรับ
ใช้กับ OpenID4VCI จะให้รายงานที่ลงนามโดยฮาร์ดแวร์จาก
Android Keystore เพื่อให้มั่นใจว่าคีย์จะถูกล็อกไว้ในสภาพแวดล้อมการดำเนินการที่เชื่อถือได้ (TEE) หรือ StrongBox และไม่สามารถส่งออกหรือโคลนได้
ภาพรวมเอกสารรับรองฮาร์ดแวร์
เมื่อสร้างคีย์ใน Android Keystore ระบบจะสร้างใบรับรองเอกสารรับรองได้ ใบรับรองนี้ลงนามโดยคีย์ที่ฮาร์ดแวร์ของอุปกรณ์ปกป้องไว้ ซึ่งเชื่อมโยงกลับไปยังรูทของความน่าเชื่อถือที่ Google เป็นผู้ถือ
หลักฐาน android_keystore_attestation คืออาร์เรย์ของเชนใบรับรอง X.509 แต่ละเชนแสดงถึงคีย์การตรวจสอบสิทธิ์เดียวและมีโครงสร้างเป็นใบรับรอง Leaf ตามด้วยใบรับรองกลาง
- ใบรับรอง Leaf: มีคีย์และส่วนขยายเอกสารรับรองเฉพาะของ Android
- ใบรับรองกลาง: เชื่อมต่อ Leaf กับรูทของ Android
ขั้นตอนการยืนยัน
ผู้ออกควรทำการตรวจสอบความถูกต้องหลายรายการในเอกสารรับรอง
- ค้นหาใบรับรองในเชนที่มีส่วนขยายเอกสารรับรองของ Android (โดยปกติจะเป็นใบรับรอง Leaf) ใบรับรองนี้มีข้อมูลเอกสารรับรองสำหรับคีย์ที่สร้างโดย Android Keystore
- ตรวจสอบว่าฟิลด์
attestationChallengeในส่วนขยายตรงกับc_nonceที่โปรโตคอลระบุไว้เพื่อป้องกันการโจมตีแบบ Replay
- ตรวจสอบค่าของการยืนยันทั้งหมดในส่วนขยายที่คุณสนใจ
- ทำการตรวจสอบการเพิกถอนกับใบรับรอง Android Keystore
ค่าในหลักฐานเอกสารรับรองมาจากแหล่งที่มาหลายแห่ง ดังนี้
- ผู้ออก: ผู้ออกจะระบุค่าต่างๆ และค่าที่พบบ่อยที่สุดจะอยู่ในรูปแบบข้อมูลเมตาของผู้ออกเพื่อให้กรองได้ในระหว่างการนำเสนอ
- ผู้ถือ: ค่าต่างๆ เช่น ชื่อแพ็กเกจและลายเซ็นมาจากผู้ถือ ค่าเหล่านี้จะไม่แชร์ผ่านขั้นตอนการออกมาตรฐานและต้องขอจากผู้ถือแยกต่างหาก
- โปรโตคอล: ค่าต่างๆ เช่น Nonce ที่มี
attestationChallengeมาจากโปรโตคอล
ดูวิธีการที่สมบูรณ์เพิ่มเติมเกี่ยวกับการตรวจสอบข้อมูลเอกสารรับรองได้ที่แหล่งข้อมูลต่อไปนี้
- ยืนยันคู่คีย์แบบใช้ฮาร์ดแวร์ด้วยเอกสารรับรองคีย์
- รูปแบบส่วนขยายเอกสารรับรองคีย์และรหัส
- ไลบรารีเอกสารรับรองคีย์
รูปแบบหลักฐานเอกสารรับรอง
ในคำขอข้อมูลเข้าสู่ระบบ หลักฐาน android_keystore_attestation จะรวมอยู่ในตัวอย่างต่อไปนี้
{
"type": "array",
"description": "An array of certificate chains. Each chain attests a single key.",
"items": {
"type": "array",
"description": "An X.509 certificate chain. Each certificate is a Base64-encoded string. The first element in the chain is the leaf certificate with the extension, the last is the Android Keystore root certificate.",
"items": {
"type": "string",
"description": "A single X.509 certificate (Base64-NoWrap padded DER encoded)."
},
"minItems": 1
},
"minItems": 1
}
จากนั้นจะจัดเก็บไว้ในออบเจ็กต์ proofs ของคำขอข้อมูลเข้าสู่ระบบ
{
"credential_configuration_id": "org.iso.18013.5.1.mDL",
"proofs": {
"android_keystore_attestation": [
[
"MII...", // Leaf certificate (contains Keystore extension)
"MII...", // Intermediate certificate
"MII..." // Android Root certificate
],
[ "MII...", "MII...", "MII..." ] // second proof
]
}
}
รูปแบบข้อมูลเมตาของผู้ออก
ผู้ออกจะระบุประเภทหลักฐานที่รองรับโดยรวมออบเจ็กต์ android_keystore_attestation ไว้ในออบเจ็กต์ proof_types_supported สำหรับการกำหนดค่าข้อมูลเข้าสู่ระบบที่ระบุ
ต่อไปนี้คือตัวอย่างออบเจ็กต์ android_keystore_attestation สำหรับผู้ออก
{
"type": "object",
"properties": {
"proof_signing_alg_values_supported": {
"type": "array",
"description": "REQUIRED. As defined in OpenID4VCI 1.0 Section 12.2.4.",
"items": {
"type": "string",
"description": "Cryptographic algorithm identifiers used in the proof_signing_alg_values_supported Credential Issuer metadata parameter for this proof type are case sensitive strings and SHOULD be one of those defined in [IANA.JOSE]."
},
"minItems": 1
},
"key_attestations_required": {
"type": "object",
"description": "OPTIONAL. Specifies the minimum attestation requirements.",
"properties": {
"key_mint_security_level": {
"type": "string",
"description": "OPTIONAL. Minimum accepted keyMintSecurityLevel. Values defined in https://source.android.com/docs/security/features/keystore/attestation#securitylevel-values.",
"enum": ["Software", "TrustedEnvironment", "StrongBox"],
"default": "TrustedEnvironment"
},
"user_auth_types": {
"type": "array",
"description": "OPTIONAL. A list of authentication types which can authorize the use of the key. If empty, no authentication is required. If multiple, any are allowed.",
"items": {
"type": "string",
"description": "Allowed values are 'LSKF' and 'BIOMETRIC'. These values are meant to mimic the values used during the key generation process here.",
"enum": ["LSKF", "BIOMETRIC"]
},
"default": []
}
}
}
},
"required": ["proof_signing_alg_values_supported"]
}
ต่อไปนี้คือตัวอย่างออบเจ็กต์ proof_types_supported ด้านนอก
{
"credential_configurations_supported": {
"org.iso.18013.5.1.mDL": {
"format": "mso_mdoc",
"doctype": "org.iso.18013.5.1.mDL",
"cryptographic_binding_methods_supported": [
"cose_key"
],
"credential_signing_alg_values_supported": [
-7, -9
],
"proof_types_supported": {
"android_keystore_attestation": {
"proof_signing_alg_values_supported": [
"ES256" // ecdsaWithSHA256
],
"key_attestations_required" : {
// OPTIONAL String - Representing the minimum accepted value for keyMintSecurityLevel values
// defined here ("Software"|"TrustedEnvironment"|"StrongBox"). Default value: "TrustedEnvironment"
"key_mint_security_level": "TrustedEnvironment",
// OPTIONAL List of Strings - Representing all allowed values for userAuthType values defined here.
// [] value will represent noAuthRequired. Default value: [].
"user_auth_types": ["LSKF", "BIOMETRIC"]
}
}
}
}
}
}
การแมปการอ้างสิทธิ์เอกสารรับรอง VCI กับ Android Keystore
ตารางนี้แสดงการแมปข้อมูลเพื่อช่วยให้เอนทิตีที่คุ้นเคยกับประเภทหลักฐานเอกสารรับรอง OpenID4VCI มาตรฐานเข้าใจว่าแนวคิดที่คล้ายกันอยู่ในเอกสารรับรอง Android Keystore ที่ใด
การอ้างสิทธิ์เอกสารรับรอง VCI |
ตำแหน่ง |
ตำแหน่งค่าที่คาดไว้ |
iss |
คีย์สาธารณะของใบรับรองรูท Keystore |
ไม่มี |
iat |
ค่า |
ไม่มี |
exp |
ฟิลด์ |
ไม่มี |
attested_keys |
คีย์สาธารณะที่มีอยู่ในใบรับรอง Leaf ของแต่ละเชน |
ไม่มี |
key_storage |
ค่า |
ผู้ออกเลือก: ฟิลด์ |
user_authentication |
ค่า |
ผู้ออกเลือก: ฟิลด์ |
nonce |
ค่า |
จากโปรโตคอล: ค่า |
certification |
ไม่มี |
ไม่มี |
status |
ไม่มี |
N/A |