Files
shandspaced4ndy daa7c4f3d8 badge-service: accept a list of Apple roots (#7707)
* badge-service: accept a list of Apple roots

* badge-service: document root_certificates

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2026-10-14 10:43:53 +00:00

88 lines
4.5 KiB
Plaintext

[listener]
; bind locally; the reverse proxy terminates TLS. It must pass the query string through:
; the long poll's `wait`, `seenPaid` and `seenFull` all travel in it
host = 127.0.0.1
port = 8080
; required: the directory `npm run build` writes in apps/simplex-badge-service/web
static_dir = ./apps/simplex-badge-service/web/dist
; serve the webapp over HTTP. On (default) is the all-in-one deployment. Off is a split deployment
; where a reverse proxy serves the exported folder and this service is only the API and webhooks.
serve_webapp = on
; when set, the webapp is written here at boot with the publishable key injected, copied from
; static_dir, for a reverse proxy to serve. Leave unset in the all-in-one deployment.
; webapp_export_dir = /srv/webapp
; on behind the reverse proxy above: without it every request keys the rate limiter on the
; proxy's own address, so one bucket is shared by everyone. Set it off only where this
; listener is reached directly, since a client can write the header itself.
trust_forwarded_for = on
; omit this whole section to disable Bitcoin and Monero (the browser shows the provider-unavailable screen)
[btcpay]
host = https://btcpay.example.org
api_key = replace-me
store_id = replace-me
webhook_secret = replace-me
expiry_minutes = 60
speed_policy = MediumSpeed
payment_tolerance = 0.5
; omit this whole section to disable card payments (the browser shows the provider-unavailable screen)
[stripe]
; restricted key (rk_): Payment Intents write + Charges read — never a full secret key (sk_)
secret_key = rk_test_replace-me
publishable_key = pk_test_replace-me
; the signing secret of the /webhooks/stripe endpoint configured in the Dashboard
webhook_secret = whsec_replace-me
; minutes the service holds an unpaid card invoice open before it expires it; 1-1440
session_minutes = 60
[poll]
waiting_seconds = 3
idle_seconds = 60
; verifies App Store purchases offline. Omit the whole section and the service answers every App Store
; receipt provider_not_configured, which the app retries later.
; root_certificates lists, comma-separated, the roots trusted to sign receipts, each in DER. Today that
; is Apple Root CA - G3 as Apple publishes it: https://www.apple.com/certificateauthority/AppleRootCA-G3.cer
; When Apple adds a root, list it beside the old one rather than in its place.
;[apple]
;bundle_id = chat.simplex.app
;root_certificates = /etc/simplex-badge-service/AppleRootCA-G3.cer
; verifies Play purchases with the Google Play Developer API. Omit the whole section and the service answers
; every Play receipt provider_not_configured, which the app retries later.
; service_account_file is the JSON key Google issues for a service account with the Play Console
; permissions "View financial data, orders, and cancellation survey responses" and "Manage orders and
; subscriptions", to read and acknowledge purchases. Without the second, a purchase the app has not
; already acknowledged itself is answered internal until the permission is granted. Keep the file readable by this service alone.
;[google]
;package_name = chat.simplex.app
;service_account_file = /etc/simplex-badge-service/play-service-account.json
; the key this service signs credentials with. index is the index clients verify against, so
; private_key has to be one whose public half already ships in the apps at that index: a fresh
; `simplex-chat badge keygen` pair is refused until it does.
; --issuer-key-idx and --issuer-secret override this section if both are given.
; to rotate, change index and private_key together, once clients trust the new index.
; the key is checked at startup, so this section stays commented out until it holds a real key.
;[issuer]
;index = 1
;private_key = replace-me
; optional: when present the service manages one group, created on its first start without
; --run-cli, and logs its join link once, on the start that creates it. The link is a bearer
; secret that stays valid, so keep that log private. The first member to join is promoted to
; owner, so join right away.
; moderators can /issue and /bulk codes; admins and owners can also /revoke.
; display_name must be a name the chat core accepts unchanged: one it would spell
; differently stops the whole service, payments included, from starting.
;[group]
;display_name = SimpleX Badges
;description = Welcome to the badges group
; local testing only, in both run modes: accepts any well-formed App Store or Play receipt without
; verifying it, so anyone who can reach this service can mint badges. The service refuses to start
; with this on beside an [apple] or [google] section.
[dev]
accept_unverified_store_receipts = off