Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit 29b36f2

Browse files
authored
added security features page (#516)
* added security features page * move self-host instructions * fix typo, add link * remove stray code block
1 parent 2c7af13 commit 29b36f2

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Details, Callout, DocImage } from "@doc";
2+
import { createMetadata } from "@doc";
3+
4+
export const metadata = createMetadata({
5+
title: "Security | thirdweb Engine",
6+
description:
7+
"thirdweb Engine provides you with security features to configure and restrict access.",
8+
});
9+
10+
# Security
11+
12+
Engine provides you with security features to configure and restrict access to sensitive operations.
13+
14+
## IP Allowlist
15+
16+
You can restrict access to your Engine instance by configuring an IP allowlist. This can be configured in the **Configuration** section of the [Engine dashboard](https://thirdweb.com/dashboard/engine/).
17+
If an IP allowlist is not configured, Engine will allow all incoming requests.
18+
19+
<Callout variant="info" title="Note">
20+
This does not affect calls from the Engine dashboard to your Engine instance.
21+
</Callout>
22+
23+
## Domain Allowlist (CORS)
24+
25+
You can restrict access to your Engine instance by configuring a domain allowlist. This can be configured in the **Configuration** section of the [Engine dashboard](https://thirdweb.com/dashboard/engine/).
26+
Multiple domains can be added to the allowlist, and Engine will only accept requests from these domains. A wildcard domain can also be added to allow requests from any domain.

src/app/engine/self-host/page.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ docker run \
6464
| `LOG_LEVEL` | Determines the logging severity level. Adjust for finer control over logged information. (Default: `debug`) |
6565
| `PRUNE_TRANSACTIONS` | When `false`, Engine prevents the pruning/deletion of processed transaction data. (Default: `true`) |
6666
| `ENABLE_KEYPAIR_AUTH` | Enables [Keypair Authentication](/engine/features/keypair-authentication). |
67+
| `TRUST_PROXY` | When `true`, trust the `X-Forwarded-For` header to allow Engine to use the correct client IP address for the IP allowlist. |
6768

6869
<span style={{ color: "red" }}>*</span> Required
6970

@@ -129,8 +130,6 @@ See [Production Checklist](/engine/production-checklist#cloud-hosting) for best
129130
- Minimum specs: 2 vCPU, 2 GB memory (AWS equivalent: t4g.small)
130131
- Set the `connection_limit` parameter within your `POSTGRES_CONNECTION_URL` environment variable to `10`.
131132

132-
### FAQ
133-
134133
#### How do I filter logs in Engine?
135134

136135
Configure log verbosity via the `LOG_LEVEL` environment variable.
@@ -168,3 +167,7 @@ Example configuration:
168167
```bash
169168
POSTGRES_CONNECTION_URL=postgres://postgres:postgres@localhost:5432/postgres?connection_limit=10
170169
```
170+
171+
#### What is `x-forwarded-for` and how does it affect Engine?
172+
173+
If you have engine running on a server behind a reverse proxy, you can set the `TRUST_PROXY` environment variable to `true` to trust the `X-Forwarded-For` header. Reverse proxies like Nginx or Apache will add this header to the request with the original client IP address, and setting this variable will allow Engine to use the correct IP address for the IP Allowlist. For more details on IP Allowlisting, refer to the [Security Features](/engine/features/security) page.

src/app/engine/sidebar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export const sidebar: SideBar = {
6868
name: "Contract Subscriptions",
6969
href: `${engineSlug}/features/contract-subscriptions`,
7070
},
71+
{
72+
name: "Security",
73+
href: `${engineSlug}/features/security`,
74+
},
7175
],
7276
},
7377
{

0 commit comments

Comments
 (0)