Skip to content

[Feature] Securely Retain User SSH Key in Git Proxy for Post-Approval Actions: Private Key Cleanup #50

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
dcoric opened this issue May 16, 2025 · 0 comments
Assignees

Comments

@dcoric
Copy link
Collaborator

dcoric commented May 16, 2025

Description

When a user pushes code via the Git Proxy, they authenticate with their SSH key, which is also required for the final push to the remote repository (e.g., GitHub/GitLab). Currently, after approval, the user must manually re-authenticate. To automate this, the proxy must securely retain the user's SSH key during approval and reuse it for the final push—without exposing it or requiring user re-entry.

Key Requirements

1. Key Reuse for Push

  • Once approved, the proxy uses the same key to push to the remote repo
  • Immediately wipe the key after push (success or failure)

2. Security Constraints

  • No long-term storage: Keys are discarded if:
    • Approval is rejected
    • Approval timeout (e.g., 24 hours) is reached
  • Isolation: Keys are never accessible to other users/processes

3. Audit Trail

  • Log key usage: [PROXY] Push executed with key for user:X, request:Y, approved-by:Z

Task

  • Implement automatic key removal after action completion
  • Add cleanup on action rejection/cancellation
  • Add cleanup on action timeout
  • Acceptance Criteria:
    • Private key is removed after action completes
    • Key is removed if action is rejected/canceled
    • No keys are left in the system after action is done
@dcoric dcoric self-assigned this May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant