A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
feat(rexctl): add media.signed_attachments setting (#3847)
Hampuscf51ea996d87
diff --git a/fluxer_docs/src/content/docs/operator/environment.mdx b/fluxer_docs/src/content/docs/operator/environment.mdxindex ab2ab8aa7..62086c519 100644--- a/fluxer_docs/src/content/docs/operator/environment.mdx+++ b/fluxer_docs/src/content/docs/operator/environment.mdx@@ -920,7 +920,7 @@ The web origins, separated by commas, that may load media through CORS when `FLU### `FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE`-Whether attachment downloads need a signed URL. Use `off`, `report` or `enforce`. When it's empty, it's off. With `report`, the media proxy logs downloads it would refuse, and with `enforce` it refuses them. Both need `FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64`. With rexctl, use `rexctl config set FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE`.+Whether attachment downloads need a signed link. Use `off`, `report` or `enforce`. When it's empty, it's off. With `report`, the media proxy logs downloads it would refuse, and with `enforce` it refuses them. Both need `FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64`, and rexctl makes a key the first time you turn it on if that's empty. With rexctl, use `rexctl config set media.signed_attachments`.### `FLUXER_MEDIA_PROXY_READ_ONLY`diff --git a/fluxer_docs/src/content/docs/operator/running.mdx b/fluxer_docs/src/content/docs/operator/running.mdxindex e337e5288..10b5e50cb 100644--- a/fluxer_docs/src/content/docs/operator/running.mdx+++ b/fluxer_docs/src/content/docs/operator/running.mdx@@ -181,6 +181,22 @@ On a machine with little memory, `rexctl config set FLUXER_API_EMBEDDED_WORKER tWhen the disk that holds Fluxer's images and data is smaller than 16 GB, the install sets `disk.profile` to `small`. That's the disk with Docker's data root on Linux. With Docker Desktop or an engine on another machine, rexctl measures the disk with the instance folder. The small profile sets `FLUXER_LOG_MAX_SIZE` to `5m`, `FLUXER_LOG_MAX_FILE` to `2`, `FLUXER_POSTGRES_MAX_WAL_SIZE` to `512MB` and `FLUXER_MEDIA_PROXY_UPLOAD_RELAY_SPOOL_MAX_TOTAL_BYTES` to 512 MiB, or to `FLUXER_MEDIA_PROXY_UPLOAD_RELAY_MAX_BODY_BYTES` if you set that higher. It leaves the values you set yourself as they are. To use the usual sizes, run `rexctl config unset disk.profile`.+### Signed attachment links++`media.signed_attachments` decides whether attachment downloads need a signed link. It's `off` unless you turn it on.++```sh+rexctl config set media.signed_attachments report+```++The first time you turn it on, rexctl makes a signing key, saves it with its other generated secrets and restarts the api, worker and media-proxy services. If `FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64` already has a key, rexctl keeps it and restarts only the media proxy. With `report`, Fluxer signs every attachment link it hands out, and the media proxy serves every download and logs the ones `enforce` would refuse. Wait a day so open apps pick up signed links, then refuse unsigned downloads.++```sh+rexctl config set media.signed_attachments enforce+```++Fluxer's apps get new links by themselves. A signed link stops working about a day after Fluxer hands it out, so links that bots save or that people copy out of Fluxer stop working too. Data packages made before you turned it on have unsigned links, and those stop working under `enforce`. To turn it off, set it to `off`. rexctl keeps the key, so links signed with it keep working when you turn it on again. To rotate the key, read the current one with `rexctl config get FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64 --reveal` and follow the steps for [`FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64`](/operator/environment/#fluxer_media_proxy_attachment_url_secrets_base64).+## Change how Fluxer runsrexctl writes Fluxer's Compose files and Caddyfile to `.rexctl/generated` in your instance folder and writes them again each time it changes the instance. If you edit one of them, rexctl keeps a copy of your version in `.rexctl/edited` and puts its own version back.diff --git a/fluxer_rexctl/cmd/config.go b/fluxer_rexctl/cmd/config.goindex 5cb412e09..d374d27d8 100644--- a/fluxer_rexctl/cmd/config.go+++ b/fluxer_rexctl/cmd/config.go@@ -148,6 +148,11 @@ func (v *configView) fallback(k settings.Key, inst *instance.Instance) string {return settings.EdgeBundledcase settings.IPv6:return "false"+ case settings.SignedMedia:+ if mode := inst.Setting(settings.SignatureModeVar); mode != "" {+ return mode+ }+ return "off"}if len(k.Vars) == 0 {return ""diff --git a/fluxer_rexctl/internal/checks/attachment_signatures.go b/fluxer_rexctl/internal/checks/attachment_signatures.gonew file mode 100644index 000000000..3022db01f--- /dev/null+++ b/fluxer_rexctl/internal/checks/attachment_signatures.go@@ -0,0 +1,41 @@+// SPDX-License-Identifier: AGPL-3.0-or-later++package checks++import (+ "context"++ "github.com/fluxerapp/fluxer/fluxer_rexctl/internal/secrets"+ "github.com/fluxerapp/fluxer/fluxer_rexctl/internal/settings"+)++func init() {+ Register(Check{ID: "attachment-signatures", Phases: Installed, Run: runAttachmentSignatures, Fix: fixAttachmentSignatures})+}++func runAttachmentSignatures(ctx context.Context, e *Env) Result {+ st := e.state()+ if st == nil || !settings.SignsAttachments(e.value(settings.SignatureModeVar)) {+ return skip("")+ }+ if e.value(settings.SignatureSecretsVar) != "" {+ return pass("Attachment links are signed.")+ }+ msg := "Signed attachments are on and Fluxer has no key to sign them with. The media proxy won't start until it has one."+ if _, chosen := st.Settings[settings.SignatureSecretsVar]; chosen {+ return fail(msg, "Run rexctl config unset "+settings.SignatureSecretsVar+" and rexctl makes a key.")+ }+ return fixable(fail(msg, "Run rexctl doctor --fix to make a key."))+}++func fixAttachmentSignatures(ctx context.Context, e *Env) error {+ if e.state() == nil {+ return errNoProject+ }+ key, err := secrets.Base64(32)+ if err != nil {+ return err+ }+ e.stageSecret(settings.SignatureSecretsVar, key)+ return nil+}diff --git a/fluxer_rexctl/internal/checks/checks.go b/fluxer_rexctl/internal/checks/checks.goindex 4f00d75d3..32fc46c79 100644--- a/fluxer_rexctl/internal/checks/checks.go+++ b/fluxer_rexctl/internal/checks/checks.go@@ -101,6 +101,7 @@ var order = []string{"boot-unit","origin","vapid",+ "attachment-signatures","services","stale-containers","health",diff --git a/fluxer_rexctl/internal/deploy/set.go b/fluxer_rexctl/internal/deploy/set.goindex 2417d317c..18a8b0210 100644--- a/fluxer_rexctl/internal/deploy/set.go+++ b/fluxer_rexctl/internal/deploy/set.go@@ -15,6 +15,7 @@ import ("github.com/fluxerapp/fluxer/fluxer_rexctl/internal/engine""github.com/fluxerapp/fluxer/fluxer_rexctl/internal/instance"+ "github.com/fluxerapp/fluxer/fluxer_rexctl/internal/secrets""github.com/fluxerapp/fluxer/fluxer_rexctl/internal/settings""github.com/fluxerapp/fluxer/fluxer_rexctl/internal/stack""github.com/fluxerapp/fluxer/fluxer_rexctl/internal/ui"@@ -43,6 +44,8 @@ func Promised(set *stack.Set, custom []byte, k settings.Key) []string {return settings.Services(set, custom, append(stack.ProfileKeys(set), stack.SizingKeys()...))case settings.DiskProfile:return settings.Services(set, custom, stack.DiskSizingKeys())+ case settings.SignedMedia:+ return settings.Services(set, custom, []string{settings.SignatureModeVar, settings.SignatureSecretsVar})}return settings.Services(set, custom, append(slices.Clone(k.Vars), derivedVars[k.Name]...))}@@ -146,7 +149,13 @@ func Set(ctx context.Context, inst *instance.Instance, e *engine.Engine, changes}slices.Sort(promised)preview := Preview{Keys: changed, Promised: slices.Compact(promised)}- newEnv, err := Environment(rs, st, next)+ nextSecrets, err := signingSecrets(rs, st, next)+ if err != nil {+ return nil, err+ }+ withSecrets := *st+ withSecrets.Secrets = nextSecrets+ newEnv, err := Environment(rs, &withSecrets, next)if err != nil {return nil, err}@@ -158,7 +167,7 @@ func Set(ctx context.Context, inst *instance.Instance, e *engine.Engine, changesif o.Confirm != nil && !o.Confirm(preview) {return nil, ErrDeclined}- st.Settings = next+ st.Settings, st.Secrets = next, nextSecretsif err := save(inst); err != nil {return nil, err}@@ -232,7 +241,7 @@ func Set(ctx context.Context, inst *instance.Instance, e *engine.Engine, changesreturn nil, err}}- st.Settings = next+ st.Settings, st.Secrets = next, nextSecretsif _, err := render(inst, rs, next); err != nil {return nil, err}@@ -275,7 +284,7 @@ func Set(ctx context.Context, inst *instance.Instance, e *engine.Engine, changesrerr := revert(ctx, inst, rs, oldP, ipv6, o.OnEvent)return &Change{Keys: changed, Reverted: rerr == nil, VoiceDown: attachVoice(ctx, e, detached)}, errors.Join(err, rerr)}- st.Settings = next+ st.Settings, st.Secrets = next, nextSecretsst.Pending = nilif err := save(inst); err != nil {return nil, err@@ -283,6 +292,28 @@ func Set(ctx context.Context, inst *instance.Instance, e *engine.Engine, changesreturn &Change{Keys: changed, Restarted: preview.Restarts, Removed: preview.Removes, Applied: true, VoiceDown: attachVoice(ctx, e, detached)}, nil}+func signingSecrets(rs *stack.Set, st *instance.State, next map[string]string) (map[string]string, error) {+ env, err := Environment(rs, st, next)+ if err != nil {+ return nil, err+ }+ if !settings.SignsAttachments(env[settings.SignatureModeVar]) || strings.TrimSpace(env[settings.SignatureSecretsVar]) != "" {+ return st.Secrets, nil+ }+ if _, chosen := next[settings.SignatureSecretsVar]; chosen {+ return nil, ui.Refused(+ fmt.Sprintf("%s needs a signing key, and %s is empty.", settings.SignedMedia, settings.SignatureSecretsVar),+ fmt.Sprintf("Run rexctl config unset %s and rexctl makes a key.", settings.SignatureSecretsVar))+ }+ key, err := secrets.Base64(32)+ if err != nil {+ return nil, err+ }+ out := maps.Clone(st.Secrets)+ out[settings.SignatureSecretsVar] = key+ return out, nil+}+func checkPorts(ctx context.Context, e *engine.Engine, project string, oldEnv, newEnv map[string]string, changed []string, mode string) error {added, _ := portDiff(oldEnv, newEnv)if err := checkPortsFree(ctx, e, project, added); err != nil {diff --git a/fluxer_rexctl/internal/deploy/set_test.go b/fluxer_rexctl/internal/deploy/set_test.gonew file mode 100644index 000000000..5623c8f4c--- /dev/null+++ b/fluxer_rexctl/internal/deploy/set_test.go@@ -0,0 +1,56 @@+// SPDX-License-Identifier: AGPL-3.0-or-later++package deploy++import (+ "encoding/base64"+ "maps"+ "testing"++ "github.com/fluxerapp/fluxer/fluxer_rexctl/internal/instance"+ "github.com/fluxerapp/fluxer/fluxer_rexctl/internal/settings"+ "github.com/fluxerapp/fluxer/fluxer_rexctl/internal/stack"+)++func TestSigningSecretsKeepsExistingKeys(t *testing.T) {+ const own = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8="+ rs := stack.Embedded()+ enforce := map[string]string{settings.Domain: "chat.example.com", settings.SignedMedia: "enforce"}+ with := func(extra map[string]string) map[string]string {+ out := maps.Clone(enforce)+ maps.Copy(out, extra)+ return out+ }++ st := &instance.State{Secrets: map[string]string{}}+ got, err := signingSecrets(rs, st, with(nil))+ if err != nil {+ t.Fatal(err)+ }+ key, err := base64.StdEncoding.DecodeString(got[settings.SignatureSecretsVar])+ if err != nil || len(key) != 32 {+ t.Fatalf("generated key is %d bytes, err %v", len(key), err)+ }+ if len(st.Secrets) != 0 {+ t.Fatal("signingSecrets changed the saved secrets")+ }++ st = &instance.State{Secrets: map[string]string{settings.SignatureSecretsVar: own}}+ if got, err := signingSecrets(rs, st, with(nil)); err != nil || got[settings.SignatureSecretsVar] != own {+ t.Fatalf("generated key replaced: got %q, err %v", got[settings.SignatureSecretsVar], err)+ }++ st = &instance.State{Secrets: map[string]string{}}+ if got, err := signingSecrets(rs, st, with(map[string]string{settings.SignatureSecretsVar: own})); err != nil || got[settings.SignatureSecretsVar] != "" {+ t.Fatalf("operator key shadowed by a generated one: got %q, err %v", got[settings.SignatureSecretsVar], err)+ }++ if _, err := signingSecrets(rs, st, with(map[string]string{settings.SignatureSecretsVar: ""})); err == nil {+ t.Fatal("an empty operator key with enforce was accepted")+ }++ off := with(map[string]string{settings.SignedMedia: "off"})+ if got, err := signingSecrets(rs, st, off); err != nil || got[settings.SignatureSecretsVar] != "" {+ t.Fatalf("off made a key: got %q, err %v", got[settings.SignatureSecretsVar], err)+ }+}diff --git a/fluxer_rexctl/internal/instance/envvars.go b/fluxer_rexctl/internal/instance/envvars.goindex 1b370ad11..42c5d5da5 100644--- a/fluxer_rexctl/internal/instance/envvars.go+++ b/fluxer_rexctl/internal/instance/envvars.go@@ -247,7 +247,7 @@ var envVars = []envVar{{"FLUXER_MEDIA_PROXY_UPLOAD_RELAY_KEEP_DIRECT_COUNTRIES", "media", "Two-letter country codes, separated by commas, whose clients upload to the object store directly and skip the relay. It needs the GeoIP database in FLUXER_GEOIP_DB_PATH, and browsers can only upload directly when FLUXER_S3_PUBLIC_ENDPOINT is set. When it's empty or there's no GeoIP database, every client uses the relay and browsers never see the internal store address."},{"FLUXER_MEDIA_PROXY_CORS_MODE", "media", "Whether the media proxy checks the Origin of media requests. Use `off`, `report` or `enforce`. When it's empty, it's off. With `report`, the media proxy logs requests it would refuse, and with `enforce` it refuses them. A request with no Origin header is always served."},{"FLUXER_MEDIA_PROXY_CORS_ALLOWED_ORIGINS", "media", "The web origins, separated by commas, that may load media through CORS when FLUXER_MEDIA_PROXY_CORS_MODE is `report` or `enforce`. When it's empty, the media proxy uses the public origin. The desktop app is always allowed."},- {"FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE", "media", "Whether attachment downloads need a signed URL. Use `off`, `report` or `enforce`. When it's empty, it's off. With `report`, the media proxy logs downloads it would refuse, and with `enforce` it refuses them. Both need FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64."},+ {"FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE", "media", "Use `off`, `report` or `enforce`. When it's empty, it's off. With `report`, the media proxy logs downloads it would refuse, and with `enforce` it refuses them. Both need FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64, and rexctl makes a key the first time you turn it on if that's empty."},{"FLUXER_MEDIA_PROXY_READ_ONLY", "media", "Whether the media proxy refuses to write to storage. Use `true` or `false`. When it's empty, it writes as usual."},{"FLUXER_MEDIA_PROXY_NSFW_THRESHOLD", "media", "The NSFW classifier score, from 0.0 to 1.0, that the media proxy uses as its cutoff. When it's empty, it uses `0.85`."},{"FLUXER_NSFW_SERVICE_ENDPOINT", "media", "The URL of an outside NSFW classifier the media proxy calls. No such service ships with the stack. When it's empty, the media proxy calls none."},diff --git a/fluxer_rexctl/internal/instance/shipped.json b/fluxer_rexctl/internal/instance/shipped.jsonindex c2a26b36c..59fb8c479 100644--- a/fluxer_rexctl/internal/instance/shipped.json+++ b/fluxer_rexctl/internal/instance/shipped.json@@ -42,6 +42,7 @@"571f2af0a08de9a0d674e12e2afb77e572c2f0d7ec5fec8b7a69e7425a45a430","5893d91877c7d96188c071dfd6e76976c10a2ed759c16520c5685068b9edf5d2","58b4077b8d302e31f65e46e0e811a551634afded9d4642166b722a1289c22168",+ "5b2ef05f85f084df26c325a9921fb3ed639869ebad80861a2dbdbbd5a43c5263","5beb16eced4c5420c08c2972f13d80b6976e6d3aa5301f11d4cdf3b6fc74e078","6188588df12b426670119483c24d0b2a3182e28c7c1d6bed241d50323dcd9439","640c15a83489e8697f52ed73b1c891cea65e8c1aae9791dc24ae763d2114939c",@@ -109,7 +110,8 @@"f022666ee8ed968329315c408ac3700e5f4f7e3a79eebfd7ce5fa951af3251f9","f175f1c9e5baab1acbdafccc34c87b0643b701fe256b7ccc58f5b9c88c3c84f2","f3bca683c2978edce9a6545be5694bc6fa522432ba8c4a1e7d4c3b8cdf7563d9",- "f56b10bf965a1f37c70dc49c6689b607c48b789badcc1d66a56709b4f2211f6f"+ "f56b10bf965a1f37c70dc49c6689b607c48b789badcc1d66a56709b4f2211f6f",+ "ff2ff25a393387118f692496d6c9eba4c7dd2ed758d0114f71cf058c3dc4e3a4"],"Caddyfile": ["14d8d6482859d8a03883cb4c9b38abfbbcf258328ea9089255ab5df2538efa40",@@ -156,6 +158,7 @@"2686e66bbe88d92303572996c8bd2b1b5af670cd3fea93ee366c996c14ba3717","28b7ee919831b85313d5dea3f80ef6faa61d79ad64f86c7f1405eb988fd48543","2bfd3cf8a9b5b93bbc39ecc2fd4dd092717a1e117b69079c991879ceb0350c85",+ "2c4dc0d23278f2324e9e9cb4a505696a41aa5e3391a41148348420914618b91c","31b9b45647d761683726ce30ad00cabf3012db46c028732c0549b127f9d4f78f","32a618dc9a68df669fd15b16a9ca7cf9538b68fc4d165508fa4f522aacea51bd","34123f24cbea73207e82e41b664889a0290ad2bf7e9bb81175849e37b5a6e9c3",diff --git a/fluxer_rexctl/internal/settings/keys.go b/fluxer_rexctl/internal/settings/keys.goindex 3d4954097..a8cc5fe17 100644--- a/fluxer_rexctl/internal/settings/keys.go+++ b/fluxer_rexctl/internal/settings/keys.go@@ -58,6 +58,7 @@ const (NoProxy = "network.no_proxy"IPv6 = "network.ipv6"SSOPrivate = "sso.allow_private_addresses"+ SignedMedia = "media.signed_attachments"ImagesRegistry = "images.registry"MemoryProfile = "memory.profile"DiskProfile = "disk.profile"@@ -90,6 +91,16 @@ var ImageVars = map[string]string{"edge": "FLUXER_CADDY_IMAGE",}+const (+ SignatureModeVar = "FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE"+ SignatureSecretsVar = "FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64"+)++func SignsAttachments(mode string) bool {+ m := strings.ToLower(strings.TrimSpace(mode))+ return m == "report" || m == "enforce"+}+const storageConfirm = "Files people already uploaded stay where they are. rexctl doesn't move them."var named = buildNamed()@@ -142,6 +153,9 @@ func buildNamed() []Key {Help: "Whether Fluxer's network uses IPv6"},{Name: SSOPrivate, Type: "bool", Vars: []string{"FLUXER_SSO_ALLOW_PRIVATE_ADDRESSES"}, Validate: validBool,Help: "Whether single sign-on can use a provider on a private or local network address"},+ {Name: SignedMedia, Type: "choice", Vars: []string{SignatureModeVar}, Options: []string{"off", "report", "enforce"}, Validate: oneOf("off", "report", "enforce"),+ Confirm: "With enforce, attachment links without a valid signature stop working. That includes links copied out of Fluxer more than a day ago, links a bot saved and data packages made before signing was on. Fluxer's apps get new links by themselves.",+ Help: "Whether attachment downloads need a signed link"},{Name: ImagesRegistry, Type: "registry", Validate: validRegistry,Help: "A registry mirror for the database, cache, queue, search, storage, voice and edge images"},{Name: MemoryProfile, Type: "choice", Options: []string{"small", "medium", "large"}, Validate: oneOf("small", "medium", "large"),@@ -236,8 +250,11 @@ func Lookup(set *stack.Set, custom []string, name string, adminSchema []adminapireturn Key{}, unknown(name)}validate := validText- if name == TurnServersVar {+ switch name {+ case TurnServersVar:validate = validTurnServers+ case SignatureSecretsVar:+ validate = validSignatureSecrets}return Key{Name: name, Kind: Raw, Type: "text", Vars: []string{name}, Secret: SecretName(name),Stateful: generatedStateful(name), Validate: validate}, nildiff --git a/fluxer_rexctl/internal/settings/validate.go b/fluxer_rexctl/internal/settings/validate.goindex 442ddc303..47ce3239e 100644--- a/fluxer_rexctl/internal/settings/validate.go+++ b/fluxer_rexctl/internal/settings/validate.go@@ -3,6 +3,7 @@package settingsimport (+ "encoding/base64""errors""fmt""net"@@ -36,6 +37,20 @@ func trustedProxyList(v string) []string {return strings.FieldsFunc(v, func(r rune) bool { return r == ',' || r == ' ' || r == '\t' })}+func validSignatureSecrets(v string) error {+ for _, entry := range strings.Split(v, ",") {+ entry = strings.TrimSpace(entry)+ if entry == "" {+ continue+ }+ key, err := base64.StdEncoding.DecodeString(entry)+ if err != nil || base64.StdEncoding.EncodeToString(key) != entry || len(key) < 32 {+ return errors.New("Give each key as standard base64 that decodes to at least 32 bytes, and separate the keys with commas.")+ }+ }+ return nil+}+func validTrustedProxies(v string) error {for _, entry := range trustedProxyList(v) {if entry == "private_ranges" || net.ParseIP(entry) != nil {diff --git a/fluxer_rexctl/internal/stack/files/.env.example b/fluxer_rexctl/internal/stack/files/.env.exampleindex 5e17660dc..27f96799f 100644--- a/fluxer_rexctl/internal/stack/files/.env.example+++ b/fluxer_rexctl/internal/stack/files/.env.example@@ -1326,11 +1326,13 @@ FLUXER_VAPID_PRIVATE_KEY=# rexctl: rexctl config set FLUXER_MEDIA_PROXY_CORS_ALLOWED_ORIGINS# FLUXER_MEDIA_PROXY_CORS_ALLOWED_ORIGINS=-# Whether attachment downloads need a signed URL. Use off, report or enforce.+# Whether attachment downloads need a signed link. Use off, report or enforce.# When it's empty, it's off. With report, the media proxy logs downloads it# would refuse, and with enforce it refuses them. Both need-# FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64.-# rexctl: rexctl config set FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE+# FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64, and rexctl makes a key the+# first time you turn it on if that's empty.+# options: off, report, enforce+# rexctl: rexctl config set media.signed_attachments# FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE=# Whether the media proxy refuses to write to storage. Use true or false. Whendiff --git a/fluxer_rexctl/internal/stack/files/docker-compose.yml b/fluxer_rexctl/internal/stack/files/docker-compose.ymlindex 09731d2a9..4fb82504a 100644--- a/fluxer_rexctl/internal/stack/files/docker-compose.yml+++ b/fluxer_rexctl/internal/stack/files/docker-compose.yml@@ -216,7 +216,6 @@ x-fluxer-env: &fluxer-envFLUXER_GATEWAY_RPC_AUTH_TOKEN: ${FLUXER_GATEWAY_RPC_AUTH_TOKEN:-}FLUXER_MEDIA_PROXY_SECRET_KEY: ${FLUXER_MEDIA_PROXY_SECRET_KEY:-}FLUXER_MEDIA_PROXY_UPLOAD_RELAY_SECRET_BASE64: ${FLUXER_MEDIA_PROXY_UPLOAD_RELAY_SECRET_BASE64:-}- FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64: ${FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64:-}FLUXER_ADMIN_SECRET_KEY_BASE: ${FLUXER_ADMIN_SECRET_KEY_BASE:-}FLUXER_ADMIN_OAUTH_CLIENT_SECRET: ${FLUXER_ADMIN_OAUTH_CLIENT_SECRET:-}FLUXER_ADMIN_SSO_ISSUER: ${FLUXER_ADMIN_SSO_ISSUER:-}@@ -542,6 +541,7 @@ services:FLUXER_POSTGRES_MAX_CONNECTIONS: "${FLUXER_API_POSTGRES_MAX_CONNECTIONS:-25}"FLUXER_API_PRESIGNED_ATTACHMENT_UPLOADS_ENABLED: "${FLUXER_API_PRESIGNED_ATTACHMENT_UPLOADS_ENABLED:-true}"FLUXER_API_EMBEDDED_WORKER: "${FLUXER_API_EMBEDDED_WORKER:-false}"+ FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64: ${FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64:-}volumes:- ./ca:/etc/fluxer/ca:rohealthcheck:@@ -577,6 +577,7 @@ services:FLUXER_API_WORKER_ENABLE_CRON_SCHEDULER: "true"FLUXER_POSTGRES_MAX_CONNECTIONS: "${FLUXER_WORKER_POSTGRES_MAX_CONNECTIONS:-25}"FLUXER_WORKER_POSTGRES_SYNCHRONOUS_COMMIT: "${FLUXER_WORKER_POSTGRES_SYNCHRONOUS_COMMIT:-}"+ FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64: ${FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64:-}volumes:- ./ca:/etc/fluxer/ca:rohealthcheck:@@ -656,6 +657,7 @@ services:FLUXER_MEDIA_PROXY_CORS_MODE: ${FLUXER_MEDIA_PROXY_CORS_MODE:-}FLUXER_MEDIA_PROXY_CORS_ALLOWED_ORIGINS: ${FLUXER_MEDIA_PROXY_CORS_ALLOWED_ORIGINS:-${FLUXER_PUBLIC_ORIGIN:-${FLUXER_PUBLIC_SCHEME:-https}://${FLUXER_DOMAIN:-}:${FLUXER_PUBLIC_PORT:-443}}}FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE: ${FLUXER_MEDIA_PROXY_ATTACHMENT_SIGNATURE_MODE:-}+ FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64: ${FLUXER_MEDIA_PROXY_ATTACHMENT_URL_SECRETS_BASE64:-}FLUXER_MEDIA_PROXY_READ_ONLY: ${FLUXER_MEDIA_PROXY_READ_ONLY:-}FLUXER_MEDIA_PROXY_NSFW_THRESHOLD: ${FLUXER_MEDIA_PROXY_NSFW_THRESHOLD:-}FLUXER_NSFW_SERVICE_ENDPOINT: ${FLUXER_NSFW_SERVICE_ENDPOINT:-}