Skip to content

docs: architecture guide#1391

Open
jescalada wants to merge 38 commits intomainfrom
1325-architecture-guide-draft
Open

docs: architecture guide#1391
jescalada wants to merge 38 commits intomainfrom
1325-architecture-guide-draft

Conversation

@jescalada
Copy link
Contributor

Closes #1325. Previous PR (#1335) got stuck because of a GitHub bug where comments on orphaned commits cannot be closed.

Previous PR description:

The architecture diagram can be edited from this file on diagrams.net
GitProxy_Architecture.drawio

To-do

  • Add section for authentication methods
  • Add section for databases
  • Add plugin guide
  • Add deployment guide - to be added later by @tabathad
  • Fix all the to-dos

jescalada and others added 30 commits December 27, 2025 16:03
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Kris West <kristopher.west@natwest.com>
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 7, 2026
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@netlify
Copy link

netlify bot commented Feb 7, 2026

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 734a7a5
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/698a00f437e8530008e644ce

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.34%. Comparing base (6fb63d0) to head (734a7a5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1391   +/-   ##
=======================================
  Coverage   81.34%   81.34%           
=======================================
  Files          65       65           
  Lines        4648     4648           
  Branches      792      792           
=======================================
  Hits         3781     3781           
  Misses        852      852           
  Partials       15       15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some corrections, questions and updates for open PRs expected to be merged shortly for the v2 release.

- [`preReceive`](#prereceive)
- [`getDiff`](#getdiff)
- [`gitleaks`](#gitleaks)
- [`clearBareClone`](#clearbareclone)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`clearBareClone`](#clearbareclone)

Removing this from the chain in #1393 and conditionally triggering it based on whether pullRemote succeeded

Comment on lines +98 to +100
After processors in the chain are done executing, [`audit`](#audit) is called to store the action along with all of its execution steps in the database for auditing purposes.

Then, if the action was auto-approved or auto-rejected as a result of running [`preReceive`](#prereceive), it will attempt to auto-approve or auto-reject it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After processors in the chain are done executing, [`audit`](#audit) is called to store the action along with all of its execution steps in the database for auditing purposes.
Then, if the action was auto-approved or auto-rejected as a result of running [`preReceive`](#prereceive), it will attempt to auto-approve or auto-reject it.
After processors in the chain are done executing, [`audit`](#audit) is called to store the action along with all of its execution steps in the database for auditing purposes.
If [`pullRemote`](#pullremote) ran successfully and cloned the repository, then [`clearBareClone`](#clearbareclone) is run to clear up that clone, freeing disk space and ensuring that the _.remote/*_ folder created does not conflict with any future pushes involving the same SHA.
Finally, if the action was auto-approved or auto-rejected as a result of running [`preReceive`](#prereceive), it will attempt to auto-approve or auto-reject it.


Action chains are a list of processors that a Git operation goes through before awaiting approval. Three action chains are currently available:

#### Push action chain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pre-processer parseAction doesn't get a mention. I think some content on it is necessary, particularly as it classifies requests (push/pull/default) and hence control what subsequent steps run.

#1393 also pulls out audit and clearBareClone into a post-processors folder as they don't quite fit as pure push processors (audit is now applied to everything, clearBareClone isn't part of the chain now but conditionally invoked by it if pullRemote was)


Executed when a user makes a `git clone` or `git pull` to GitProxy:

- [`checkRepoInAuthorisedList`](#checkrepoinauthorisedlist)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`checkRepoInAuthorisedList`](#checkrepoinauthorisedlist)
- [`checkRepoInAuthorisedList`](#checkrepoinauthorisedlist)
-
At present the pull action chain is only checking that the repository is configured in Git Proxy, ensuring that it will block pull requests for unknown repositories.


This chain is executed when making any operation other than a `git push` or `git pull`.

- [`checkRepoInAuthorisedList`](#checkrepoinauthorisedlist)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`checkRepoInAuthorisedList`](#checkrepoinauthorisedlist)
- [`checkRepoInAuthorisedList`](#checkrepoinauthorisedlist)
-
At present the default action chain is only checking that the repository is configured in Git Proxy, ensuring that it will block all git client requests for unknown repositories.


#### `contactEmail`

Sets the contact email for the Open Source Program Office in the attestation form:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Sets the contact email for the Open Source Program Office in the attestation form:
Sets the contact email for the Open Source Program Office (or equivalent organisational contact) in the attestation form:


#### `authorisedList`

Defines a list of repositories that are allowed to be pushed to through the proxy. Note that **repositories can also be added through the UI or manually editing the database**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Defines a list of repositories that are allowed to be pushed to through the proxy. Note that **repositories can also be added through the UI or manually editing the database**.
Defines a initial list of repositories that are allowed to be pushed to through the proxy. Note that **repositories can also be added through the UI, API or by manually editing the database**.


##### Setting up JWT Authentication

When JWT authentication is enabled, all incoming requests must provide a valid JWT access token in the UI. This can be set in the settings tab.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify what type of request - presumably the API (rather than the git proxy interface)


When JWT authentication is enabled, all incoming requests must provide a valid JWT access token in the UI. This can be set in the settings tab.

If no token, or an invalid/expired token is set, requests will fail with a `401` Unauthorized response.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If no token, or an invalid/expired token is set, requests will fail with a `401` Unauthorized response.
If no token, or an invalid/expired token is sent, requests will fail with a `401` Unauthorized response.


#### `tls`

Allows configuring TLS (Transport Layer Security) **for the proxy** (not for the API):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Allows configuring TLS (Transport Layer Security) **for the proxy** (not for the API):
Allows configuring TLS (Transport Layer Security) **for the proxy** (rather than for the API or UI):

A pointer on how to configure for the API & UI would be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document internal architecture, contributing & hacking on Git Proxy

2 participants