Repository navigation
Roq Editor: use SSH agent for git sync and remove passphrase from JSON-RPC - #933
Merged
ia3andy merged 2 commits intoMay 23, 2026
Merged
Conversation
|
🙈 The PR is closed and the preview is expired. |
This comment was marked as outdated.
This comment was marked as outdated.
omatheusmesmo
force-pushed
the
feat/editor-ssh-agent-git-sync
branch
from
May 22, 2026 18:24
5433049 to
a95d2d6
Compare
omatheusmesmo
marked this pull request as draft
May 22, 2026 18:39
omatheusmesmo
force-pushed
the
feat/editor-ssh-agent-git-sync
branch
from
May 22, 2026 22:16
a95d2d6 to
c93332a
Compare
omatheusmesmo
marked this pull request as ready for review
May 22, 2026 23:57
ia3andy
approved these changes
May 23, 2026
ia3andy
left a comment
Collaborator
There was a problem hiding this comment.
Awesome it works like a charm!
Collaborator
|
@omatheusmesmo could you fetch and rebase ? i will release today |
Collaborator
|
I think it's just a moved file AFAIK |
Contributor
Author
Thanks!
Sure, give me a few minutes. |
Collaborator
|
@copilot resolve the merge conflicts in this pull request |
…-RPC The editor git sync no longer sends SSH passphrases from the browser over JSON-RPC. JGit now uses the system SSH agent (macOS Keychain, ssh-agent, Pageant) via ConnectorFactory, with an optional server-side EDITOR_SYNC_SSH_PASSPHRASE fallback for passphrase-protected keys without an agent. - Enable SSH agent support in GitTransportHelper - Add editor.sync.ssh-passphrase config (JsonIgnore, never sent to the browser) - Remove the passphrase parameter from GitSyncService, the JSON-RPC actions and the Dev UI; drop the passphrase dialog and point auth failures to config - Validate publish filePaths through GitContentFilter so only content-directory files can be staged via the editor * Fix quarkiverse#925 Signed-off-by: Matheus Oliveira <[email protected]>
…ng and test - Remove configuredPassphrase parameter from private methods, read field directly - Add LOG.debug when SSH agent ConnectorFactory is not found via ServiceLoader - Add test for lastAuthFailed recovery (successful fetch clears the flag) - Fix stale @PARAM javadoc entries Signed-off-by: Matheus Oliveira <[email protected]>
omatheusmesmo
force-pushed
the
feat/editor-ssh-agent-git-sync
branch
from
May 23, 2026 15:14
451a27d to
44d90c8
Compare
ia3andy
approved these changes
May 23, 2026
mathecruz
pushed a commit
to mathecruz/quarkus-roq
that referenced
this pull request
Jun 25, 2026
…N-RPC (quarkiverse#933) * feat: Use SSH agent for editor git sync and drop passphrase from JSON-RPC The editor git sync no longer sends SSH passphrases from the browser over JSON-RPC. JGit now uses the system SSH agent (macOS Keychain, ssh-agent, Pageant) via ConnectorFactory, with an optional server-side EDITOR_SYNC_SSH_PASSPHRASE fallback for passphrase-protected keys without an agent. - Enable SSH agent support in GitTransportHelper - Add editor.sync.ssh-passphrase config (JsonIgnore, never sent to the browser) - Remove the passphrase parameter from GitSyncService, the JSON-RPC actions and the Dev UI; drop the passphrase dialog and point auth failures to config - Validate publish filePaths through GitContentFilter so only content-directory files can be staged via the editor * Fix quarkiverse#925 Signed-off-by: Matheus Oliveira <[email protected]> * Review improvements: remove passphrase parameter threading, add logging and test - Remove configuredPassphrase parameter from private methods, read field directly - Add LOG.debug when SSH agent ConnectorFactory is not found via ServiceLoader - Add test for lastAuthFailed recovery (successful fetch clears the flag) - Fix stale @PARAM javadoc entries Signed-off-by: Matheus Oliveira <[email protected]> --------- Signed-off-by: Matheus Oliveira <[email protected]> Co-authored-by: Andy Damevin <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe your changes
The git sync feature previously prompted for the SSH passphrase via a dialog in
the Dev UI and sent it over JSON-RPC to the server. This exposes credentials
through the browser unnecessarily.
This PR removes the passphrase from the client-server interface entirely and
replaces it with two server-side mechanisms, in priority order:
SSH agent - JGit now connects to the system SSH agent (
ssh-agent, macOS Keychain, Pageant) viaConnectorFactory. The factory is loaded using the deployment classloader explicitly, which fixes a ServiceLoader visibility issue in Quarkus that causedConnectorFactory.getDefault()to silently return null and fall back to direct key loading.EDITOR_SYNC_SSH_PASSPHRASEenv var - a server-side-only fallback for passphrase-protected keys when no SSH agent is running. The property is annotated@JsonIgnoreso it is never serialized to the browser viaaddBuildTimeData.Other changes included:
lastAuthFailedvolatile field preserves auth-failed status acrossskipFetchpolls (previously, auth failure reverted to "up to date" on next poll without a real fetch)filePathsin publish are now filtered throughGitContentFilterbefore staging, preventing accidental commits of files outside the content directory