* Add AI assist subscription check when updating subscription in WritefullManager
* move AI assist check in WritefullController
GitOrigin-RevId: 0327e1c19e14e554fb707dc1d2840b7147bdf1d1
* Update collaborator select dropdown with a description for reviewers in free project
* Update share-project-modal test
* Fix saas-e2e tests
* fix server pro tests
* fix cypress multiple inputs selection
* fix testid case
GitOrigin-RevId: 5369828334596d80988aba168385f0a51eea998f
* Script for removing user enrollment to a subcription
* Add "release-managed-user" audit log event for an user id
GitOrigin-RevId: adf2dd97ac82977bcfa07d9a24d1f3c190d095a2
RPO can now be scaled to allow a little extra grace in certain
circumstances.
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: fa60a9ffe966977e396b5645919ddd1451fb1b7a
* Add RecaptchaConditions to `user/emails/add-secondary`, set font to 12px
* Hide `RecaptchaConditions` if `ExposedSettings.recaptchaDisabled.addEmail`
GitOrigin-RevId: dcc4609bf8787076257caed6b5a5d1e47178380e
* Update inactive project deactivation index
* Delete index first, otherwise Mongo complains that the index already exists with a different name
GitOrigin-RevId: b28a60c0774a77363c4e052ddb64bf68665cccf5
* Remove the Bootstrap 5 version utilities
* Remove Account settings LESS stylesheet and unused styles
* Prefer using the OLFormText wrapper component instead of FormText
* Remove the Bootstrap 3 version stories
* Replace Font Awesome icons to Material icons
* Fix the heading hierarchy
* Cleanup unused translation
* Restore ellipsis to the text of two loading spinners
* Add loading button tests back and add some button loading labels
---------
Co-authored-by: Tim Down <158919+timdown@users.noreply.github.com>
GitOrigin-RevId: 283a9167c8c78bf0fe5062840ded6917dcd6263b
* [web] convert file-list to typescript
* [web] add type annotation for clsiServerId without providing default
Co-authored-by: David Powell <david.powell@overleaf.com>
---------
Co-authored-by: David Powell <david.powell@overleaf.com>
GitOrigin-RevId: 5ecb79c2540a3e46e296c6bf7f8573fb65febc3f
* [clsi] add helper function for detecting extraneous files
* [clsi] output.pdfxref and output.synctex.gz are extraneous as well
* [clsi] minor code cleanup
Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com>
---------
Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com>
GitOrigin-RevId: 0d6c96c99b6be3adaee1558b1f958da885e6307a
* [document-updater] fix acceptance test for sending two updates
The Object.create() invocation yields an empty object. The following v
assignment works as expected. The effective update is { v: 43 }.
Processing that fails as no operations were included.
* [document-updater] add endpoint project wide last updated timestamp
* [document-updater] apply review feedback
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
---------
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: 81397537bfd85c2077f19669860b1391c15b34a3
* [web] generate clsi buildId ahead of fetching project content
The buildIds timestamp component will be used for cache invalidation.
* [clsi] strict validation for buildId
* [clsi] validate buildId parameter
GitOrigin-RevId: 88e8b2d48e78fa137b6dca7f2e6b93bbcf88a777
* [web] double down on validating email addresses
* [web] normalize emails in captcha middleware
* [web] add support for regex based allow-list for skipping captcha
* [web] skip captcha for trusted users on all actions
GitOrigin-RevId: a994ebf6b74e80f462d2dab1fe5113bbffa676a9
[web][will merge 17 march 2025] Add "FedRamp" advertisement variant to the US Gov banner list with a special rule
GitOrigin-RevId: 86f96c6c108f72b44658dca53d2cecabf0fe9d14
Shutdown signals become more relevant now that we are looping as we want
to gracefully stop processing records rather than continue looping.
GitOrigin-RevId: dbb499388c86d552d77954988f8fc27d140da3f1
* Convert updateSubscription controller to async/await
* Move updateSubscription to subscription module
* Validate if user is eligible to change plan
GitOrigin-RevId: ce538429cd5a3b93acabdc046f1a8b164ac02301
Brings the process closer to history_store.
We can't use the backup history_store because the keys are generated
differently for chunks than the standard history_store way of doing it.
GitOrigin-RevId: 07adfc0531f6ec0f38bb70ea0fe8ae0d41f508cc
* [web] switch query for hard-deleting users and add index
Co-authored-by: Dr. Sasha Göbbels <sasha.goebbels@overleaf.com>
* [web] fix unit tests
---------
Co-authored-by: Dr. Sasha Göbbels <sasha.goebbels@overleaf.com>
GitOrigin-RevId: a7fd2a590351d2e0d60c0032ca78d457ef815e41
* Remove skipLoadingStyleSheet
* Remove unused bootstrap-5 assignment from the Account settings page since it's archived
* Remove bsVersionIcon
* Remove bsVersion, bootstrapVersion and isBootstrap5 from elements on the IDE page
* Remove BS3Dropdown from the context menu
* Cleanup Bootstrap 3 related comment and type
GitOrigin-RevId: a67244eb78943ee84cc5f89bae164c0361e8fc13
* Rename `checkSecondaryEmailConfirmationCode` to `checkAddSecondaryEmailConfirmationCode`
* Create function `sendCodeAndStoreInSession`
* Create function `sendExistingSecondaryEmailConfirmationCode`
* Create function `_checkConfirmationCode`
* Create function `checkExistingEmailConfirmationCode`
* Rename `resendSecondaryEmailConfirmationCode` to `resendAddSecondaryEmailConfirmationCode`
* Create function `_resendConfirmationCode`
* Create function `resendExistingSecondaryEmailConfirmationCode`
* Add `ResendConfirmationCodeModal`
* Remove `ResendConfirmationEmailButton`
* `bin/run web npm run extract-translations`
* Update frontend test
* Fix: don't throw on render when send-confirmation-code fails!
* Update phrasing in the UI
Per https://docs.google.com/document/d/1PE1vlZWQN--PjmXpyHR9rV2YPd7OIPIsUbnZaHj0cDI/edit?usp=sharing
* Add unit test
* Don't share the "send-confirmation" and "resend-confirmation" rate-limits
* Update frontend test after copy change
* Rename `checkAddSecondaryEmailConfirmationCode` to `checkNewSecondaryEmailConfirmationCode` and `resendAddSecondaryEmailConfirmationCode` to `resendNewSecondaryEmailConfirmationCode`
* Rename `cb` to `beforeConfirmEmail`
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Return `422` on missing session data
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Add `userId` to log
* Replace `isSecondary` param by `welcomeUser`
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Rename `resend-confirm-email-code`'s `existingEmail` to `email`
* Remove "secondary" from rate-limiters
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Remove unnecessary `userId` check behind `AuthenticationController.requireLogin()`
* Only open the modal if the code was sent successfully
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: df892064641d9f722785699777383b2d863124e1
* Show an aggressive dashboard notification for unconfirmed emails
Show a persistent dashboard notification for untrusted secondary emails
* For emails before the cutoffDate, start displaying the notification on the deletionDate and show the notification for 90 days
* Update the email deletion logic for displaying the email notification and update test
* Update test
GitOrigin-RevId: 1b0e44f79592292d428c634dc1ec4df9e6ceaeb4
* Swap pre/div in split-test-dump-modal.tsx
* Remove fixed font-size and line-height for code/kdb/pre/samp
* Set the font-size of code,kdb,samp to 1em instead of 0.875em
* Remove unnecessary `font-size: inherit`
GitOrigin-RevId: b5b19cf08774312ad1b3c4dcf16ea08e08093ccb
* Add overleaf assist paywall modal component in storybook
* update img alt
* remove data-action
* rename assistant -> assist
* use css var for blue color
* Open Overleaf assist paywall if in "overleaf-assist-bundle" split-test
* dont use optional planCode
* Open overleaf assist paywal via event listener
* rename to mainEditorLayoutModals
* call setAssistantUpgraded when modal is shown
* fix merge mistake
* fix lint error
* fix merge differences
GitOrigin-RevId: 0b3162a5c241d4dbe2773ae773c3e35f02c5c492
* [clsi] make error copying output files a fatal compile error
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
* [clsi] remove unused endpoints for downloading files from compileDir
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
* [clsi] avoid useless clone of output files
* [clsi] add test for output files when compile did not produce a PDF
---------
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
GitOrigin-RevId: cb998b99b4d96cb48ddd70987958f614ad3b40fc
* Add overleaf assist paywall modal component in storybook
* update img alt
* remove data-action
* rename assistant -> assist
* use css var for blue color
* Open Overleaf assist paywall if in "overleaf-assist-bundle" split-test
* dont use optional planCode
GitOrigin-RevId: 9315ee2350cb7bc804afa720047849c220781686
- Swap order of "oldContent" and "static" (apparently that makes the
selection more reliable...)
- Turn off spellchecking outside the spellchecking test (avoid DOM
changes from added underline on misspelled words)
- Swap order of opening file and switching to doc under test:
The cy.findByText('static') was occasionally triggering an unhandled
error in codemirror when it ran while the editor was getting swapped.
(something along the lines of "cannot select out-of-dom range")
- Align source and visual editor tests, use ".findByText(oldContent)"
- Double down on waiting for doc switch to finish loading
GitOrigin-RevId: 8b201a6d78a60e3cfa92c22198f63e705d8880ec
* Add script to attach dangling comments to a document
* Fix comment id field
---------
Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: b51c9c57542b24bd27cb9475b088eb2f0d88b3af
* removing the group size 50
* removing the if condition for 20/50 groups
* running make cleanup_unused_locales
* removing instances of sizesForHighDenominationCurrencies and the related if conditions
* removing the price related to group size of 50 in different currencies
* fixing the test
* changing the 50 to 20 under faqs
* changing the remaining 50 to 20
* cleaning of variables
* removing extra variable
GitOrigin-RevId: 68f5d7df1eab29360e9c806ad844f1c900341c19
* [server-pro] tests: add helper for gitURL
* [server-pro] tests: avoid hard-coding URL scheme/origin
* [server-pro] tests: fix typo in query selector
* [server-pro] tests: fix spelling of GitHub
* [server-pro] tests: double down on matching email in body
* [server-pro] tests: speed up session resumption
* [server-pro] tests: use a single project in editor spec
* [server-pro] drop check on started recompile
The labels changed between versions and making it configurable is too
verbose.
GitOrigin-RevId: d1ace3b534f28c65b8e20c808bac12268f26fa4d
* [server-pro] trim build context
* [misc] remove old Makefile/mvn cache folders from gitignore
* [misc] add extra entries from .gitignore to .dockerignore
Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
---------
Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
GitOrigin-RevId: 2ebca7d6739f778ec31d0c09fd6a75029bf2483e
* [server-pro] tests: avoid opening editor if not needed for test
* [server-pro] tests: use intercept to avoid opening editor page
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
* [server-pro] tests: use times option in intercept
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
---------
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 9530d1f5b06766fec70631da47d8b1049b59ead5
* Update shellcheck files to include non ".sh" files having the sh shebang
* Add shellcheck to root Makefile
* `make shellcheck_fix`
* Add shellcheck to server-ce and server-pro
* Exclude SC1091 (Not following) in SP/CE
* Fix errors in SP
* Fix errors in CE
* Update root shellcheck to ignore all failing rules. We can later remove rules one by one.
* Add shellcheck to web
* Add shellcheck step for server-ce and server-pro in cloudbuild.yaml
* Revert "Add shellcheck to root Makefile"
This reverts commit e0fa56f2
* Revert "`make shellcheck_fix`"
This reverts commit eb179245c109a9e742a7fdeeb75a4bdd03963587.
* `make shellcheck_fix` in server-ce
* Fix: Use $(...) notation instead of legacy backticked
```
In init_scripts/100_set_docker_host_ipaddress.sh line 5:
echo "`route -n | awk '/UG[ \t]/{print $2}'` dockerhost" >> /etc/hosts
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
echo "$(route -n | awk '/UG[ \t]/{print $2}') dockerhost" >> /etc/hosts
For more information:
https://www.shellcheck.net/wiki/SC2006 -- Use $(...) notation instead of le...
```
* `make shellcheck_fix` in web
* Manual corrections on autofix
* Update SHELLCHECK_FILES to Perl regex so it matches at start of file
GitOrigin-RevId: 815d53f319a3792efa22703beb75570de5977450
* [web] only flag errors originating from WebSocket connect as ws failure
* [web] slow down reconnecting when potentially offline
GitOrigin-RevId: 7c587d52dfe8092c45e2152f929e05e814db98f4
* [haproxy] add support for xhr-polling in real-time
* [web] try 3 WebSockets then fallback to xhr-polling when (re-)connecting
* [web] ensure old socket.io transport has been closed when reconnecting
* [web] close xhr-polling transport before leaving the page
This will de-register the client, leave the project and clean up the
connected clients tracking ASAP.
* [web] rename constant to avoid confusion
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
---------
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 55e500c341145947e5589875438fc796394b6ae4
* Reapply "[web] Show DS Navigation for all SAAS users regardless of feature fla…"
This reverts commit 8d4096a7e4b6a7894b1bef14290548225deebd57.
* Fix: `hasDsNav` should check `isOverleaf` !!!
* Change `hasDsNav` from a boolean to a function call for dynamic evaluation
GitOrigin-RevId: 17463ac113a4278ed344622552d83da93b208b4d
Previous attempt failed with `sh: gcr.io/overleaf-ops/texlive-full:2023.1: No such file or directory`.
✅ Now tested with `make prefetch_custom_texlive`
GitOrigin-RevId: 09a5e1d3c270bdb58c761c8be3c665155879290f
* Remove `sidebar-navigation-ui-update` as true from analytics events
* Hide "ds-nav" survey for users who have the feature flag
* Replace `useIsDsNav()` by `isOverleaf`
* Rename former `hideDsSurvey` to `hideDsSurvey`, and set `hasDsNav = isOverleaf` variable
so the intent is clearer.
* Update frontend tests
GitOrigin-RevId: 2be9f88a10da430c0429de15d777d98104327f9f
`xargs -d` doesn't work on Mac OS: `xargs: illegal option -- d`
There's a workaround using `tr`
See: https://stackoverflow.com/a/71409498/4823861
GitOrigin-RevId: 109c7e1e035b829122d96fd41824f18bdf81468a
* Use fixed width for project list checkbox
* Set word-break: break-word for project owner name (#23783)
GitOrigin-RevId: 4d3f443f99f366a43a1b59a7556c0341c06d7af9
* Allow selecting comment text without changing scroll position
* cursor:default on review content
* check text selection on mouseup
* update comment
GitOrigin-RevId: f867613f5b4d08c3b960abfa061b14b404f411a8
* Remove uses of `useIsDsNav`
* Remove `sidebar-navigation-ui-update` as true from analytics events
* Hide "ds-nav" survey for users who have the feature flag
* `make cleanup_unused_locales` & `bin/run web npm run extract-translations`
* Update frontend tests
GitOrigin-RevId: 83f429d81ca1b46e9eab4fc667a921026a85912f
* [web] wait for sending project invite notification, send email detached
Errors from sending the notification or email are still logged only.
Wait up-to ~one second for notification to be sent (API timeout is 1s).
* [server-pro] tests: wait for invite action to complete
GitOrigin-RevId: e6998e6134b5267c91b47785d616a46e9651b996
* hide cached files/logs and files buttons while primary paywall showing
* replace plans link with interstitial
* open checkout in new tab
* editors > collaborators, use correct collab count for student plan, refactor collab translations
* fix variable case
GitOrigin-RevId: 48f53aa385ed6d7e5c9b485fe4a045a47c448777
* Reapply "Increase the length of unsaved doc time before the editor is locked (#23431)"
This reverts commit d0efca398e59ca488c530ee9ec5ca76f29843679.
* Use pendingOpCreatedAt if inflightOpCreatedAt isn't set
GitOrigin-RevId: b3301d7cc1554215a4ba569537bd47beeefde20f
* adding a hello world end point in analytics service for customerio
* adding updateCustomerIoUser handler function
* setting up the function recordUserAnalyticsEvent
* removing hello function and adding end points for update and track function
* installing the node js source for customer io
* adding the the functions for identify and track events
* adding a properties property
* adding new API key
* cleaning some code and making some changes to make it work
* renaming function to include identify keyword
* adding some detailed succes messages and try catch blocks
* adding a temporary key for testing
* adding the env variable for key
* adding a fallback value for acceptance test, this will need more investigation later on
* deleting the controller, as the handler functions will directly be linked to the customerio queue, so we do not want this path anynmore
GitOrigin-RevId: 38e0cb713e5d6a14c70cdbfb2a7463c633746bbe
* Use opInflightSince to measure unsaved doc time
* Use performance.now() for lastAcked timestamp
* Use inflightOpCreatedAt
* Increase MAX_UNSAVED_ALERT_SECONDS to 15
* Increase MAX_UNSAVED_SECONDS to 30
* Increase FATAL_OP_TIMEOUT to 45000
* Convert "Connection lost" modal to a notification
GitOrigin-RevId: 2d4233723620fd03ce6d6c5795c48c33c0b2f92c
* Create script: remove_unconfirmed_emails.mjs
* Update script remove_unconfirmed_emails.mjs after pairing
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
* Add user counts. Add timing
* Revert previous changes: just remove the fully unconfirmed emails
* Add tests on scripts/remove_unconfirmed_emails.mjs
* Update audit log so `removedEmail` is a string and doesn't break the admin-panel audit logs list
* Update remove_unconfirmed_emails to have a `--generate` and a `--consume` mode
* Update tests on remove_unconfirmed_emails
* Add tests checking that `--consume` doesn't delete any email
* Update script so `--consume` checks that emails shouldn't be deleted again!
* Update CSV path to `/tmp/...`
* Add test cases: deleted users, deleted email, comma in email
---------
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
GitOrigin-RevId: 8c60b56bcdfa33bc6143d66c32a5f430fb76f6d7
* [server-ce] upgrade mongo to 6.0 in e2e tests
* [server-ce] upgrade mongo to 6.0 for CE dev-env
GitOrigin-RevId: 6a76297d32177a8b5a067d325e74bdb01971af30
* Use 2 columns for socket diagnostics
* Fixup time so it's never negative
* Add "Copy to clipboard" feature
GitOrigin-RevId: ba7bcc672287c2697afadd904ade315b4a39f954
* adding the right translations to match figma
* adding 2 more translations
* adding the correct styling for the translation
* adding the last translation
* removing unused button and extra line
* adding the p tags and necessary styling to remover margin bottom
GitOrigin-RevId: 97c47e53ee4ae13e95027c602521258f056a6bed
The default logger is "json-file", which writes json blobs and splits
stdout and stderr. We do not need to split and also can save on extra
serialization overhead in the docker daemon by switching the driver.
- use the cheaper "local" driver for containers that we need logs from
(test containers), the local driver streams stdout+stderr into a file
- use the no-op "none" driver for support containers that we do need any
logs from.
GitOrigin-RevId: 55c7cb7c91860e192b6d54354f4550a0ee9a672c
* [web] tests: rename User.upgradeFeatures to User.upgradeSomeFeatures
The upgrades features do not match with any plan.
* [web] make user feature changes in tests more reliable
* [web] fix schema for featuresOverride in tests
* [web] log in after upgrading features
GitOrigin-RevId: ac5b19c798712926c118b221c553540b413802cd
* [web] avoid setting up users more than once in tests
* [web] tests: simplify user exists check in User.setExtraAttributes
GitOrigin-RevId: 4c526df7c933a38ab93d7760efbd0a9490d5582a
* [web] split test_frontend_ct_editor into two jobs
* [web] split test_frontend_ct_core into two jobs
GitOrigin-RevId: 30f47003ca24ae71e443f130819b3ec600339193
* Script for updating comment id to match the one from history
* update multiple comments in a single query
* use array filters for updating comments
* log doc id
GitOrigin-RevId: ca4337591735d0d76d5599c19cc42628421ed14f
* [web] upload to CDN buckets concurrently
* [web] documentation for detaching, recording of pid and waiting
GitOrigin-RevId: abdb357771d9c5e34330827b146ae43eb6146675
* copy pasting the code into new redesign file from old paywall file
* creating a new file for redesign - pdf-log-entry-redesign and copy pasting the old file content for now
* adding redesign file for header and copy pasting old file content for now
* using pdf-log-entry-redesign
* adding first round of styling for headint title under BS5 styling
* adding hasBorder property on the inhouse button component
* adding a cta container for 2 buttons
* adding the icon and fixing the class hierarchy
* fixing the spacing so spacing matches the figma design
* adding a translation for heading
* adding bg color and spacing for heading
* removing no thanks button
* changing the font size
* adding the link colors
* adding the required spacing on the new website redesign logs pane components
* seperating the whole component into a new component TimeoutMessageAfterPaywallDismissal for easy display later in
* removing the class that I had added earlier
* deleting the website redesign folder because files dupliocated in that folder did not have any content changes, redesign only needs styling changes for now
* adding try for free translation
* adding the unfilled icon and ficing the heading sizew
* fixing the padding of log-entry-formatted-content
* running npm run extract-translations
GitOrigin-RevId: 810ddd6037cbad0761ea23a9a2e0693a7ad7130a
* [web] split non-editor frontend cypress tests into core vs modules
* [web] skip docker compose down before starting frontend tests
We are already skipping it for all the other test targets.
GitOrigin-RevId: 9f5938198b7885f0e5bcaf77964e776e66002037
* [misc] silence logger when running tests
* [misc] re-enable logging in some tests for scripts
* [misc] make it easy to turn on verbose logging for tests
```
LOG_LEVEL=debug make test_unit
LOG_LEVEL=debug make test_acceptance
```
GitOrigin-RevId: 219bc6d1f9cbdb89ddd7d94742920913ddde4514
* [history-v1] speed up tests for back-fill script
* [history-v1] move "should process nothing on re-run" test to the end
GitOrigin-RevId: d5180cfaefca3c46c440230eb3566539de1582bd
* [project-history] trim logging when projectVersion is out of order
* [editor-core] record reason rather than full pathname when not clean
* [editor-core] remove pathname from error messages
* [project-history] avoid logging updates when historyId is inconsistent
* [project-history] avoid logging failed history-v1 requests repeatedly
* [project-history] log once when doc version is out of order in chunk
GitOrigin-RevId: 5ac431ac87b57c00fac9d5ab486ca305b1775372
* [misc] fix logger.error(err) calls
The signature is "logger.error({ err }, 'MESSAGE')".
* [project-history] remove duplicate logger.err calls in health check
The call-site is already logging any errors. Also, the logger.err call
signature was not quite right.
* [web] log userId when removeDropbox/removeGithub hook fails
* [misc] fix logger.warn(err) calls
The signature is "logger.warn({ err }, 'MESSAGE')".
* [misc] fix logger.error(OError.tag(err)) calls
* [web] make eslint happy
GitOrigin-RevId: 7f528113a3f7e9f6293b7d2d45adc079380325bb
* Sync history and chat service resolve value on file restore
* properly check resolved values
* delete resolved from emitted newCommentThreadData
* removed resolved from the comment range
GitOrigin-RevId: 6f3a14e2e14e48a2313d7b0942b6621bb42c472f
* Dont show "add comment" tooltip when text is selected via search
* remove the tooltip if selection changes
* handle empty selection
* use tr.effects.some for mouseUp check
* avoid creating new create function each time
* use useEventListener
GitOrigin-RevId: 18d96fe6fdefcd55f88849cf880f804d4c963f4d
* [web] Ignore chat capability in CE/SP
* Allow usage of hasFeature('chat') for testing in saas
GitOrigin-RevId: 4ab5ffe2142353322e7955463f1beca524113d42
* [history-v1] add readOnly lookup for raw chunks
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* [history-v1] reduce min poolsize for readOnly pool to 0
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
---------
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: a711c4ee4f3ea3775bd090e620d1ef52689fa1f4
* [history-v1] add cheap endpoint for checking time of last history write
The /raw endpoint skips the GCS lookup for the chunk.
* [project-history] script for fixing-up files/metadata with bulk resync
* [project-history] upgrade structure only resync when full sync is needed
* [project-history] start resync and process resync updates under lock
* [project-history] stop retrying during graceful shutdown
GitOrigin-RevId: 73184d5786e1d40f5b7e21f387fc37cf43f0ac2d
Fix VAT info is not properly updated when changing plan without reloading.
I removed `setPlan` and created a new function: `updatePlan`. In the new function, I call the recurly function directly and the tracking code. This way, we can be sure that changing plan won't call useLayoutEffect.
Also, remove unused `useState` on the `planCode`
GitOrigin-RevId: 0d6d9fac32c15dcf13e35cf9cd9161aa07581938
* Create tests on find_malformed_filetrees and fix_malformed_filetrees
* Remove lines that are making fix_malformed_filetree fail
These lines are causing errors such as
```
Missing file hash: 586846800000000000000000/5891271c0000000000000000 (rootFolder.0.folders.2.fileRefs.7.hash)
SaaS: likely needs filestore restore
Server Pro: please reach out to support
```
* Add snapshots of projects after fix_malformed_filetree
* Set `WRITE_SNAPSHOT` as false
* Make `deleteProjectsRecordId0` constant
* Ignore duplicated ID errors in CreateMalformedFileTrees.mjs
* Move snapshots to directory folder
* Remove unnecessary code
* Update tests to cover use cases from the scripts
* Fix: Use `new ObjectId(projectId)` instead of the string in mongo queries
* Fix: Query `rootFolder: []` to fix more than `rootFolder: { $size: 0 }`
* Remove/rename files from first draft
* Remove empty strings from expects in unrelated tests, now that `filterOutput` removes them
* Add missing `expectFixStdout` to tests
* misc: rename test util to strId
* Add "well formed filetrees" to test cases
* Use `wellFormed` variable to remove some duplication
* Update tests:
- check Missing file hash path
- remove test on string/numbers as array items
* Add test "bug: shifted arrays in filetree"
* Rename `wellFormedFile` to `wellFormedFolder`
* Fix name of the root folder to `'rootFolder'`, not `'untitled'`
GitOrigin-RevId: dc098bb7ad3ca441fe2bb72b5f5f0e3bcedbdf67
* Prevent submitting comment on enter if input is empty
* check for content in keyPress event
GitOrigin-RevId: 1abef229782265836a49d74aa93625797d50dc3a
* Disable restore project/file and project settings for a reviewer
* hide github menu
* use permissions context
GitOrigin-RevId: a705ecf8bc1f722b8818baef85c5411e7a762989
* [web] add external 15s heartbeat to socket.io connection
* [web] extend debugging context for client errors
- include performance.now() timestamp for correlating other timings
- include connectionState, especially for new externalHeartbeat detail
- include spellCheckLanguage to check on client-side spelling impact
* [web] remove unnecessary hook dependency
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
* Refactor externalHeartbeat
* Add connectionManager to context
* Clear the interval earlier, and on connect
* [web] refactor handling of socket debugging info
* [web] add split-test for external socket heartbeat
* [web] fully remove connectionManager from connection context
---------
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: fbebe64f8aa207eb4fd4a8f27d522d1cac35f9d4
Only the err/error fields will use the Error serializer and emit all the
OError details into the log.
GitOrigin-RevId: 4b0e16c00be5ea7c0aea747f49b46897ebd100cc
* [web] do not return createdBlob=true from error path
Defense in-depth, currently the only call-site bails out on error.
* [web] do not send filestore URLs when feature is disabled
GitOrigin-RevId: 7e90cf4c4babffeec337702502234bac73c1f116
* [project-history] skip HEAD on blob without file-hash
* [project-history] only 404s indicate a missing blob
* [project-history] error checking for existing blob is fatal
* [project-history] always skip creating blob if already exists
Ignore createdBlob detail after performing check on blob. It might not
exist on old operations that have been queued.
* [project-history] fix unit tests
* [project-history] migrate test to new fetch call
GitOrigin-RevId: 457963042e9d836647d3c122516329d4dc9b544f
* [history-v1] delay process exit to give logging time to flush
* [history-v1] add flag for back-filling hashes for projectIds from file
GitOrigin-RevId: 887a1e1c72d6f5a13bfc8d0e54023afbf5bc671c
- Validate _id fields to be ObjectIds
- Include more debug output, notably include the folder/doc/file id
- Emit and consume JSON output
- Read broken file-tree details from (ad-hoc) file
- Use generator instead of accumulating all results per project first
- Use batchedUpdate to be able to pause and resume processing
GitOrigin-RevId: 606ac431fff65891e09479c0ba9bcb7e7dc5cbe4
* Prevent scrolling when reply textarea is focused
* remove focusIsOnTextarea check as it is handled above
* remove unnecessery setSelected
GitOrigin-RevId: 5ce3fc6691a19fe2566875785607bb4faa3e9f52
* Increase threshold for "latency in red color"
* Fix online status in Chrome and Safari
* Add "Auto ping" checkbox
* Put `/socket-diagnostics` behind `AuthenticationController.requireLogin`
* Set logs to `logger.info` when debugging
* Add `publicId` and `clientId` to logs
* Fix disconnect logs when debugging
* Refresh UI every second. Display red "Ping Count" if unanswered for 3s
* Update services/web/frontend/js/features/socket-diagnostics/components/socket-diagnostics.tsx
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Update services/web/frontend/js/features/socket-diagnostics/components/socket-diagnostics.tsx
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* `npm run format:fix`
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 9faf2abdac51fa4b87c67d8fe89c4125d01d826f
* Create a UI to test socket connection
* Add Clock Delta to the measurements
* Add colors to DiagnosticItem
* Update icon
* Add more info to the diagnostics screen
* Add logs in backend on debug messages, disconnections and connection
* Add last received ping info
* Reorder DiagnosticItems
* Remove "warning" text color (too light)
* Replace Phosphor icons by Material Icons
GitOrigin-RevId: 6a015b4928cd19849ff287cf254f671840ed44af
* Add `dsNavStyle` prop, so `sidebar-navigation-ui-update` doesn't change all pages
* Use `useIsDsNav` instead of `useSplitTestContext`
* Create a `useDsNavStyle` hook
* Use `useDsNavStyle`
* Add comment on `useIsDsNav` and `NavStyleContext`
* Revert "Hide nav dropdown chevron icon in welcome page"
This reverts commit 78b5ba85
* Move `DsNavStyleProvider` usage to project-list-ds-nav.tsx
* Fix typo
* Simplify `useDsNavStyle` conditions
GitOrigin-RevId: df3fe66d772919c40df69d357bee6949ab413928
* Convert event-tracking to TypeScript
* Convert local-storage to TypeScript
* Convert mapSeries to TypeScript
* Convert SessionStorage to TypeScript
* Convert account-upgrade to TypeScript
* Convert isValidTeXFile to TypeScript
* Convert date functions to TypeScript
* Convert EventEmitter to TypeScript
* Convert isNetworkError to TypeScript
* Convert webpack-public-path to TypeScript
* Convert displayNameForUser to TypeScript
GitOrigin-RevId: 79c5a2d1101fcd520f3116f0f4af29d974189d94
* [web] rm split test from the change to group modal
* [web] rm split test from cancel flow
* [web] rm split test from checkout flow
* [web] rm unused translations
GitOrigin-RevId: 0188f2631ed18e79fdf55dabedac7cdea4f213d3
* [web] rm split test from new plans page
* [web] rm showDiscountPercentage from group_member_picker (always false)
* [web] rm now unused classes on edu discount checkbox
* [web] rm split test from FAQ
* [web] rm unused translation
GitOrigin-RevId: 262d97f317d8aaef6e5a07a8ecd4edc67557408b
[web] Remove dead backend (include pug template) code after `website-redesign-plans` test has been concluded and `new-design` variant is fully activated
GitOrigin-RevId: 143129da71d43b88535f971b13e9e72c98bad798
[web] Remove `website-redesign-plans` test config from acceptance test and redirection tests from unit tests
GitOrigin-RevId: f1b30231be06748726ec2921fe23deadf2a701b6
<img src="doc/screenshot.png" alt="A screenshot of a project being edited in Overleaf Community Edition">
<img src="doc/screenshot.png" alt="A screenshot of a project being edited in Overleaf Extended Community Edition">
<p align="center">
Figure 1: A screenshot of a project being edited in Overleaf Community Edition.
Figure 1: A screenshot of a project being edited in Overleaf Extended Community Edition.
</p>
## Community Edition
[Overleaf](https://www.overleaf.com) is an open-source online real-time collaborative LaTeX editor. We run a hosted version at [www.overleaf.com](https://www.overleaf.com), but you can also run your own local version, and contribute to the development of Overleaf.
[Overleaf](https://www.overleaf.com) is an open-source online real-time collaborative LaTeX editor. Overleaf runs a hosted version at [www.overleaf.com](https://www.overleaf.com), but you can also run your own local version, and contribute to the development of Overleaf.
## Extended Community Edition
The present "extended" version of Overleaf CE includes:
- Sandboxed Compiles with TeX Live image selection
- LDAP authentication
- SAML authentication
- OpenID Connect authentication
- Real-time track changes and comments
- Autocomplete of reference keys
- Symbol Palette
## Enterprise
If you want help installing and maintaining Overleaf in your lab or workplace, we offer an officially supported version called [Overleaf Server Pro](https://www.overleaf.com/for/enterprises). It also includes more features for security (SSO with LDAP or SAML), administration and collaboration (e.g. tracked changes). [Find out more!](https://www.overleaf.com/for/enterprises)
## Keeping up to date
Sign up to the [mailing list](https://mailchi.mp/overleaf.com/community-edition-and-server-pro) to get updates on Overleaf releases and development.
If you want help installing and maintaining Overleaf in your lab or workplace, Overleaf offers an officially supported version called [Overleaf Server Pro](https://www.overleaf.com/for/enterprises).
## Installation
We have detailed installation instructions in the [Overleaf Toolkit](https://github.com/overleaf/toolkit/).
Detailed installation instructions can be found in the [Overleaf Toolkit](https://github.com/overleaf/toolkit/).
To run a custom image, add a file named docker-compose.override.yml with the following or similar content into the `overleaf-toolkit/config directory`:
## Upgrading
```yml
---
services:
sharelatex:
image:sharelatex/sharelatex:ext-ce
volumes:
- ../config/certs:/overleaf/certs
```
Here, the attached volume provides convenient access for the container to the certificates needed for SAML or LDAP authentication.
If you are upgrading from a previous version of Overleaf, please see the [Release Notes section on the Wiki](https://github.com/overleaf/overleaf/wiki#release-notes) for all of the versions between your current version and the version you are upgrading to.
If you want to build a Docker image of the extended CE based on the upstream v5.4.0 codebase, you can check out the corresponding tag by running:
```
git checkout v5.4.0-ext-v1
```
After building the image, switch to the latest state of the repository and check the `server-ce/hotfix` directory. If a subdirectory matching your version (e.g., `5.4.0`) exists, build a patched image.
Alternatively, you can download a prebuilt image from Docker Hub:
```
docker pull overleafcep/sharelatex:5.4.0-ext-v1
```
Make sure to update the image name in overleaf-toolkit/config/docker-compose.override.yml accordingly.
## Sandboxed Compiles
To enable sandboxed compiles (also known as "Sibling containers"), set the following configuration options in `overleaf-toolkit/config/overleaf.rc`:
```
SERVER_PRO=true
SIBLING_CONTAINERS_ENABLED=true
```
The following environment variables are used to specify which TeX Live images to use for sandboxed compiles:
-`ALL_TEX_LIVE_DOCKER_IMAGES`**(required)**
* A comma-separated list of TeX Live images to use. These images will be downloaded or updated.
To skip downloading the images, set `SIBLING_CONTAINERS_PULL=false` in `config/overleaf.rc`.
-`ALL_TEX_LIVE_DOCKER_IMAGE_NAMES`
* A comma-separated list of friendly names for the images. If omitted, the version name will be used (e.g., `latest-full`).
-`TEX_LIVE_DOCKER_IMAGE`**(required)**
* The default TeX Live image that will be used for compiling new projects. The environment variable `ALL_TEX_LIVE_DOCKER_IMAGES` must include this image.
Users can select the image for their project in the project menu.
Here is an example where the default TeX Live image is `latest-full` from Docker Hub, but the `TL2024-historic` image can be used for older projects:
The following authentication methods are supported: local authentication, LDAP authentication, SAML authentication,
and OpenID Connect (OIDC) authentication. Local authentication is always active. The environment variable `EXTERNAL_AUTH`
specifies which external authentication methods are activated. The value of this variable is a list. If the list includes `ldap`, `saml`, or `oidc`,
then LDAP authentication, SAML authentication, and OIDC authentication will be activated, respectively.
For example: `EXTERNAL_AUTH=ldap saml oidc`
This configuration activates all available authentication methods, although this is rarely necessary.
<details>
<summary><h3>Local Authentication</h3></summary>
Password of local users stored in the MongoDB database. An admin user can create a new local user. For details, visit the
[wiki of Overleaf project](https://github.com/overleaf/overleaf/wiki/Creating-and-managing-users).
It is possible to enforce password restrictions on local users:
*`OVERLEAF_PASSWORD_VALIDATION_MIN_LENGTH`: The minimum length required
*`OVERLEAF_PASSWORD_VALIDATION_MAX_LENGTH`: The maximum length allowed
*`OVERLEAF_PASSWORD_VALIDATION_PATTERN`: is used to validate password strength
-`abc123`– password requires 3 letters and 3 numbers and be at least 6 characters long
-`aA`– password requires lower and uppercase letters and be at least 2 characters long
-`ab$3`– it must contain letters, digits and symbols and be at least 4 characters long
- There are 4 groups of characters: letters, UPPERcase letters, digits, symbols. Anything that is neither a letter nor a digit is considered to be a symbol.
</details>
<details>
<summary><h3>LDAP Authentication</h3></summary>
Internally, Overleaf LDAP uses the [passport-ldapauth](https://github.com/vesse/passport-ldapauth) library. Most of these configuration options are passed through to the `server` config object which is used to configure `passport-ldapauth`. If you are having issues configuring LDAP, it is worth reading the README for `passport-ldapauth` to understand the configuration it expects.
When using Local and LDAP authentication methods, a user enters a `username` and `password` in the login form. If LDAP authentication is enabled, it is attempted first:
1. An LDAP user is searched for in the LDAP directory using the filter defined by `OVERLEAF_LDAP_SEARCH_FILTER` and authenticated.
2. If authentication is successful, the Overleaf users database is checked for a user with the primary email address that matches the email address of the authenticated LDAP user:
- If a matching user is found, the `hashedPassword` field for this user is deleted (if it exists). This ensures that the user can only log in via LDAP authentication in the future.
- If no matching user is found, a new Overleaf user is created using the email, first name, and last name retrieved from the LDAP server.
3. If LDAP authentication fails or is unsuccessful, local authentication is attempted.
#### Environment Variables
-`OVERLEAF_LDAP_URL`**(required)**
* URL of the LDAP server.
- Example: `ldaps://ldap.example.com:636` (LDAP over SSL)
- Example: `ldap://ldap.example.com:389` (unencrypted or STARTTLS, if configured).
-`OVERLEAF_LDAP_EMAIL_ATT`
* The email attribute returned by the LDAP server, default `mail`. Each LDAP user must have at least one email address.
If multiple addresses are provided, only the first one will be used.
-`OVERLEAF_LDAP_FIRST_NAME_ATT`
* The property name holding the first name of the user which is used in the application, usually `givenName`.
-`OVERLEAF_LDAP_LAST_NAME_ATT`
* The property name holding the family name of the user which is used in the application, usually `sn`.
-`OVERLEAF_LDAP_NAME_ATT`
* The property name holding the full name of the user, usually `cn`. If either of the two previous variables is not defined,
the first and/or last name of the user is extracted from this variable. Otherwise, it is not used.
-`OVERLEAF_LDAP_PLACEHOLDER`
* The placeholder for the login form, defaults to `Username`.
-`OVERLEAF_LDAP_UPDATE_USER_DETAILS_ON_LOGIN`
* If set to `true`, updates the LDAP user `first_name` and `last_name` field on login, and turn off the user details form on the `/user/settings`
page for LDAP users. Otherwise, details will be fetched only on first login.
-`OVERLEAF_LDAP_BIND_DN`
* The distinguished name of the LDAP user that should be used for the LDAP connection
(this user should be able to search/list accounts on the LDAP server),
e.g., `cn=ldap_reader,dc=example,dc=com`. If not defined, anonymous binding is used.
-`OVERLEAF_LDAP_BIND_CREDENTIALS`
* Password for `OVERLEAF_LDAP_BIND_DN`.
-`OVERLEAF_LDAP_BIND_PROPERTY`
* Property of the user to bind against the client, defaults to `dn`.
-`OVERLEAF_LDAP_SEARCH_BASE`**(required)**
* The base DN from which to search for users. E.g., `ou=people,dc=example,dc=com`.
-`OVERLEAF_LDAP_SEARCH_FILTER`
* LDAP search filter with which to find a user. Use the literal '{{username}}' to have the given username be interpolated in for the LDAP search.
- Example: `(|(uid={{username}})(mail={{username}}))` (user can login with email or with login name).
* The scope of the search can be `base`, `one`, or `sub` (default).
-`OVERLEAF_LDAP_SEARCH_ATTRIBUTES`
* JSON array of attributes to fetch from the LDAP server, e.g., `["uid", "mail", "givenName", "sn"]`.
By default, all attributes are fetched.
-`OVERLEAF_LDAP_STARTTLS`
* If `true`, LDAP over TLS is used.
-`OVERLEAF_LDAP_TLS_OPTS_CA_PATH`
* Path to the file containing the CA certificate used to verify the LDAP server's SSL/TLS certificate. If there are multiple certificates, then
it can be a JSON array of paths to the certificates. The files must be accessible to the docker container.
- Example (one certificate): `/overleaf/certs/ldap_ca_cert.pem`
- Example (multiple certificates): `["/overleaf/certs/ldap_ca_cert1.pem", "/overleaf/certs/ldap_ca_cert2.pem"]`
-`OVERLEAF_LDAP_TLS_OPTS_REJECT_UNAUTH`
* If `true`, the server certificate is verified against the list of supplied CAs.
-`OVERLEAF_LDAP_CACHE`
* If `true`, then up to 100 credentials at a time will be cached for 5 minutes.
-`OVERLEAF_LDAP_TIMEOUT`
* How long the client should let operations live for before timing out, ms (Default: Infinity).
-`OVERLEAF_LDAP_CONNECT_TIMEOUT`
* How long the client should wait before timing out on TCP connections, ms (Default: OS default).
-`OVERLEAF_LDAP_IS_ADMIN_ATT` and `OVERLEAF_LDAP_IS_ADMIN_ATT_VALUE`
* When both environment variables are set, the login process updates `user.isAdmin = true` if the LDAP profile contains the attribute specified by
`OVERLEAF_LDAP_IS_ADMIN_ATT` and its value either matches `OVERLEAF_LDAP_IS_ADMIN_ATT_VALUE` or is an array containing `OVERLEAF_LDAP_IS_ADMIN_ATT_VALUE`,
otherwise `user.isAdmin` is set to `false`. If either of these variables is not set, then the admin status is only set to `true` during admin user
creation in Launchpad.
The following five variables are used to configure how user contacts are retrieved from the LDAP server.
-`OVERLEAF_LDAP_CONTACTS_FILTER`
* The filter used to search for users in the LDAP server to be loaded into contacts. The placeholder '{{userProperty}}' within the filter is replaced with the value of
the property specified by `OVERLEAF_LDAP_CONTACTS_PROPERTY` from the LDAP user initiating the search. If not defined, no users are retrieved from the LDAP server into contacts.
-`OVERLEAF_LDAP_CONTACTS_SEARCH_BASE`
* Specifies the base DN from which to start searching for the contacts. Defaults to `OVERLEAF_LDAP_SEARCH_BASE`.
-`OVERLEAF_LDAP_CONTACTS_SEARCH_SCOPE`
* The scope of the search can be `base`, `one`, or `sub` (default).
-`OVERLEAF_LDAP_CONTACTS_PROPERTY`
* Specifies the property of the user object that will replace the '{{userProperty}}' placeholder in the `OVERLEAF_LDAP_CONTACTS_FILTER`.
-`OVERLEAF_LDAP_CONTACTS_NON_LDAP_VALUE`
* Specifies the value of the `OVERLEAF_LDAP_CONTACTS_PROPERTY` if the search is initiated by a non-LDAP user. If this variable is not defined, the resulting filter
will match nothing. The value `*` can be used as a wildcard.
The above example results in loading into the contacts of the current LDAP user all LDAP users who have the same UNIX `gid`. Non-LDAP users will have all LDAP users with UNIX `gid=1000` in their contacts.
where `someuser` is the uid of an existing user, will always produce a non-empty search result.
As a result, **every user will be granted admin rights**, not just `someuser`, as one might expect.
</details>
</details>
</details>
<details>
<summary><h3>SAML Authentication</h3></summary>
Internally, Overleaf SAML module uses the [passport-saml](https://github.com/node-saml/passport-saml) library, most of the following
configuration options are passed through to `passport-saml`. If you are having issues configuring SAML, it is worth reading the README
for `passport-saml` to get a feel for the configuration it expects.
When using the SAML authentication method, a user is redirected to the Identity Provider (IdP) authentication site.
If the IdP successfully authenticates the user, the Overleaf users database is checked for a record containing a `samlIdentifiers` field structured as follows:
```
samlIdentifiers: [
{
externalUserId: "...",
providerId: "1",
userIdAttribute: "..."
}
]
```
The `externalUserId` must match the value of the property specified by `userIdAttribute` in the user profile returned by the IdP server.
If no matching record is found, the database is searched for a user with the primary email address matching the email in the IdP user profile:
- If such a user is found, the `hashedPassword` field is deleted to disable local authentication, and the `samlIdentifiers` field is added.
- If no matching user is found, a new user is created with the email address and `samlIdentifiers` from the IdP profile.
**Note:** Currently, only one SAML IdP is supported. The `providerId` field in `samlIdentifiers` is fixed to `'1'`.
#### Environment Variables
-`OVERLEAF_SAML_IDENTITY_SERVICE_NAME`
* Display name for the identity service, used on the login page (default: `Log in with SAML IdP`).
-`OVERLEAF_SAML_USER_ID_FIELD`
* The value of this attribute will be used by Overleaf as the external user ID, defaults to `nameID`.
-`OVERLEAF_SAML_EMAIL_FIELD`
* Name of the Email field in user profile, defaults to `nameID`.
-`OVERLEAF_SAML_FIRST_NAME_FIELD`
* Name of the firstName field in user profile, defaults to `givenName`.
-`OVERLEAF_SAML_LAST_NAME_FIELD`
* Name of the lastName field in user profile, defaults to `lastName`
-`OVERLEAF_SAML_UPDATE_USER_DETAILS_ON_LOGIN`
* If set to `true`, updates the user `first_name` and `last_name` field on login,
and turn off the user details form on `/user/settings` page.
* Expected saml response Audience, defaults to value of `OVERLEAF_SAML_ISSUER`.
-`OVERLEAF_SAML_IDP_CERT`**(required)**
* Path to a file containing the Identity Provider's public certificate, used to validate the signatures of incoming SAML responses. If the Identity Provider has multiple valid signing certificates, then
it can be a JSON array of paths to the certificates.
- Example (one certificate): `/overleaf/certs/idp_cert.pem`
- Example (multiple certificates): `["/overleaf/certs/idp_cert.pem", "/overleaf/certs/idp_cert_old.pem"]`
-`OVERLEAF_SAML_PUBLIC_CERT`
* Path to a file containing public signing certificate used to embed in auth requests in order for the IdP to validate the signatures of the incoming SAML Request. It's required when setting up the [metadata endpoint](#metadata-for-the-identity-provider)
when the strategy is configured with a `OVERLEAF_SAML_PRIVATE_KEY`. A JSON array of paths to certificates can be provided to support certificate rotation. When supplying an array of certificates, the first entry in the array should match the
current `OVERLEAF_SAML_PRIVATE_KEY`. Additional entries in the array can be used to publish upcoming certificates to IdPs before changing the `OVERLEAF_SAML_PRIVATE_KEY`.
-`OVERLEAF_SAML_PRIVATE_KEY`
* Path to a file containing a PEM-formatted private key matching the `OVERLEAF_SAML_PUBLIC_CERT` used to sign auth requests sent by passport-saml.
-`OVERLEAF_SAML_DECRYPTION_CERT`
* Path to a file containing public certificate, used for the [metadata endpoint](#metadata-for-the-identity-provider).
-`OVERLEAF_SAML_DECRYPTION_PVK`
* Path to a file containing private key matching the `OVERLEAF_SAML_DECRYPTION_CERT` that will be used to attempt to decrypt any encrypted assertions that are received.
-`OVERLEAF_SAML_SIGNATURE_ALGORITHM`
* Optionally set the signature algorithm for signing requests,
valid values are 'sha1' (default), 'sha256' (prefered), 'sha512' (most secure, check if your IdP supports it).
-`OVERLEAF_SAML_ADDITIONAL_PARAMS`
* JSON dictionary of additional query params to add to all requests.
-`OVERLEAF_SAML_ADDITIONAL_AUTHORIZE_PARAMS`
* JSON dictionary of additional query params to add to 'authorize' requests.
- Example: `{"some_key": "some_value"}`
-`OVERLEAF_SAML_IDENTIFIER_FORMAT`
* Name identifier format to request from the identity provider (default: `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`).
If using `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`, ensure the `OVERLEAF_SAML_EMAIL_FIELD` envirionment variable is defined.
If `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` is required, you must also define the `OVERLEAF_SAML_ID_FIELD` environment variable,
which can, for example, be set to the user's email address.
-`OVERLEAF_SAML_ACCEPTED_CLOCK_SKEW_MS`
* Time in milliseconds of skew that is acceptable between client and server when checking OnBefore and NotOnOrAfter assertion
condition validity timestamps. Setting to -1 will disable checking these conditions entirely. Default is 0.
*`AttributeConsumingServiceIndex` attribute to add to AuthnRequest to instruct the IdP which attribute set to attach
to the response ([link](http://blog.aniljohn.com/2014/01/data-minimization-front-channel-saml-attribute-requests.html)).
-`OVERLEAF_SAML_AUTHN_CONTEXT`
* JSON array of name identifier format values to request auth context. Default: `["urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"]`.
-`OVERLEAF_SAML_FORCE_AUTHN`
* If `true`, the initial SAML request from the service provider specifies that the IdP should force re-authentication of the user,
even if they possess a valid session.
-`OVERLEAF_SAML_DISABLE_REQUESTED_AUTHN_CONTEXT`
* If `true`, do not request a specific auth context. For example, you can this this to `true` to allow additional contexts such as password-less logins (`urn:oasis:names:tc:SAML:2.0:ac:classes:X509`). Support for additional contexts is dependant on your IdP.
-`OVERLEAF_SAML_AUTHN_REQUEST_BINDING`
* If set to `HTTP-POST`, will request authentication from IdP via HTTP POST binding, otherwise defaults to HTTP-Redirect.
-`OVERLEAF_SAML_VALIDATE_IN_RESPONSE_TO`
* If `always`, then InResponseTo will be validated from incoming SAML responses.
* If `never`, then InResponseTo won't be validated (default).
* If `ifPresent`, then InResponseTo will only be validated if present in the incoming SAML response.
-`OVERLEAF_SAML_WANT_ASSERTIONS_SIGNED` and `OVERLEAF_SAML_WANT_AUTHN_RESPONSE_SIGNED`
* When set to `true` (default), Overleaf expects the SAML Assertions, respectively the entire SAML Authentication Response, to be signed by the IdP.
When both options are `false`, at least one of the assertions or the response must be signed.
-`OVERLEAF_SAML_REQUEST_ID_EXPIRATION_PERIOD_MS`
* Defines the expiration time when a Request ID generated for a SAML request will not be valid if seen
in a SAML response in the `InResponseTo` field. Default: 28800000 (8 hours).
-`OVERLEAF_SAML_LOGOUT_URL`
* base address to call with logout requests (default: `entryPoint`).
* JSON dictionary of additional query params to add to 'logout' requests.
-`OVERLEAF_SAML_IS_ADMIN_FIELD` and `OVERLEAF_SAML_IS_ADMIN_FIELD_VALUE`
* When both environment variables are set, the login process updates `user.isAdmin = true` if the profile returned by the SAML IdP contains the attribute specified by
`OVERLEAF_SAML_IS_ADMIN_FIELD` and its value either matches `OVERLEAF_SAML_IS_ADMIN_FIELD_VALUE` or is an array containing `OVERLEAF_SAML_IS_ADMIN_FIELD_VALUE`,
otherwise `user.isAdmin` is set to `false`. If either of these variables is not set, then the admin status is only set to `true` during admin user
creation in Launchpad.
#### Metadata for the Identity Provider
The current version of Overleaf CE includes and endpoint to retrieve Service Provider Metadata: `http://my-overleaf-instance.com/saml/meta`
The Identity Provider will need to be configured to recognize the Overleaf server as a "Service Provider". Consult the documentation for your SAML server for instructions on how to do this.
Below is an example of appropriate Service Provider metadata:
Internally, Overleaf OIDC module uses the [passport-openidconnect](https://github.com/jaredhanson/passport-openidconnect) library.
If you are having issues configuring OpenID Connect, it is worth reading the README for `passport-openidconnect` to get a feel for the configuration it expects.
When using the OIDC authentication method, a user is redirected to the Identity Provider (IdP) authentication site.
If the IdP successfully authenticates the user, the Overleaf users database is checked for a record containing a `thirdPartyIdentifiers` field structured as follows:
```
thirdPartyIdentifiers: [
{
externalUserId: "...",
externalData: null,
providerId: "..."
}
]
```
The `externalUserId` must match the user ID in the profile returned by the IdP server (see the `OVERLEAF_OIDC_USER_ID_FIELD` environment variable), and `providerId`
must match the ID of the OIDC provider (see the `OVERLEAF_OIDC_PROVIDER_ID`).
If no matching record is found, the database is searched for a user with the primary email address matching the email in the IdP user profile:
- If such a user is found, the `thirdPartyIdentifiers` field is updated.
- If no matching user is found, a new user is created with the email address and `thirdPartyIdentifiers` from the IdP profile.
In both cases, the user is said to be 'linked' to the external OIDC user. The user can be unlinked from the OIDC provider on the `/user/settings` page.
#### Environment Variables
The values of the following five required variables can be found using `.well-known/openid-configuration` endpoint of your OpenID Provider (OP).
-`OVERLEAF_OIDC_ISSUER`**(required)**
-`OVERLEAF_OIDC_AUTHORIZATION_URL`**(required)**
-`OVERLEAF_OIDC_TOKEN_URL`**(required)**
-`OVERLEAF_OIDC_USER_INFO_URL`**(required)**
-`OVERLEAF_OIDC_LOGOUT_URL`**(required)**
The values of the following two required variables will be provided by the admin of your OP
-`OVERLEAF_OIDC_CLIENT_ID`**(required)**
-`OVERLEAF_OIDC_CLIENT_SECRET`**(required)**
-`OVERLEAF_OIDC_SCOPE`
* Default: `openid profile email`
-`OVERLEAF_OIDC_PROVIDER_ID`
* Arbitrary ID of the OP, defaults to `oidc`.
-`OVERLEAF_OIDC_PROVIDER_NAME`
* The name of the OP, used in the `Linked Accounts` section of the `/user/settings` page, defaults to `OIDC Provider`.
-`OVERLEAF_OIDC_IDENTITY_SERVICE_NAME`
* Display name for the identity service, used on the login page (default: `Log in with $OVERLEAF_OIDC_PROVIDER_NAME`).
-`OVERLEAF_OIDC_PROVIDER_DESCRIPTION`
* Description of OP, used in the `Linked Accounts` section (default: `Log in with $OVERLEAF_OIDC_PROVIDER_NAME`).
-`OVERLEAF_OIDC_PROVIDER_INFO_LINK`
*`Learn more` URL in the OP description, default: no `Learn more` link in the description.
-`OVERLEAF_OIDC_PROVIDER_HIDE_NOT_LINKED`
* Do not show OP on the `/user/settings` page, if the user's account is not linked with the OP, default `false`.
-`OVERLEAF_OIDC_USER_ID_FIELD`
* The value of this attribute will be used by Overleaf as the external user ID, defaults to `id`.
Other possible reasonable values are `email` and `username` (corresponding to `preferred_username` OIDC claim).
-`OVERLEAF_OIDC_UPDATE_USER_DETAILS_ON_LOGIN`
* If set to `true`, updates the user `first_name` and `last_name` field on login,
and disables the user details form on `/user/settings` page.
-`OVERLEAF_OIDC_IS_ADMIN_FIELD` and `OVERLEAF_OIDC_IS_ADMIN_FIELD_VALUE`
* When both environment variables are set, the login process updates `user.isAdmin = true` if the profile returned by the OP contains the attribute specified by
`OVERLEAF_OIDC_IS_ADMIN_FIELD` and its value matches `OVERLEAF_OIDC_IS_ADMIN_FIELD_VALUE`, otherwise `user.isAdmin` is set to `false`.
If `OVERLEAF_OIDC_IS_ADMIN_FIELD` is `email` then the value of the attribute `emails[0].value` is used for match checking.
The redirect URL for your OpenID Provider is `https://my-overleaf-instance.com/oidc/login/callback`.
> If Docker is running out of RAM while building the services in parallel, create a `.env` file in this directory containing `COMPOSE_PARALLEL_LIMIT=1`.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.