hookshot/config.sample.yml

193 lines
4.9 KiB
YAML
Raw Normal View History

2020-12-13 14:55:36 +00:00
# This is an example configuration file
2021-04-11 16:07:43 +01:00
bridge:
# Basic homeserver configuration
2021-04-11 16:07:43 +01:00
domain: example.com
url: http://localhost:8008
mediaUrl: https://example.com
2021-04-11 16:07:43 +01:00
port: 9993
bindAddress: 127.0.0.1
github:
2021-11-17 12:29:34 +00:00
# (Optional) Configure this to enable GitHub support
2021-04-11 16:07:43 +01:00
auth:
2021-12-01 10:54:47 +00:00
# Authentication for the GitHub App.
2021-04-11 16:07:43 +01:00
id: 123
privateKeyFile: github-key.pem
2021-12-01 10:54:47 +00:00
webhook:
# Webhook settings for the GitHub app.
2021-12-01 10:54:47 +00:00
secret: secrettoken
2021-04-11 16:07:43 +01:00
oauth:
2021-12-01 10:54:47 +00:00
# (Optional) Settings for allowing users to sign in via OAuth.
2021-04-11 16:07:43 +01:00
client_id: foo
client_secret: bar
redirect_uri: https://example.com/bridge_oauth/
2021-12-01 10:54:47 +00:00
defaultOptions:
# (Optional) Default options for GitHub connections.
2021-12-01 10:54:47 +00:00
showIssueRoomLink: false
hotlinkIssues:
prefix: "#"
userIdPrefix:
# (Optional) Prefix used when creating ghost users for GitHub accounts.
_github_
2021-04-11 16:07:43 +01:00
gitlab:
2021-11-17 12:29:34 +00:00
# (Optional) Configure this to enable GitLab support
2021-04-11 16:07:43 +01:00
instances:
gitlab.com:
url: https://gitlab.com
webhook:
secret: secrettoken
publicUrl: https://example.com/hookshot/
userIdPrefix:
# (Optional) Prefix used when creating ghost users for GitLab accounts.
_gitlab_
figma:
# (Optional) Configure this to enable Figma support
publicUrl: https://example.com/hookshot/
instances:
your-instance:
teamId: your-team-id
accessToken: your-personal-access-token
passcode: your-webhook-passcode
2021-11-17 12:29:34 +00:00
jira:
# (Optional) Configure this to enable Jira support. Only specify `url` if you are using a On Premise install (i.e. not atlassian.com)
2021-11-17 12:31:01 +00:00
webhook:
# Webhook settings for JIRA
2021-11-17 12:31:01 +00:00
secret: secrettoken
2021-11-25 11:12:29 +00:00
oauth:
# (Optional) OAuth settings for connecting users to JIRA. See documentation for more information
2021-11-25 11:12:29 +00:00
client_id: foo
client_secret: bar
redirect_uri: https://example.com/bridge_oauth/
2021-11-17 12:31:01 +00:00
generic:
# (Optional) Support for generic webhook events.
#'allowJsTransformationFunctions' will allow users to write short transformation snippets in code, and thus is unsafe in untrusted environments
2021-11-17 12:31:01 +00:00
enabled: false
enableHttpGet: false
urlPrefix: https://example.com/webhook/
userIdPrefix: _webhooks_
2021-11-17 12:31:01 +00:00
allowJsTransformationFunctions: false
waitForComplete: false
2022-04-20 18:13:06 +02:00
feeds:
2022-04-22 11:25:05 +02:00
# (Optional) Configure this to enable RSS/Atom feed support
2022-04-20 18:13:06 +02:00
enabled: false
pollIntervalSeconds: 600
pollTimeoutSeconds: 30
2021-11-25 13:30:19 +00:00
provisioning:
# (Optional) Provisioning API for integration managers
2021-11-25 13:30:19 +00:00
secret: "!secretToken"
2021-04-11 16:07:43 +01:00
passFile:
# A passkey used to encrypt tokens stored inside the bridge.
# Run openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096 to generate
2021-04-11 16:07:43 +01:00
passkey.pem
bot:
# (Optional) Define profile information for the bot user
Implement separate bot users per service (#573) * Add service bots config * Add joined rooms manager and keep track of joined rooms * Add bot users manager and ensure registration and profiles * Improve joined rooms manager and set up already joined rooms * Handle invites with service bots * Handle messages with service bots * Use service bots for connections * Use service bots in widget and provisioning APIs * Use service bots in setup connections * Use service bots for feed connections * Handle admin rooms for service bots * Fix confused event type and service type in provisioning and widget APIs * Fix generic webhooks service name * Fix enabled services config * Handle power level change * Create widgets with service scope * Use service bots for gitlab repo connections * Use service bots for gitlab issue connections * Use service bots for generic webhook connections * Use service bots for figma file connections * Use service bots when verifying state events * Use service bots for github repo connections * Use service bots for github discussion connections * Use service bots for github discussion space connections * Use service bots for github project connections * Use service bots for github issue connections * Use service bots for github user space connections * Use service bots for jira connections * Make sure ghost users are invited for gitlab issue comments * Configure one service per service bot * Add changelog * Update tests * Fix up following rebase * Fix comment * Use getter for enabled services * Ensure homeserver can be reached before registering bots * Add intent getter on bot user * Update config comment * Merge joined rooms manager with bot users manager * Remove unused localpart from bot user class * Refactor to pass in bot users manager * Improve priority sort function Co-authored-by: Christian Paul <christianp@matrix.org> * Fix priority sort Higher priority should come first * Add debug log when invites are rejected * Use different state key for scoped setup widgets * Use different subtitles to differentiate service bots setup widgets * Refactor bot user setup into bot users manager * Refactor to reduce duplication in widget API * Consistent room ID and intent args order * Add docs and update changelog * Add overrideUserId deprecation warning * Add service bots link Co-authored-by: Christian Paul <christianp@matrix.org> Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-13 10:32:09 -05:00
displayname: Hookshot Bot
avatar: mxc://half-shot.uk/2876e89ccade4cb615e210c458e2a7a6883fe17d
Implement separate bot users per service (#573) * Add service bots config * Add joined rooms manager and keep track of joined rooms * Add bot users manager and ensure registration and profiles * Improve joined rooms manager and set up already joined rooms * Handle invites with service bots * Handle messages with service bots * Use service bots for connections * Use service bots in widget and provisioning APIs * Use service bots in setup connections * Use service bots for feed connections * Handle admin rooms for service bots * Fix confused event type and service type in provisioning and widget APIs * Fix generic webhooks service name * Fix enabled services config * Handle power level change * Create widgets with service scope * Use service bots for gitlab repo connections * Use service bots for gitlab issue connections * Use service bots for generic webhook connections * Use service bots for figma file connections * Use service bots when verifying state events * Use service bots for github repo connections * Use service bots for github discussion connections * Use service bots for github discussion space connections * Use service bots for github project connections * Use service bots for github issue connections * Use service bots for github user space connections * Use service bots for jira connections * Make sure ghost users are invited for gitlab issue comments * Configure one service per service bot * Add changelog * Update tests * Fix up following rebase * Fix comment * Use getter for enabled services * Ensure homeserver can be reached before registering bots * Add intent getter on bot user * Update config comment * Merge joined rooms manager with bot users manager * Remove unused localpart from bot user class * Refactor to pass in bot users manager * Improve priority sort function Co-authored-by: Christian Paul <christianp@matrix.org> * Fix priority sort Higher priority should come first * Add debug log when invites are rejected * Use different state key for scoped setup widgets * Use different subtitles to differentiate service bots setup widgets * Refactor bot user setup into bot users manager * Refactor to reduce duplication in widget API * Consistent room ID and intent args order * Add docs and update changelog * Add overrideUserId deprecation warning * Add service bots link Co-authored-by: Christian Paul <christianp@matrix.org> Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-13 10:32:09 -05:00
serviceBots:
# (Optional) Define additional bot users for specific services
Implement separate bot users per service (#573) * Add service bots config * Add joined rooms manager and keep track of joined rooms * Add bot users manager and ensure registration and profiles * Improve joined rooms manager and set up already joined rooms * Handle invites with service bots * Handle messages with service bots * Use service bots for connections * Use service bots in widget and provisioning APIs * Use service bots in setup connections * Use service bots for feed connections * Handle admin rooms for service bots * Fix confused event type and service type in provisioning and widget APIs * Fix generic webhooks service name * Fix enabled services config * Handle power level change * Create widgets with service scope * Use service bots for gitlab repo connections * Use service bots for gitlab issue connections * Use service bots for generic webhook connections * Use service bots for figma file connections * Use service bots when verifying state events * Use service bots for github repo connections * Use service bots for github discussion connections * Use service bots for github discussion space connections * Use service bots for github project connections * Use service bots for github issue connections * Use service bots for github user space connections * Use service bots for jira connections * Make sure ghost users are invited for gitlab issue comments * Configure one service per service bot * Add changelog * Update tests * Fix up following rebase * Fix comment * Use getter for enabled services * Ensure homeserver can be reached before registering bots * Add intent getter on bot user * Update config comment * Merge joined rooms manager with bot users manager * Remove unused localpart from bot user class * Refactor to pass in bot users manager * Improve priority sort function Co-authored-by: Christian Paul <christianp@matrix.org> * Fix priority sort Higher priority should come first * Add debug log when invites are rejected * Use different state key for scoped setup widgets * Use different subtitles to differentiate service bots setup widgets * Refactor bot user setup into bot users manager * Refactor to reduce duplication in widget API * Consistent room ID and intent args order * Add docs and update changelog * Add overrideUserId deprecation warning * Add service bots link Co-authored-by: Christian Paul <christianp@matrix.org> Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-13 10:32:09 -05:00
- localpart: feeds
displayname: Feeds
avatar: ./assets/feeds_avatar.png
Implement separate bot users per service (#573) * Add service bots config * Add joined rooms manager and keep track of joined rooms * Add bot users manager and ensure registration and profiles * Improve joined rooms manager and set up already joined rooms * Handle invites with service bots * Handle messages with service bots * Use service bots for connections * Use service bots in widget and provisioning APIs * Use service bots in setup connections * Use service bots for feed connections * Handle admin rooms for service bots * Fix confused event type and service type in provisioning and widget APIs * Fix generic webhooks service name * Fix enabled services config * Handle power level change * Create widgets with service scope * Use service bots for gitlab repo connections * Use service bots for gitlab issue connections * Use service bots for generic webhook connections * Use service bots for figma file connections * Use service bots when verifying state events * Use service bots for github repo connections * Use service bots for github discussion connections * Use service bots for github discussion space connections * Use service bots for github project connections * Use service bots for github issue connections * Use service bots for github user space connections * Use service bots for jira connections * Make sure ghost users are invited for gitlab issue comments * Configure one service per service bot * Add changelog * Update tests * Fix up following rebase * Fix comment * Use getter for enabled services * Ensure homeserver can be reached before registering bots * Add intent getter on bot user * Update config comment * Merge joined rooms manager with bot users manager * Remove unused localpart from bot user class * Refactor to pass in bot users manager * Improve priority sort function Co-authored-by: Christian Paul <christianp@matrix.org> * Fix priority sort Higher priority should come first * Add debug log when invites are rejected * Use different state key for scoped setup widgets * Use different subtitles to differentiate service bots setup widgets * Refactor bot user setup into bot users manager * Refactor to reduce duplication in widget API * Consistent room ID and intent args order * Add docs and update changelog * Add overrideUserId deprecation warning * Add service bots link Co-authored-by: Christian Paul <christianp@matrix.org> Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-13 10:32:09 -05:00
prefix: "!feeds"
service: feeds
metrics:
# (Optional) Prometheus metrics support
enabled: true
2021-04-11 16:07:43 +01:00
queue:
Add support for native e2ee (#299) * Add support for native e2ee * Various temps to coax it into working * Formatting nitpicks * Include stable registration config key for msc2409 * Update default config with encryption options * Manage admin rooms with bot-sdk DMs This also enables encryption for new admin rooms when appropriate. * Update config comments for encryption settings - Add comment to clarify Redis (the `queue` section) must be configured in order for encryption to work - Mention that the `encryption` section is optional, and omitting it will disable encryption support * Update docs for encryption support * Add changelog * Add to docs some notes about encryption state * Move all post-join logic to onRoomJoin * Block post-join actions on crypto setup Requires https://github.com/turt2live/matrix-bot-sdk/pull/269 * Fix linter error * Update encryption docs and changelog - Mention that worker mode isn't supported with encryption yet - Mention removal of Pantalaimon-based encryption * Update worker docs with encryption config notice * Share main appservice config with feed bots This is required to safely enable encryption for the bots that post GenericHook messages. * Make slight clarification for queue config * Minor fixes * Block post-join actions on feed bot crypto setup Same as a9e6e11d but for the sub-bots that post GenericHook messages. * Get joined rooms from intent instead of bot This refreshes the list of known rooms for crypto events. * Use Element fork of bot-sdk for crypto fixes Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2022-12-09 15:25:36 +00:00
# (Optional) Message queue / cache configuration options for large scale deployments.
# For encryption to work, must be set to monolithic mode and have a host & port specified.
2021-04-11 16:07:43 +01:00
monolithic: true
port: 6379
host: localhost
logging:
# (Optional) Logging settings. You can have a severity debug,info,warn,error
2021-04-11 16:07:43 +01:00
level: info
colorize: true
json: false
timestampFormat: HH:mm:ss:SSS
widgets:
# (Optional) EXPERIMENTAL support for complimentary widgets
addToAdminRooms: false
disallowedIpRanges:
- 127.0.0.0/8
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 100.64.0.0/10
- 192.0.0.0/24
- 169.254.0.0/16
- 192.88.99.0/24
- 198.18.0.0/15
- 192.0.2.0/24
- 198.51.100.0/24
- 203.0.113.0/24
- 224.0.0.0/4
- ::1/128
- fe80::/10
- fc00::/7
- 2001:db8::/32
- ff00::/8
- fec0::/10
roomSetupWidget:
addOnInvite: false
publicUrl: https://example.com/widgetapi/v1/static/
branding:
widgetTitle: Hookshot Configuration
sentry:
# (Optional) Configure Sentry error reporting
dsn: https://examplePublicKey@o0.ingest.sentry.io/0
environment: production
permissions:
# (Optional) Permissions for using the bridge. See docs/setup.md#permissions for help
- actor: example.com
services:
- service: "*"
level: admin
listeners:
# (Optional) HTTP Listener configuration.
# Bind resource endpoints to ports and addresses.
# 'port' must be specified. Each listener must listen on a unique port.
# 'bindAddress' will default to '127.0.0.1' if not specified, which may not be suited to Docker environments.
# 'resources' may be any of webhooks, widgets, metrics, provisioning
- port: 9000
bindAddress: 0.0.0.0
resources:
- webhooks
- port: 9001
bindAddress: 127.0.0.1
resources:
- metrics
- provisioning
- port: 9002
bindAddress: 0.0.0.0
resources:
- widgets
2020-12-12 20:29:33 +00:00