Skip to content

Commit 82dee98

Browse files
authored
docs: clarify 1-of-N auditor signature semantics (#1404)
Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
1 parent a91d24b commit 82dee98

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

token/core/common/validator_auditing.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@ var (
2020
)
2121

2222
// AuditingSignaturesValidate validates the auditor signatures in the token request.
23+
//
24+
// Auditor Signature Model:
25+
//
26+
// The current implementation follows a 1-of-N auditor signature policy:
27+
//
28+
// - If auditors are configured in the public parameters, at least one
29+
// valid auditor signature must be present in the token request.
30+
// - Multiple auditor public keys may be configured (e.g., during key rotation).
31+
// - The validator verifies that each provided auditor signature corresponds
32+
// to a configured auditor and that the signature is valid.
33+
// - The validator does NOT enforce N-of-N semantics.
34+
// - The validator does NOT enforce per-entity auditor checks.
35+
// - All configured auditor public keys are treated as belonging to a
36+
// single logical auditor entity.
37+
//
38+
// This behavior matches the semantics implemented by current token drivers.
2339
func AuditingSignaturesValidate[P driver.PublicParameters, T driver.Input, TA driver.TransferAction, IA driver.IssueAction, DS driver.Deserializer](c context.Context, ctx *Context[P, T, TA, IA, DS]) error {
2440
if len(ctx.PP.Auditors()) == 0 {
2541
// enforce no auditor signatures are attached
@@ -35,6 +51,11 @@ func AuditingSignaturesValidate[P driver.PublicParameters, T driver.Input, TA dr
3551
}
3652

3753
auditors := ctx.PP.Auditors()
54+
55+
// Each provided auditor signature is independently verified.
56+
// The presence of at least one valid signature is sufficient
57+
// to satisfy the auditing requirement (1-of-N policy).
58+
3859
for _, auditorSignature := range ctx.TokenRequest.AuditorSignatures {
3960
auditor := auditorSignature.Identity
4061
// check that issuer of this issue action is authorized

0 commit comments

Comments
 (0)