@@ -40,8 +40,9 @@ const (
4040)
4141
4242type DownloadRequest struct {
43- ActionID string
44- Signature string
43+ ActionID string
44+ Signature string
45+ BypassPrivateSignature bool // recovery/admin path only; caller must enforce auth externally
4546}
4647
4748type DownloadResponse struct {
@@ -91,8 +92,8 @@ func (task *CascadeRegistrationTask) Download(ctx context.Context, req *Download
9192 return err
9293 }
9394
94- // Step 4: Verify download signature for private cascades.
95- if ! metadata .Public {
95+ // Step 4: Verify download signature for private cascades unless explicitly bypassed by admin recovery .
96+ if ! metadata .Public && ! ( req != nil && req . BypassPrivateSignature ) {
9697 if req .Signature == "" {
9798 fields [logtrace .FieldError ] = "missing signature for private download"
9899 return task .wrapErr (ctx , "private cascade requires a download signature" , nil , fields )
@@ -102,6 +103,8 @@ func (task *CascadeRegistrationTask) Download(ctx context.Context, req *Download
102103 return task .wrapErr (ctx , "failed to verify download signature" , err , fields )
103104 }
104105 logtrace .Info (ctx , "download: signature verified" , fields )
106+ } else if ! metadata .Public {
107+ logtrace .Warn (ctx , "download: private cascade signature bypassed (recovery/admin)" , fields )
105108 } else {
106109 logtrace .Info (ctx , "download: public cascade (no signature)" , fields )
107110 }
0 commit comments