ReplicationManager::ENetRpcAuthority
RPC authority DEFAULT-DENY. A client→server RPC reaches the receiver only when its (methodId, methodIndex) pair has been EXPLICITLY allow-listed and the sending peer meets the declared authority. Without this, a peer could name any networkId and any method and the dispatcher would invoke the reflected MFUNCTION on it — the wire's methodId was previously the componentId alone, so a grant opened EVERY method on the component. Server→client RPCs are not policed: the server is the trust root, so a client accepts what the server sends it.
- Module
- Networking
- Header
#include "Networking/Replication/ReplicationManager.h"- Namespace
Mowo
The policy is PER-METHOD and stated at the call site, not inferred: AllowClientRpc(kNetShooterComponentId, kFireIndex, ENetRpcAuthority::OwnerOnly); Session events carry methodIndex 0, so an event id is allow-listed as AllowClientRpc(eventId, 0, authority).
Values
| Name | Value | Description |
|---|---|---|
Denied | 0 | Never accepted from a client. Registering this is the same as not registering at all — spelled out so a call site can retract an allowance without deleting the line. |
OwnerOnly | Only the peer whose id equals the target NetworkObject's ownerPeerId. The correct default for anything that acts on a pawn. | |
AnyClient | Any connected, registered peer, regardless of who owns the target. Reserve for genuinely global verbs (chat, vote, ready-up) and validate the payload in the receiver — this is the weak setting. |