Security overview¶
Every API of API Maker is locked until you open it, and two gates decide who reaches what : groups decide which APIs, a pre hook decides which rows. The security report reads your settings and your code, and says where the second gate is missing.
Locked by default¶
| Part | How it is locked |
|---|---|
| Database and custom APIs | A call needs the token of an API user whose groups grant that API. Only the APIs you mark IS_PUBLIC in their settings skip it. |
| System APIs | Closed over HTTP : your code calls them, an HTTP call answers 401 until a system API setting opens it. The token API is the exception. |
| Fields | A group grants read and write per field : a field it does not grant is absent from the answer. |
| Secrets | Keys and connection strings live in the secret, encrypted on the server and never in Git. Each account gets keys of its own. |
A new account starts open for its first steps : an API user default with the password 12345, and a group Default which grants everything. Replace both before real data arrives : see Before you go live.
Two gates¶
- The API gate : who may call which API. The application sends the token of its API user (
x-am-authorization) ; its groups grant APIs, tables and fields. A person sends a token of their own (x-am-user-authorization), made by an auth provider ; their groups must grant the API too. - The row gate : which rows that person reaches. Groups can not know that order 1042 belongs to Ada : that is a fact of the data. A pre hook adds the owner to every filter and stamps it on every write. The security report installs it in one click.
Handle role based permissions builds both gates step by step, and tries to break them.
What is checked where¶
| Question | Answered by | Page |
|---|---|---|
| Is the caller an application we know ? | The token of an API user | API users |
| Which person is it ? | The token of an auth provider | Auth providers |
| May they call this API, read this field ? | Groups | Groups |
| Is this row theirs ? | A pre hook | Pre hooks |
| Is this data valid ? | The schema of the table | Schema |
| Where is a leak ? | The security report | Security report |
| From which web sites ? | Allowed origins | Security features |
The sandboxes : what they protect, and what they do not¶
The code of an account (custom APIs, hooks, schedulers, events) runs in Docker containers of that account, apart from the process of API Maker, with a time limit. They keep API Maker running when code fails : an exception ends its request with an error, and code which runs too long is cut short while a new runner takes the next requests.
They are not a wall against hostile code :
- The containers run privileged. Code which wants to can reach the server around them, and from there the secrets of every account of the server.
- They have no memory limit. A leak takes memory of the whole server.
- The native process is not isolated at all. Code with
runOnNativeProcess: trueruns on the machine of the server, beside API Maker.
So run on one server only code you trust : your team's, or an AI's that your team reviewed. For clients who must not see each other's data, use separate servers, not separate accounts of one server.
What API Maker sends to us¶
API Maker has no analytics. A server checks its licence key with the licence server of API Maker (sava.be.apimaker.dev), and sends nothing else :
| What it sends | The licence key, the MAC addresses of the machine and its number of CPU cores. |
| When | A minute or two after it starts, every day at about 12:00 (time of India), every four hours while a check gets no answer, and when a key is written. |
| What it never sends | Data of your databases, your APIs, logs, code or users. |
| What a failed check does | Nothing to your APIs : the licence page of the admin panel shows the problem. A licence server which does not answer changes nothing. |
| The key of API Maker Launchpad | Never sent : the licence page shows LOCAL. |
Before you go live¶
The checklist : default passwords, the default group, the row gate, public APIs, HTTPS, backups.
Report a vulnerability¶
Write to [email protected] with the steps to reproduce it. Please give us time to fix it before you publish.