You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address code review feedback: use git-proxy.yml, add env vars, remove GitHub auth filter, use info log
- Changed config files from application.yml/application-local.yml to git-proxy.yml/git-proxy-local.yml for Jetty separation from Spring
- Added environment variable override support with GITPROXY_ prefix (GITPROXY_SERVER_PORT, GITPROXY_GITPROXY_BASEPATH)
- Removed GitHubUserAuthenticatedFilter entirely (GitHub enforces auth itself, proxy forwards errors transparently)
- Changed disabled provider log level from debug to info for better visibility
- Updated CONFIGURATION.md to document new file names and environment variable support
- Removed GitHub authentication filter from config examples
Co-authored-by: coopernetes <57812123+coopernetes@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CONFIGURATION.md
+15-27Lines changed: 15 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,24 @@
1
1
# Configuration Guide
2
2
3
-
The Jetty-based GitProxy server supports configuration via YAML files. This allows you to configure providers, filters, and other server settings without modifying code.
3
+
The Jetty-based GitProxy server supports configuration via YAML files and environment variables. This allows you to configure providers, filters, and other server settings without modifying code.
4
4
5
5
## Configuration Files
6
6
7
7
The server loads configuration from the following files in order:
8
-
1.`src/main/resources/application.yml` - Base configuration
9
-
2.`src/main/resources/application-local.yml` - Local overrides (merged with base)
8
+
1.`src/main/resources/git-proxy.yml` - Base configuration
9
+
2.`src/main/resources/git-proxy-local.yml` - Local overrides (merged with base)
10
+
3. Environment variables with `GITPROXY_` prefix
10
11
11
-
Configuration from `application-local.yml` will override or extend settings from `application.yml`.
12
+
Configuration from `git-proxy-local.yml` will override or extend settings from `git-proxy.yml`, and environment variables will override both.
13
+
14
+
## Environment Variable Overrides
15
+
16
+
You can override certain configuration values using environment variables with the `GITPROXY_` prefix:
17
+
18
+
-`GITPROXY_SERVER_PORT`: Override the server port (e.g., `GITPROXY_SERVER_PORT=9090`)
19
+
-`GITPROXY_GITPROXY_BASEPATH`: Override the base path (e.g., `GITPROXY_GITPROXY_BASEPATH=/proxy`)
20
+
21
+
Note: Whitelist configurations are not supported via environment variables due to their complex structure.
12
22
13
23
## Server Configuration
14
24
@@ -61,29 +71,7 @@ git-proxy:
61
71
62
72
Filters control access to repositories and enforce policies.
63
73
64
-
### GitHub User Authentication Filter
65
-
66
-
Requires authentication for GitHub operations.
67
-
68
-
```yaml
69
-
git-proxy:
70
-
filters:
71
-
github-user-authenticated:
72
-
enabled: true
73
-
order: 1
74
-
operations:
75
-
- PUSH
76
-
required-auth-schemes: bearer, token, basic # Can be comma-separated or list
77
-
providers:
78
-
- github
79
-
```
80
-
81
-
Options:
82
-
- `enabled` (boolean): Enable/disable the filter
83
-
- `order` (int): Filter execution order (lower numbers run first)
84
-
- `operations` (list): Git operations to apply filter to (PUSH, FETCH)
- `providers` (list): Provider names to apply filter to
74
+
Note: GitHub already enforces authentication for push operations using personal access tokens (PATs). The proxy transparently forwards requests upstream and returns errors from GitHub directly, so authentication checking is handled by GitHub itself.
0 commit comments