Skip to content

Commit 80b99ca

Browse files
sid200727adecaro
authored andcommitted
docs: clarify 1-of-N auditor signature semantics
Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
1 parent c6b3bfa commit 80b99ca

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

token/core/common/validator_auditing.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ 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.
39+
2340
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 {
2441
if len(ctx.PP.Auditors()) == 0 {
2542
// enforce no auditor signatures are attached
@@ -35,6 +52,11 @@ func AuditingSignaturesValidate[P driver.PublicParameters, T driver.Input, TA dr
3552
}
3653

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

0 commit comments

Comments
 (0)