Access control
Configure visibility and access permissions to control who can discover and join your lobbies.
Read time 1 minuteLast updated 14 hours ago
By default, Lobby accepts API calls from either an Authenticated Player or a Service Account. In some cases, you might want more control over how lobbies are created or joined. In those cases you can use Access Control.
Service Account controlled lobbies
In the following example, lobbies can only be created and players can only join via a Service Account. This allows you to control the lobby by restricting write access for Players. Creating project policies via CLI with the following JSON definition willDenyUpsert the policies with{ "statements": [ { "Sid": "DenyLobbyServiceWrite", "Resource": "urn:ugs:lobby:/v1/*", "Principal": "Player", "Action": ["Write"], "Effect": "Deny" }, { "Sid": "AllowLobbyServiceReconnect", "Resource": "urn:ugs:lobby:/v1/*/reconnect", "Principal": "Player", "Action": ["*"], "Effect": "Allow" }, { "Sid": "AllowLobbyServiceHeartbeat", "Resource": "urn:ugs:lobby:/v1/*/heartbeat", "Principal": "Player", "Action": ["*"], "Effect": "Allow" }, { "Sid": "AllowLobbyServiceTokens", "Resource": "urn:ugs:lobby:/v1/*/tokens", "Principal": "Player", "Action": ["*"], "Effect": "Allow" } ]}
ugs access upsert-project-policy -p <project-id> -e <env-name> <file-path>403 - Forbidden