-
Notifications
You must be signed in to change notification settings - Fork 611
[WIP] switch to yhub as a collab backend #2556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dmonad
wants to merge
24
commits into
main
Choose a base branch
from
yhub
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3bc372c
♻️(collaboration) switch collaboration server from hocuspocus to yhub
dmonad c6a0695
📄(collaboration) add license notice for yhub-server directory
dmonad ffc6627
✨(backend) add a service generating cached RS256 JWT tokens
lunika bcad65a
✨(backend) publish the JWT public key on a JWKS endpoint
lunika 80cf998
✨(backend) add a method to create a dedicated admin token
lunika d2b4c00
🔧(dev) generate the JWT signing key when bootstrapping the dev stack
lunika 1b49a4f
🔥(ci) remove checking print statement in lint-git
lunika 9030c3f
🔥(backend) remove `CollaborationService` and `can-edit` endpoint
lunika 0414067
✨(collaboration) add admin reset-connections endpoint on yhub 0.4.0
dmonad a24ca5a
🛂(django) use jwt token for converter services
AntoLC 4632ba8
🛂(y-provider) verify jwt token instead of the shared api key
AntoLC 0fb5d69
🔥(helm) remove occurences of Y_PROVIDER_API_KEY
AntoLC 7ca5ffa
🛂(backend) add audience to jwt
AntoLC 64b46de
✨(collaboration) add create-ydoc endpoint on yhub
dmonad 123e8de
🔒️(collaboration) harden the create-ydoc endpoint
dmonad 10eb434
🔥(frontend) remove "can-edit" mechanism
AntoLC ebacc97
🔥(project) remove occurences of COLLABORATION_SERVER_SECRET
AntoLC f575b42
🔥(frontend) remove content GET PATCH
AntoLC c57d5a1
🙈(dev) ignore playwright-mcp browser artifacts
dmonad 2426375
✨(collaboration) soft-migrate legacy S3 documents into yhub
dmonad c0151a3
📝(changelog) note that get-connections is dropped, not deferred
dmonad a21b8fa
🔒️(collaboration) reject admin jwts not issued for the yhub audience
dmonad a9c4f6c
✨(collaboration) replay legacy s3 version history into yhub
dmonad 38013cb
✅(collaboration) test the legacy migrations against a real yhub
dmonad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Generate the RSA private key signing the JWT tokens issued by the backend. | ||
| # | ||
| # Development only. The key is generated locally and never committed: it lands | ||
| # in "data/", which is gitignored. The dev stack mounts it in the backend | ||
| # containers, where JWT_PRIVATE_KEY_FILE points at it. | ||
| # | ||
| # Idempotent: an existing key is kept. Delete the file to roll the key. | ||
|
|
||
| set -eo pipefail | ||
|
|
||
| REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | ||
| KEY_PATH="${REPO_DIR}/data/jwt/private.pem" | ||
|
|
||
| if [ -f "${KEY_PATH}" ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| mkdir -p "$(dirname "${KEY_PATH}")" | ||
| openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out "${KEY_PATH}" 2>/dev/null | ||
| chmod 600 "${KEY_PATH}" | ||
| echo "✓ JWT private key generated in ${KEY_PATH}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Sensitive Data Exposure (CWE-732): Incorrect Permission Assignment for Critical Resource
Reachability: Internal
Create the private key with restrictive permissions.
If a shared development host uses a permissive umask and another user can traverse
data/jwt, line 21 creates the private key before line 22 restricts it. A local attacker can read the key during that interval and mint JWTs accepted by yhub. Setumask 077before creating the directory and key.Proposed fix
set -eo pipefail +umask 077 REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"🤖 Prompt for AI Agents