config.example.toml 4.8 KB

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