Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

docs(operator): explain what the media proxy secret key does (#3816)

Hampus7b4f794573fc
diff --git a/fluxer_docs/src/content/docs/operator/environment.mdx b/fluxer_docs/src/content/docs/operator/environment.mdx
index 5870d000e..3adc67763 100644
--- a/fluxer_docs/src/content/docs/operator/environment.mdx
+++ b/fluxer_docs/src/content/docs/operator/environment.mdx
@@ -76,7 +76,7 @@ The shared secret for Erlang distribution in the gateway. Anyone who can connect
### `FLUXER_MEDIA_PROXY_SECRET_KEY`
-The key that signs media proxy URLs. The api, worker, media-proxy, gifs and unfurl services must have the same value. Keep it secret.
+The key that signs the `/external/` URLs for third-party media, such as link preview images and GIF results. The API also uses it to call the media proxy's internal endpoints. It doesn't sign uploaded attachments, which use `FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64`. The api, worker, media-proxy, gifs and unfurl services must have the same value, so change it on all of them and restart them together. Changing it doesn't affect anything stored, but proxy URLs that were already handed out stop working, such as link preview images in clients that are already open, until they reload. Keep it secret.
### `FLUXER_ADMIN_SECRET_KEY_BASE`
diff --git a/fluxer_rexctl/internal/instance/envvars.go b/fluxer_rexctl/internal/instance/envvars.go
index bb42688d7..d71a81a99 100644
--- a/fluxer_rexctl/internal/instance/envvars.go
+++ b/fluxer_rexctl/internal/instance/envvars.go
@@ -51,7 +51,7 @@ var envVars = []envVar{
{"FLUXER_VAPID_PUBLIC_KEY", "secrets", "The public half of the VAPID key pair for browser push notifications, as unpadded base64url of the 65-byte uncompressed P-256 point. The value is 87 characters long."},
{"FLUXER_VAPID_PRIVATE_KEY", "secrets", "The private half of the VAPID key pair for browser push notifications, as unpadded base64url of the 32-byte P-256 private key. The value is 43 characters long. It must match FLUXER_VAPID_PUBLIC_KEY."},
{"FLUXER_GATEWAY_RPC_AUTH_TOKEN", "secrets", "The token the api, worker, gateway and push services use to authenticate internal calls to each other. Every service must have the same value."},
- {"FLUXER_MEDIA_PROXY_SECRET_KEY", "secrets", "The key that signs media proxy URLs. The api, worker, media-proxy, gifs and unfurl services must have the same value."},
+ {"FLUXER_MEDIA_PROXY_SECRET_KEY", "secrets", "The key that signs the `/external/` URLs for third-party media, such as link preview images and GIF results. The API also uses it to call the media proxy's internal endpoints. It doesn't sign uploaded attachments, which use FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64. The api, worker, media-proxy, gifs and unfurl services must have the same value, so change it on all of them and restart them together. Changing it doesn't affect anything stored, but proxy URLs that were already handed out stop working, such as link preview images in clients that are already open, until they reload."},
{"FLUXER_MEDIA_PROXY_UPLOAD_RELAY_SECRET_BASE64", "secrets", "The key that signs upload relay tokens, as standard base64 that decodes to at least 32 bytes. The api, worker and media-proxy services must have the same value."},
{"FLUXER_ADMIN_SECRET_KEY_BASE", "secrets", "The key the admin panel signs its sessions, CSRF tokens and OAuth state with. Changing it signs everyone out of the admin panel."},
{"FLUXER_ADMIN_OAUTH_CLIENT_SECRET", "secrets", "The OAuth2 client secret the admin panel uses to sign in through the API. The api and admin services must have the same value."},
diff --git a/fluxer_rexctl/internal/stack/files/.env.example b/fluxer_rexctl/internal/stack/files/.env.example
index 5557c29d1..9a20eb475 100644
--- a/fluxer_rexctl/internal/stack/files/.env.example
+++ b/fluxer_rexctl/internal/stack/files/.env.example
@@ -114,8 +114,15 @@ FLUXER_GATEWAY_RPC_AUTH_TOKEN=
# gateway. Keep the value secret and the port private.
FLUXER_ERLANG_COOKIE=
-# The key that signs media proxy URLs. The api, worker, media-proxy, gifs and
-# unfurl services must have the same value.
+# The key that signs the /external/ URLs for third-party media, such as link
+# preview images and GIF results. The API also uses it to call the media
+# proxy's internal endpoints. It doesn't sign uploaded attachments, which use
+# FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64. The api, worker,
+# media-proxy, gifs and unfurl services must have the same value, so change it
+# on all of them and restart them together. Changing it doesn't affect
+# anything stored, but proxy URLs that were already handed out stop working,
+# such as link preview images in clients that are already open, until they
+# reload.
FLUXER_MEDIA_PROXY_SECRET_KEY=
# The key the admin panel signs its sessions, CSRF tokens and OAuth state