config.example.toml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # PPS Quarantine Manager — example config.
  2. # Copy to config.toml and fill in real values. config.toml is gitignored and is written
  3. # back by the admin panel, so keep comments meaningful — they are preserved on save.
  4. #
  5. # Zones: (S) server-only, edit this file directly, never shown/written by the panel.
  6. # (A) admin-editable in the panel. (W) write-only secret (never returned).
  7. [pps] # (A) PPS connection
  8. # Base URL of the PPS admin service (REST APIs live on the admin port, default 10000).
  9. base_url = "https://pps.example.com:10000"
  10. # API user (admin account with an API Role that has the Quarantine module enabled).
  11. username = "admin"
  12. password = "secret" # (W) plaintext on disk (0600); rotate via panel.
  13. # PPS admin certs are frequently self-signed. false skips TLS verification, or set a path
  14. # to a CA bundle to verify against it.
  15. verify_tls = false
  16. timeout = 120 # seconds per PPS call (5..600)
  17. # Mutual TLS client cert, if PPS/nginx requires one ("400 No required SSL certificate").
  18. client_cert = "certs/client.pem" # combined cert+key PEM, or a cert with client_key
  19. client_key = ""
  20. [quarantine] # (A)
  21. default_folder = "Quarantine" # folder shown on first load (per-user overridable)
  22. # Full folder list — the API cannot enumerate folders, so this is the source of truth for
  23. # the switcher, the Move dropdown, and the delete/report targets. Names MUST match PPS
  24. # exactly (case- and space-sensitive) and may not contain commas.
  25. folders = ["Quarantine", "Attachment Defense", "Debugging - Josef", "Deleted"]
  26. deleted_folder = "Deleted" # where Delete sends messages
  27. default_limit = 200 # UI default row count, 1..1000 (per-user overridable)
  28. # The search API requires a from/rcpt/subject filter — a bare wildcard means "everything
  29. # in the folder". Change if your PPS doesn't treat this as match-all (e.g. "rcpt=@you.com").
  30. list_query = "from=*"
  31. default_days_back = 7 # startdate window (API alone only returns last 24h)
  32. chunk_size = 25 # localguids per PPS POST when the worker batches
  33. default_sort_field = "subject" # subject|date|from|rcpt (per-user overridable)
  34. default_sort_dir = "asc" # asc|desc (per-user overridable)
  35. [quarantine.report_release] # (A) "Report & Release" pipeline
  36. # Steps run in the FIXED order release -> move -> delete; pick any subsequence.
  37. # release delivers the mail in place; move relocates a copy to move_target; delete removes.
  38. steps = ["release", "move"]
  39. move_target = "Debugging - Josef" # must be one of `folders`
  40. # Seconds to wait between steps on the same message so PPS's eventually-consistent
  41. # backend settles (e.g. before moving a just-released message). 0..3600; 0 disables.
  42. # The wait blocks the background worker, not the HTTP request.
  43. step_delay_seconds = 60
  44. [app] # (S) restart required for changes here
  45. # Session signing key: >= 32 chars. Generate with:
  46. # python -c "import secrets; print(secrets.token_urlsafe(48))"
  47. secret_key = "change-me-to-a-random-string"
  48. listen = "127.0.0.1"
  49. port = 8080
  50. db_path = "jobs.db" # SQLite: job queue + per-user prefs
  51. log_level = "INFO" # (A, live) DEBUG for full request tracing
  52. worker_log = "worker.log" # audit log: one line per message acted on
  53. app_log = "app.log" # application log (errors visible in the panel)
  54. cookie_secure = true # false only for plain-http localhost dev
  55. [auth] # authentication
  56. # (S) "oidc" for production Okta, "static" for local dev. NOT editable in the panel.
  57. mode = "oidc"
  58. # (A) shown to users who authenticate but aren't on the allowed list.
  59. denied_message = "Your account is not authorised to use the PPS Quarantine Manager. Contact IT."
  60. # (A) allowed users. role is "admin" or "user".
  61. [[auth.users]]
  62. email = "alice@example.com"
  63. role = "admin"
  64. [[auth.users]]
  65. email = "bob@example.com"
  66. role = "user"
  67. # (S) DEV ONLY — the shared account used when mode = "static". Ignored under oidc.
  68. [auth.static]
  69. username = "admin"
  70. password = "admin"
  71. email = "dev-admin@example.invalid"
  72. role = "admin"
  73. [okta] # (S) entire section, restart-only, never in panel
  74. issuer = "https://example.okta.com/oauth2/default"
  75. client_id = "0oaEXAMPLE"
  76. client_secret = "EXAMPLE-SECRET" # (W)
  77. # Must EXACTLY match the redirect URI registered in the Okta app.
  78. redirect_uri = "https://ppsq.internal.example.com/authorize"