Skip to content

Commit c6b5f11

Browse files
committed
fix: update schemas
1 parent 0f2b6fd commit c6b5f11

2 files changed

Lines changed: 26 additions & 12 deletions

File tree

schemas/attestation-v1.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
]
4949
},
5050
"device_public_key": {
51-
"description": "Ed25519 public key of the device (32 bytes, hex-encoded in JSON).",
51+
"description": "Device public key (32 bytes Ed25519 or 33 bytes P-256 compressed, hex-encoded in JSON).",
5252
"allOf": [
5353
{
54-
"$ref": "#/definitions/Ed25519PublicKey"
54+
"$ref": "#/definitions/DevicePublicKey"
5555
}
5656
]
5757
},
@@ -165,10 +165,17 @@
165165
"description": "A validated capability identifier.\n\nCapabilities are the atomic unit of authorization in Auths. They follow a namespace convention:\n\n- Well-known capabilities: `sign_commit`, `sign_release`, `manage_members`, `rotate_keys` - Custom capabilities: any valid string (alphanumeric + `:` + `-` + `_`, max 64 chars)\n\nThe `auths:` prefix is reserved for future well-known capabilities and cannot be used in custom capabilities created via `parse()`.\n\n# Examples\n\n``` use auths_verifier::Capability;\n\n// Well-known capabilities let cap = Capability::sign_commit(); assert_eq!(cap.as_str(), \"sign_commit\");\n\n// Custom capabilities let custom = Capability::parse(\"acme:deploy\").unwrap(); assert_eq!(custom.as_str(), \"acme:deploy\");\n\n// Reserved namespace is rejected assert!(Capability::parse(\"auths:custom\").is_err()); ```",
166166
"type": "string"
167167
},
168-
"Ed25519PublicKey": {
169-
"description": "Ed25519 public key (32 bytes, hex-encoded)",
170-
"type": "string",
171-
"format": "hex"
168+
"DevicePublicKey": {
169+
"description": "A device public key carrying its curve type explicitly.\n\nCurve is stored alongside the raw key bytes so dispatch never relies on key length — adding a new curve that shares a byte length (e.g. secp256k1, also 33 bytes compressed) won't break existing match arms.\n\nAccepted byte lengths per curve: - Ed25519: 32 - P-256: 33 (compressed SEC1) or 65 (uncompressed SEC1)",
170+
"type": "object",
171+
"required": [
172+
"bytes"
173+
],
174+
"properties": {
175+
"bytes": {
176+
"type": "string"
177+
}
178+
}
172179
},
173180
"Ed25519Signature": {
174181
"description": "Ed25519 signature (64 bytes, hex-encoded)",

schemas/identity-bundle-v1.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@
9595
]
9696
},
9797
"device_public_key": {
98-
"description": "Ed25519 public key of the device (32 bytes, hex-encoded in JSON).",
98+
"description": "Device public key (32 bytes Ed25519 or 33 bytes P-256 compressed, hex-encoded in JSON).",
9999
"allOf": [
100100
{
101-
"$ref": "#/definitions/Ed25519PublicKey"
101+
"$ref": "#/definitions/DevicePublicKey"
102102
}
103103
]
104104
},
@@ -212,10 +212,17 @@
212212
"description": "A validated capability identifier.\n\nCapabilities are the atomic unit of authorization in Auths. They follow a namespace convention:\n\n- Well-known capabilities: `sign_commit`, `sign_release`, `manage_members`, `rotate_keys` - Custom capabilities: any valid string (alphanumeric + `:` + `-` + `_`, max 64 chars)\n\nThe `auths:` prefix is reserved for future well-known capabilities and cannot be used in custom capabilities created via `parse()`.\n\n# Examples\n\n``` use auths_verifier::Capability;\n\n// Well-known capabilities let cap = Capability::sign_commit(); assert_eq!(cap.as_str(), \"sign_commit\");\n\n// Custom capabilities let custom = Capability::parse(\"acme:deploy\").unwrap(); assert_eq!(custom.as_str(), \"acme:deploy\");\n\n// Reserved namespace is rejected assert!(Capability::parse(\"auths:custom\").is_err()); ```",
213213
"type": "string"
214214
},
215-
"Ed25519PublicKey": {
216-
"description": "Ed25519 public key (32 bytes, hex-encoded)",
217-
"type": "string",
218-
"format": "hex"
215+
"DevicePublicKey": {
216+
"description": "A device public key carrying its curve type explicitly.\n\nCurve is stored alongside the raw key bytes so dispatch never relies on key length — adding a new curve that shares a byte length (e.g. secp256k1, also 33 bytes compressed) won't break existing match arms.\n\nAccepted byte lengths per curve: - Ed25519: 32 - P-256: 33 (compressed SEC1) or 65 (uncompressed SEC1)",
217+
"type": "object",
218+
"required": [
219+
"bytes"
220+
],
221+
"properties": {
222+
"bytes": {
223+
"type": "string"
224+
}
225+
}
219226
},
220227
"Ed25519Signature": {
221228
"description": "Ed25519 signature (64 bytes, hex-encoded)",

0 commit comments

Comments
 (0)