diff --git a/src/app/engine/features/security/page.mdx b/src/app/engine/features/security/page.mdx new file mode 100644 index 00000000..275d25a6 --- /dev/null +++ b/src/app/engine/features/security/page.mdx @@ -0,0 +1,34 @@ +import { Details, Callout, DocImage } from "@doc"; +import { createMetadata } from "@doc"; + +export const metadata = createMetadata({ + title: "Security | thirdweb Engine", + description: + "thirdweb Engine provides you with security features to configure and restrict access.", +}); + +# Security + +Engine provides you with security features to configure and restrict access to sensitive operations. + +## IP Allowlist + +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/). +If an IP allowlist is not configured, Engine will allow all incoming requests. + + + This does not affect calls from the Engine dashboard to your Engine instance. + + +### Using IP Allowlist with a self-hosted Engine + +If you have engine running on a server behing 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 allowlist. + +```bash name=".env" +TRUST_PROXY=true +``` + +## Domain Allowlist (CORS) + +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/). +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. diff --git a/src/app/engine/sidebar.tsx b/src/app/engine/sidebar.tsx index 0e23b049..81c2b42c 100644 --- a/src/app/engine/sidebar.tsx +++ b/src/app/engine/sidebar.tsx @@ -68,6 +68,10 @@ export const sidebar: SideBar = { name: "Contract Subscriptions", href: `${engineSlug}/features/contract-subscriptions`, }, + { + name: "Security", + href: `${engineSlug}/features/security`, + }, ], }, {