Join us Nov 24 to watch Insights Agent turn slow queries into PRs. RSVP
Navigation

Restrict service tokens to specific IP addresses

Service tokens will now let you limit which IP addresses can use them. A token with IP restrictions only accepts API requests from those IPv4 addresses or ranges. Requests from any other address are rejected. Leave the list empty to allow any address.

You'll find IP restrictions on the New service token dialog and on the token page. A token can have up to 10 addresses or ranges. IPv6 addresses and 0.0.0.0/0 are not allowed, and a bare address is stored as a /32.

From the CLI:

pscale service-token create --name ci --cidrs 10.0.0.0/8,192.168.1.1
pscale service-token update <TOKEN_ID> --cidrs ""

--cidrs is repeatable or comma-separated. --cidrs "" clears the list. Through the API, set cidrs when you create or update a service token.

Read more about service tokens