-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
42 lines (35 loc) · 1.81 KB
/
Copy path.env.example
File metadata and controls
42 lines (35 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
NODE_ENV=development
PORT=3000
MONGO_URI=mongodb://localhost:27017/content-signing
# Public base URL of this directory. Used to decide whether a keyid of the
# form https://host/api/keys/{id} names a key held here or somewhere else.
DIRECTORY_BASE_URL=http://localhost:3000
# --- Secrets --------------------------------------------------------------
# Pepper for author API key hashing. REQUIRED when NODE_ENV=production; the
# server refuses to start without it. Changing it invalidates every issued
# author API key. Generate with: openssl rand -hex 32
AUTHOR_API_KEY_PEPPER=change_me_to_32_random_bytes
# Supplementary demo/admin shared secrets. Draft §9.8 requires POST endpoints
# to authenticate with an RFC 9421 HTTP Message Signature; these static keys
# are refused when NODE_ENV=production unless HTMLTRUST_ALLOW_API_KEY_AUTH=1.
GENERAL_API_KEY=change_me_general_key
ADMIN_API_KEY=change_me_admin_key
# HTMLTRUST_ALLOW_API_KEY_AUTH=0
# --- Key resolution -------------------------------------------------------
# Resolving DID and https keyids means dereferencing URLs chosen by whoever
# submits a record, which is a server-side request forgery primitive. Off by
# default: only keys held by this directory resolve. Turn it on only if the
# directory can safely make outbound requests.
# HTMLTRUST_REMOTE_KEY_RESOLUTION=1
# --- Rate limiting --------------------------------------------------------
# Requests per minute per client address.
# RATE_LIMIT_GLOBAL=600
# RATE_LIMIT_AUTH=30
# RATE_LIMIT_WRITE=60
# DISABLE_RATE_LIMIT=1
# Number of reverse proxies in front of this server. Leave unset when the
# server is directly exposed: trusting X-Forwarded-For from an untrusted
# client lets it forge a fresh identity per request and bypass rate limits.
# TRUST_PROXY=1
# Maximum accepted request body size.
# MAX_REQUEST_BODY=256kb