Identify the caller behind an ICP routing canister

A vault reached through a router sees the router as its immediate caller. Passing a user's principal as a method argument does not authenticate the user at the vault.

Map the two authentication boundaries

Have the router read the authenticated caller, reject anonymous callers for private actions and bind the requested operation to that identity. At the vault, accept the forwarded identity only from an explicitly authorized router. Exercise the same endpoint with a direct call carrying somebody else's principal.

browser principal U → router R → vault V
caller seen by R = U
caller seen by V = R

Review the router's authority

An authorized router can speak for every user within the permission it was granted. Limit the operations it can invoke, and include the authenticated subject in audit records alongside the immediate caller. A compromised router can otherwise produce plausible-looking records for arbitrary users.

Sources