Every call your app makes to the Salla Merchant API carries your app's access token. If that token leaks, anyone who holds it can call the API as your app. App Trusted IPs lets you decide where those calls may come from: specific IP addresses, IP ranges, or whole networks (ASNs) limited to the countries you choose.This article explains what each option means, how to update your app's security settings in the Partners Portal, and how to protect apps on serverless or cloud platforms, where IP addresses change all the time.
What's new
App Trusted IPs now accepts networks (ASNs) and allowed countries, besides IP addresses. The earlier article, Secure your Apps with the Trusted IP Address now!, covers IP addresses only. If your list holds only IP addresses, nothing changes for you.
ASN stands for Autonomous System Number. It is the number that identifies a network on the internet. Every internet provider, cloud company and hosting company has one or more.Every public IP address belongs to a network, almost always to exactly one. Think of a city: an IP address names a single house, and an ASN names the whole street. An IP list allows single houses. A network entry allows the whole street.Serverless and cloud platforms move your app between machines. Each machine can have a different IP address, so your app's address changes. The network usually stays the same, because the provider owns those addresses.
The card shows a network as a chip with its number and the provider's name, for example AS24940 Hetzner (Figure S.1). Well-known cloud and hosting networks also carry a "Shared network" tag: other customers of the same provider use that network too. Quick add groups your recent calls by network in the same way (Figure S.5).
Follow these steps to add or remove entries. The same steps work for IP addresses, ranges, networks and countries.
1
Open App Trusted IPs
In the Partners Portal, open My Apps and choose your app. Scroll to the App Trusted IPs card (Figure S.1).
2
Add entries
Type an IP address, a range or a network, then press Enter, type a comma, or select the plus button. You can paste several entries at once. Write a network as AS16509 or 16509. Each new entry shows "Not saved" (Figure S.2). If the card cannot accept an entry, it shows the reason instead, for example "Private or reserved address."
3
Choose allowed countries
If you added a network, search for a country by name or code under Allowed countries, then select it (Figure S.3). A network cannot be saved without a country.
4
Remove entries
Select the × button on an entry. It shows "Will be removed" until you save, and Undo brings it back. "Discard" drops every unsaved change.
5
Review before saving
Select "Review and save". Check the Adding and Removing lists and any shared-network warning. "Check impact" shows which recent calls the new list would block (Figure S.4). On some versions of the Portal there is no review panel: the "Save changes" button saves directly.
6
Save
Select "Save changes". On an empty list the button reads "Save and enforce": from then on, calls from any other source are rejected. Changes apply within about a minute.
7
Test with a real call
Call the Merchant API from your server with your app's token and confirm it succeeds.
Figure S.1 - The App Trusted IPs card with one network and one allowed country
Figure S.2 - A network typed into the card, waiting to be saved
Figure S.3 - Searching the country list by name
Figure S.4 - Review before saving: what is added, what is removed, and the shared-network warning
Removing every entry turns the restriction off. These limits apply to every list:
Rule
Detail
Entries
Up to 10 IP addresses, ranges and networks together. The card shows your limit.
Countries
Up to 10. Required with a network. Not used for IP entries.
IP addresses
Public only. Private, reserved and documentation addresses are refused.
IP ranges
IPv4 only, from /16 to /32. For IPv6, add single addresses.
Networks
Public ASNs only. Private and reserved ASNs are refused.
Best Practices
Use the narrowest entry that works: a single IP before a range, a range before a network.
Test with a real call after every change.
Common Mistakes
Saving your laptop's address, then calling from your server. Add the address your server uses.
Adding a private address such as 10.0.0.1. Salla sees your public address only.
Serverless and cloud platforms do not give your app a fixed outbound address, so an IP list cannot keep up. A network entry allows every address of your provider's network. The allowed countries narrow it to where your app calls from.
Without any entry, a leaked token works from anywhere. With a network and a country, it works only from your provider's network in the countries you chose. That is a real reduction, but it is wider than an IP list.
Shared networks: the trade-off
A cloud network is shared by every customer of that provider. Anyone hosted there, in one of your allowed countries, could call your API with a stolen token. The card tags well-known cloud networks as "Shared network" and warns you before you save. Keep your tokens secret, choose few countries, and add specific IPs whenever you can.
Deploy your app and make at least one Merchant API call with its token, so Salla has seen where your app calls from.
2
Open Quick add
On the App Trusted IPs card, select "Quick add". It lists the last 48 addresses that called the API with your app's tokens, newest first, grouped by network, with the country of each. A green badge such as "Network allowed" marks calls your saved list accepts. A red badge such as "1 of 1 blocked" marks calls it rejects.
3
Allow the network
Select "Allow network" on your provider's row, then "Add selected". The card adds the network and the country of those calls. If the address is fixed, allow only the IP instead.
4
Check the countries
The country is where the calling address is located, as Salla sees it. It can differ from where you think your servers run. Keep only the countries your app calls from.
5
Review, save and test
Read the shared-network warning, save, then make a call and confirm it succeeds.
Figure S.5 - Quick add: the saved network is allowed, a second cloud network is blocked
Best Practices
Pair every network with the fewest countries that cover your regions.
Check Quick add after you add a region or change providers. Networks marked as blocked show what your list rejects.
Common Mistakes
Adding only one of your provider's networks. Calls from its other networks are blocked.
Choosing your company's country instead of the country of your provider's region.