Verify signature ownership in esign accept/record-event flows
Any self-provisioned trust center visitor could accept another visitor's NDA signature or inject audit-trail events into it by supplying its GID, since AcceptSignature and RecordEvent trusted the client-supplied signature ID without checking it belonged to the caller (GHSA-22xj-f767-ppw6). SignerEmail/ActorEmail are always derived from the verified session identity, never client input, so comparing them against the signature's stored SignerEmail in pkg/esign/service.go closes the hole at its root without touching the resolver-level authorization already in place elsewhere. Adds an e2e regression test that self-provisions two trust center visitors through the real magic-link flow and confirms one cannot touch the other's signature. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
83e7b3bdd4
commit
f20c3d73d2
31
e2e/trust/main_test.go
Normal file
31
e2e/trust/main_test.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2026 Probo Inc <hello@probo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
package trust_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"go.probo.inc/probo/e2e/internal/testutil"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testutil.Setup()
|
||||
|
||||
code := m.Run()
|
||||
|
||||
testutil.Teardown()
|
||||
os.Exit(code)
|
||||
}
|
||||
Reference in New Issue
Block a user