59 Commits

Author SHA1 Message Date
Sebastian Pietschner
a9f1086422 Enhanced Discord Support (#7005)
* Add Discord Provider Prototype

* Add Discord Logo

* Add Plugin to Plugin Manager

* fixed discord auth support and added icon

* add csv role verification

* grab discord server icon and test server id and roles

* subdomain derived from server name

* use discord server specific nickname if available

* Cleanup and comment

* move discord api types to dev deps

* cleanup of server vs default params

* remove commented out lines

* revert envv.development

* revert in vscode

* update yarn lock

* add gif support for discord server icon

* add comment with docs link

* add env section for discord

* fix errors and clarify env

* add new cannot use without

* fix suggestions
2024-06-16 07:04:25 -07:00
Axel Rindle
34c2c5fd51 feat: support custom db schema (#6670)
* feat: db schema

* apply suggestion

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* fix linter

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-03-15 06:08:12 -07:00
Apoorv Mishra
34e8a64b50 Share env vars client-side using @Public decorator (#6627)
* fix: public env vars using decorator

* fix: relocate

* fix: use env.public

* fix: register public env vars across plugins

* fix: test

* fix: tsc

* fix: mark remaining ones as public

* fix: move oidc ones to plugin

* fix: prevent overwrite

* fix: review
2024-03-09 14:48:59 +05:30
Tom Moor
2d879d0939 fix: Restore env validation for plugins (#6649)
* fix: Restore env validation for plugins

* rever
2024-03-06 18:13:54 -08:00
Tom Moor
60e52d0423 Separate environment configs (#6597)
* Separate environment configs

* wip

* wip

* test

* plugins

* test

* test

* .sequelizerc, unfortunately can't go through /utils/environment due to not supporting TS

* docker-compose -> docker compose

* fix: .local wipes .development

* Add custom validation message for invalid SECRET_KEY (often confused)
2024-02-27 09:24:23 -08:00
Tom Moor
852d3f552e fix: MAXIMUM_IMPORT_SIZE is now optional
closes #6571
2024-02-21 18:12:10 -05:00
Tom Moor
7c03963be1 chore: Separate maximum import size config for document/workspace (#6566)
* chore: Separate maximum import size config for document/workspace

* Update .env.sample
2024-02-20 20:35:31 -08:00
Shuttleu
0219885548 Add ability to prevent OIDC redirect (#6544)
* Add ability to prevent OIDC redirect

* Fix Typing on optional boolean

* Fix lint

* Fix lint

* Rename var from PREVENT to DISABLE

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
2024-02-16 09:48:40 -08:00
Shuttleu
bc84714670 Add ability to logout from OIDC (#6539)
* Add OIDC_LOGOUT_URI functionality

* Add logout redirect to work on logout route

* Fix lint

* Fix lint

* Fix lint

* Fix lint

* Return null if logout endpoint used

* Update import
2024-02-16 08:35:38 -08:00
Ray Hong
31021172e7 Fix some minor typos. (#6238) 2023-12-02 06:29:11 -08:00
Tom Moor
07cd13f17a fix: Queue health monitor should only run on worker processes (#6228) 2023-11-27 20:55:00 -05:00
Tom Moor
a1b52e18dd chore: Centralize environment detection 2023-11-09 19:24:16 -05:00
Tom Moor
096a65b0f9 fix: Improve error handling on env boolean parsing 2023-11-09 19:24:16 -05:00
Apoorv Mishra
a7dd5c6798 fix: allow script injection from react dev tools in dev and stage envs (#6120) 2023-11-09 10:40:04 +05:30
Tom Moor
b6706efe6f Add validation to require protocol on urls in env
Related #5961
2023-10-07 17:49:24 -04:00
Apoorv Mishra
67b1fe5514 Local file storage (#5763)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-09-20 15:12:03 -07:00
Tom Moor
093ee74a90 fix: Protect against exports larger than memory/max 2023-09-02 22:11:53 -04:00
Tom Moor
30a4303a8e chore: Remove DEPLOYMENT and SUBDOMAINS_ENABLED (#5742) 2023-08-28 17:39:58 -07:00
Tom Moor
1d90f98a29 fix: Remove overly aggressive AWS_ env variable validation prevents use with IAM roles 2023-08-24 18:16:52 -04:00
Tom Moor
74722b80f2 chore: Refactor file storage (#5711) 2023-08-20 07:04:34 -07:00
Tom Moor
c32cec7bff Add support for SSL in development (#5668) 2023-08-09 04:21:41 -07:00
Apoorv Mishra
ddc883bfcd Preview arbitrary urls within a document (#5598) 2023-07-29 16:51:49 -07:00
Apoorv Mishra
8b3c58a162 fix: coalesce to empty str 2023-07-25 19:35:30 +05:30
Apoorv Mishra
43a91626b2 feat: pipe external urls through iframely 2023-07-25 19:35:30 +05:30
Tom Moor
21d446881e perf: Preconnect to CDN 2023-07-08 14:19:51 -04:00
Tom Moor
edb9099c9d Cleanup intervals on destroyed views extension 2023-06-25 22:52:28 -04:00
Tom Moor
94882d4d3a Add connection rate limiting to collaboration server 2023-06-25 22:46:43 -04:00
Tom Moor
3f7e66980b fix: Remove requirement to have SLACK_CLIENT_ID to use SLACK_VERIFICATION_TOKEN 2023-06-10 15:31:27 +03:00
Tom Moor
1cf597aca7 feat: Add support for GA4 measurement IDs in GOOGLE_ANALYTICS_ID 2023-05-08 12:01:35 -04:00
Apoorv Mishra
6b00ced48f fix: use LOG_LEVEL to set server log severity (#4937) 2023-02-27 21:36:01 +05:30
Tom Moor
667ffdeaf1 fix: Import size should use larger of AWS_S3_UPLOAD_MAX_SIZE and MAX_IMPORT_SIZE
closes #4899
2023-02-19 19:18:31 -05:00
Tom Moor
075555a867 fix: Do not show actively disabled auth providers in self-hosted install (#4794)
* fix: Do not show actively disabled auth providers in self-hosted installation

* self review

* Refactor for easier mocking
2023-01-28 10:02:25 -08:00
Tom Moor
5b561e98f7 chore: Add configurable per-document connection limit extension (#4717)
* chore: Add configurable per-document connection limit extension

* docs
2023-01-22 07:50:32 -08:00
Tom Moor
e3db7455b3 feat: Add optional SMTP_NAME configuration for connecting to SMTP servers that require the client to have a specific hostname 2023-01-13 21:49:57 -05:00
Tom Moor
445d19f43e chore: Extract product name from translation strings (#4646) 2023-01-04 19:00:57 -08:00
Tom Moor
8e4270c321 feat: Add GA integration, support for GA4 (#4626)
* GA integration settings

* trackingId -> measurementId
Hook up script

* Public page GA tracking
Correct layout of settings

* Remove multiple codepaths for loading GA measurementID, add missing db index

* Remove unneccessary changes, tsc

* test
2023-01-01 07:29:08 -08:00
Tom Moor
c6fb764631 chore: Move tracing decorators into the codebase (#4623)
* Vendorize tracing, finally fix service name issues

* Upgrade datadaog-metrics, rename decorators -> tracing

* lint
2022-12-31 04:54:51 -08:00
Tom Moor
6e36ffb706 feat: Allow data imports larger than the standard attachment size (#4449)
* feat: Allow data imports larger than the standard attachment size

* Use correct preset for data imports

* Cleanup of expired attachments

* lint
2022-11-20 09:22:57 -08:00
Tom Moor
26946853da fix: DATABASE_URL missing in env does not produce validation error (#4409)
* fix: DATABASE_URL missing in env does not produce validation error

* lint
2022-11-11 07:11:10 -08:00
Tom Moor
587f062677 Remove usage of tiley (#4406)
* First pass

* Mooarrr

* lint

* snapshots
2022-11-08 17:12:22 -08:00
Apoorv Mishra
bb21fa725c Add team preference to use logo for branding (#4285)
* feat: add team preference to use logo for branding

* fix: allow on cloud version too
2022-10-19 10:01:24 +05:30
Kedas
97a50b20da Add SENTRY_TUNNEL option (#4298)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-10-15 15:12:38 -07:00
Tom Moor
8302840ab5 feat: Add timeout to incoming requests 2022-08-19 08:14:11 +02:00
Tom Moor
41d7cc26b5 chore: Adds name to Redis connections for debugging (#3982)
* chore: Adds name to Redis connections for debugging, minor associated refactoring

* Upgrade bull, ioredis

* Add pid to redis connection name in development
2022-08-17 12:55:57 -07:00
Tom Moor
85dab03820 docs 2022-08-16 19:43:50 +02:00
Apoorv Mishra
7eaa8eb961 feat: Put request rate limit at application server (#3857)
* feat: Put request rate limit at application server

This PR contains implementation for a blanket rate limiter at
application server level. Currently the allowed throughput is set high
only to be changed later as per the actual data gathered.

* Simplify implementation

1. Remove shutdown handler to purge rate limiter keys
2. Have separate keys for default and custom(route-based) rate limiters
3. Do not kill default rate limiter because it is not needed anymore due
   to (2) above

* Set 60s as default for rate limiting window

* Fix env types
2022-08-11 15:40:30 +05:30
Tom Moor
10f86ed218 feat: Webhooks (#3691)
* Webhooks (#3607)

* Get the migration and the model setup. Also make the sample env file a bit easier to use. Now just requires setting a SECRET_KEY and besides that will boot up from the sample

* WIP: Start getting a Webhook page created. Just the skeleton state right now

* WIP: Getting a form created to create webhooks, need to bring in react-hook-forms now

* WIP: Get library installed and make TS happy

* Get a few checkboxes ready to go

* Get creating and destroying working with a decent start to a frontend

* Didn't mean to enable this

* Remove eslint and fix other random typescript issue

* Rename some events to be more realistic

* Revert these changes

* PR review comments around policies. Also make sure this inherits from IdModel so it actually gets an id

* Allow any admin on the team to edit webhooks

* Start sending some webhooks for some User events

* Make sure the URL is valid

* Start recording webhook deliveries

* Make sure to verify if the subscription is for the type of event we are looking at

* Refactor sending Webhooks and follow better webhook schema

This creates a presenter to unify the format of webhooks. We also
extract the sending of webhooks and recording their deliveries to a
method than can be used by each of the different event type methods

We also add a status to WebhookDelivery since we need to save the record
before we make the HTTP request to get its id. Then once we make the
request and get a response we can update the delivery with the HTTP info

* Turn off a subscription that has failed for the last 25 deliveries

* Get a first spec passing. Found a bug in my returning of promises so good to patch that up now

* This looks nicer

* Get some tests added for the processor

* Add cron task to delete older webhooks

* Add Document Events to the Processor

* Revisions, FileOperations and Collections

* Get all the server side events added to the processor and make Typescript make sure they are all accounted for

* Get all the events added to the Frontend and work on styling them a bit, still needs some love though

* Get UI styled up a bit

* Get events wired up for webhook subscriptions

* Get delete events working and test at least one variant of them

* Get deletes working and actually make sure to send the model id in the webhook

* Remove webhook secrets from this slice

* Add disabled label for subscriptions that are disabled

* Make sure to cascade the delete

* Reorg this file a bit

* Fix association

* I removed secret for the moment

* Apply Copy changes from PR Review

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Actually apply the copy changes

TIL that if you Resolve a conversation it _also_ removes the 'staged suggestion' from your list on Github

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Settings/Webhooks.tsx

Missed this copy change before

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Add disabled as yellow badge

* Resolve frontend comments

* Fixup Schema a bit and remove the dependency on the subscription

* Add test to make sure we don't disable until there are enough failures, and fix code to actually do that. Also some test fixes from the json response shape changes

* Fix WebhookDeliveries to store the responses as Text instead of blobs

* Switch to text better for response bodies, this is using the helpers better and makes the code read better

* Move the logic to a task but run in through the processor cause the tests expect that right now, moving the tests over next

* Split up the tests and actually enqueue the events from the WebhookProcessor instead of doing them inline

* Allow any team admin to see any webhook subscription for the team

* Add the indexes based on our lookup patterns

* Run eslint --fix to fix auto correct issues from when I tried to use Github to merge copy changes

* Allow subscriptions to be edited after creation

* Types caught that I didn't add the new event to the webhook processor, also added it to the frontend here

* I think this will get these into the translations file

* Catch a few more translations, use styled components better and remove usage of webhook subscription in the copy

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* fix: tsc
fix: Document model payload empty

* fix: Revision webhook payload
Add custom UA for hooks

* Add webhooks icon, move under Integrations settings
Some spacing fixes

* Add actorId to webhook payloads

* Add View and ApiKey event types

* Spacing tweaks, fix team payload

* fix: Webhook not disabled after 25 failures

* fix: Enable webhook when editing if previously disabled

* fix: Correctly store response headers

* fix: Error in json/parsing/presentation results in hanging 'pending' webhook delivery

* fix: Awkward payload for users.invite webhook

* Add BaseEvent, ShareEvent

* fix: Add share events to form

* fix: Move webhook delivery cleanup to single DB call
Remove some unused abstraction

* Add user, collection, group context to membership webhook events
Some associated refactoring

Co-authored-by: Corey Alexander <coreyja@gmail.com>
2022-06-28 22:44:50 -07:00
Tom Moor
cdd4f0f315 fix: Add postgresql as valid database protocol 2022-06-06 12:13:03 -07:00
Tom Moor
317ed1f041 fix: More env validation improvements
closes #3593
2022-05-28 09:11:02 +02:00
Tom Moor
df14da01b0 fix: Allow docker urls for OIDC, closes #3582 2022-05-24 21:20:18 +01:00