From cf12f8d52b01fd26e60412c76bc7d6cc0154c9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C4=86ori=C4=87?= Date: Wed, 29 Apr 2026 13:06:25 +0200 Subject: [PATCH 1/6] feat(config): require merged top-level defaults --- src/config/index.ts | 89 ++++++++++++++++++++++++++++++++--------- src/service/index.ts | 4 +- test/testConfig.test.ts | 24 +++++++++++ 3 files changed, 95 insertions(+), 22 deletions(-) diff --git a/src/config/index.ts b/src/config/index.ts index 0d4591300..89c3cfd40 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -25,8 +25,55 @@ import { getConfigFile } from './file'; import { validateConfig } from './validators'; import { handleErrorAndLog, handleErrorAndThrow } from '../utils/errors'; +// Deprecated compatibility fields are still optional because the defaults do not set them. +type OptionalTopLevelConfigKey = 'proxyUrl' | 'sslCertPemPath' | 'sslKeyPemPath'; +type RequiredTopLevelConfigKey = Exclude; + +export type FullGitProxyConfig = Required> & + Pick; + +const REQUIRED_TOP_LEVEL_CONFIG_KEYS = [ + 'api', + 'apiAuthentication', + 'attestationConfig', + 'authentication', + 'authorisedList', + 'commitConfig', + 'configurationSources', + 'contactEmail', + 'cookieSecret', + 'csrfProtection', + 'domains', + 'plugins', + 'privateOrganizations', + 'rateLimit', + 'sessionMaxAgeHours', + 'sink', + 'tempPassword', + 'tls', + 'uiRouteAuth', + 'urlShortener', +] as const satisfies readonly RequiredTopLevelConfigKey[]; + +type MissingRequiredTopLevelConfigKeys = Exclude< + RequiredTopLevelConfigKey, + (typeof REQUIRED_TOP_LEVEL_CONFIG_KEYS)[number] +>; +type AssertNever = T; +type _RequiredTopLevelConfigKeysAreExhaustive = AssertNever; + +function assertHasRequiredTopLevelConfig( + config: GitProxyConfig, +): asserts config is FullGitProxyConfig { + const missingKeys = REQUIRED_TOP_LEVEL_CONFIG_KEYS.filter((key) => config[key] === undefined); + + if (missingKeys.length > 0) { + throw new Error(`Missing required top-level configuration values: ${missingKeys.join(', ')}`); + } +} + // Cache for current configuration -let _currentConfig: GitProxyConfig | null = null; +let _currentConfig: FullGitProxyConfig | null = null; let _configLoader: ConfigLoader | null = null; // Function to invalidate cache - useful for testing @@ -57,9 +104,9 @@ function cleanUndefinedValues(obj: any): any { /** * Load and merge default + user configuration with QuickType validation - * @return {GitProxyConfig} The merged and validated configuration + * @return {FullGitProxyConfig} The merged and validated configuration */ -function loadFullConfiguration(): GitProxyConfig { +function loadFullConfiguration(): FullGitProxyConfig { if (_currentConfig) { return _currentConfig; } @@ -67,7 +114,7 @@ function loadFullConfiguration(): GitProxyConfig { const rawDefaultConfig = Convert.toGitProxyConfig(JSON.stringify(defaultSettings)); // Clean undefined values from defaultConfig - const defaultConfig = cleanUndefinedValues(rawDefaultConfig); + const defaultConfig = cleanUndefinedValues(rawDefaultConfig) as GitProxyConfig; let userSettings: Partial = {}; const userConfigFile = process.env.CONFIG_FILE || getConfigFile(); @@ -102,12 +149,12 @@ function loadFullConfiguration(): GitProxyConfig { * Merge configurations with environment variable overrides * @param {GitProxyConfig} defaultConfig - The default configuration * @param {Partial} userSettings - User-provided configuration overrides - * @return {GitProxyConfig} The merged configuration + * @return {FullGitProxyConfig} The merged configuration */ function mergeConfigurations( defaultConfig: GitProxyConfig, userSettings: Partial, -): GitProxyConfig { +): FullGitProxyConfig { // Special handling for TLS configuration when legacy fields are used let tlsConfig = userSettings.tls || defaultConfig.tls; @@ -121,7 +168,7 @@ function mergeConfigurations( }; } - return { + const config = { ...defaultConfig, ...userSettings, // Deep merge for specific objects @@ -141,6 +188,9 @@ function mergeConfigurations( userSettings.cookieSecret || defaultConfig.cookieSecret, }; + + assertHasRequiredTopLevelConfig(config); + return config; } // Get configured proxy URL @@ -152,7 +202,7 @@ export const getProxyUrl = (): string | undefined => { // Gets a list of authorised repositories export const getAuthorisedList = () => { const config = loadFullConfiguration(); - return config.authorisedList || []; + return config.authorisedList; }; // Gets a list of authorised repositories @@ -164,7 +214,7 @@ export const getTempPasswordConfig = () => { // Gets the configured data sink, defaults to filesystem export const getDatabase = () => { const config = loadFullConfiguration(); - const databases = config.sink || []; + const databases = config.sink; for (const db of databases) { if (db.enabled) { @@ -187,7 +237,7 @@ export const getDatabase = () => { */ export const getAuthMethods = () => { const config = loadFullConfiguration(); - const authSources = config.authentication || []; + const authSources = config.authentication; const enabledAuthMethods = authSources.filter((auth) => auth.enabled); @@ -206,7 +256,7 @@ export const getAuthMethods = () => { */ export const getAPIAuthMethods = () => { const config = loadFullConfiguration(); - const apiAuthSources = config.apiAuthentication || []; + const apiAuthSources = config.apiAuthentication; return apiAuthSources.filter((auth: { enabled: any }) => auth.enabled); }; @@ -227,7 +277,7 @@ export const logConfiguration = () => { export const getAPIs = () => { const config = loadFullConfiguration(); - return config.api || {}; + return config.api; }; export const getCookieSecret = (): string => { @@ -242,25 +292,25 @@ export const getCookieSecret = (): string => { export const getSessionMaxAgeHours = (): number => { const config = loadFullConfiguration(); - return config.sessionMaxAgeHours || 24; + return config.sessionMaxAgeHours; }; // Get commit related configuration export const getCommitConfig = () => { const config = loadFullConfiguration(); - return config.commitConfig || {}; + return config.commitConfig; }; // Get attestation related configuration export const getAttestationConfig = () => { const config = loadFullConfiguration(); - return config.attestationConfig || {}; + return config.attestationConfig; }; // Get private organizations related configuration export const getPrivateOrganizations = () => { const config = loadFullConfiguration(); - return config.privateOrganizations || []; + return config.privateOrganizations; }; // Get URL shortener @@ -284,7 +334,7 @@ export const getCSRFProtection = (): boolean | undefined => { // Get loadable push plugins export const getPlugins = () => { const config = loadFullConfiguration(); - return config.plugins || []; + return config.plugins; }; export const getTLSKeyPemPath = (): string | undefined => { @@ -304,12 +354,12 @@ export const getTLSEnabled = (): boolean => { export const getDomains = () => { const config = loadFullConfiguration(); - return config.domains || {}; + return config.domains; }; export const getUIRouteAuth = () => { const config = loadFullConfiguration(); - return config.uiRouteAuth || {}; + return config.uiRouteAuth; }; export const getRateLimit = () => { @@ -331,6 +381,7 @@ const handleConfigUpdate = async (newConfig: Configuration) => { await proxy.stop(); // 4. Update config + assertHasRequiredTopLevelConfig(validatedConfig); _currentConfig = validatedConfig; // 5. Restart services with new config diff --git a/src/service/index.ts b/src/service/index.ts index b8ee756b8..d2762be67 100644 --- a/src/service/index.ts +++ b/src/service/index.ts @@ -33,8 +33,6 @@ const limiter = rateLimit(config.getRateLimit()); const { GIT_PROXY_UI_PORT: uiPort } = serverConfig; -const DEFAULT_SESSION_MAX_AGE_HOURS = 12; - const app: Express = express(); let _httpServer: http.Server | null = null; @@ -143,7 +141,7 @@ async function createApp(proxy: Proxy): Promise { cookie: { secure: 'auto', httpOnly: true, - maxAge: (config.getSessionMaxAgeHours() || DEFAULT_SESSION_MAX_AGE_HOURS) * 60 * 60 * 1000, + maxAge: config.getSessionMaxAgeHours() * 60 * 60 * 1000, }, }), ); diff --git a/test/testConfig.test.ts b/test/testConfig.test.ts index a886183fd..cf1e00274 100644 --- a/test/testConfig.test.ts +++ b/test/testConfig.test.ts @@ -36,6 +36,7 @@ describe('default configuration', () => { expect(config.getAuthMethods()).toEqual(enabledMethods); expect(config.getDatabase()).toEqual(defaultSettings.sink[0]); expect(config.getTempPasswordConfig()).toEqual(defaultSettings.tempPassword); + expect(config.getProxyUrl()).toBeUndefined(); expect(config.getAuthorisedList()).toEqual(defaultSettings.authorisedList); expect(config.getRateLimit()).toEqual(defaultSettings.rateLimit); expect(config.getTLSKeyPemPath()).toEqual(defaultSettings.tls.key); @@ -46,8 +47,15 @@ describe('default configuration', () => { expect(config.getContactEmail()).toEqual(defaultSettings.contactEmail); expect(config.getPlugins()).toEqual(defaultSettings.plugins); expect(config.getCSRFProtection()).toEqual(defaultSettings.csrfProtection); + expect(config.getSessionMaxAgeHours()).toEqual(defaultSettings.sessionMaxAgeHours); + expect(config.getCommitConfig()).toEqual(defaultSettings.commitConfig); expect(config.getAttestationConfig()).toEqual(defaultSettings.attestationConfig); expect(config.getAPIs()).toEqual(defaultSettings.api); + expect(config.getAPIAuthMethods()).toEqual( + defaultSettings.apiAuthentication.filter((method) => method.enabled), + ); + expect(config.getPrivateOrganizations()).toEqual(defaultSettings.privateOrganizations); + expect(config.getUIRouteAuth()).toEqual(defaultSettings.uiRouteAuth); }); }); @@ -261,6 +269,22 @@ describe('user configuration', () => { expect(config.getAPIs()).toEqual(user.api); }); + it('should keep default top-level config values when user config only overrides one entry', async () => { + const user = { + sessionMaxAgeHours: 6, + }; + fs.writeFileSync(tempUserFile, JSON.stringify(user)); + + const config = await import('../src/config'); + config.invalidateCache(); + + expect(config.getSessionMaxAgeHours()).toBe(user.sessionMaxAgeHours); + expect(config.getCommitConfig()).toEqual(defaultSettings.commitConfig); + expect(config.getAttestationConfig()).toEqual(defaultSettings.attestationConfig); + expect(config.getPrivateOrganizations()).toEqual(defaultSettings.privateOrganizations); + expect(config.getUIRouteAuth()).toEqual(defaultSettings.uiRouteAuth); + }); + it('should override default settings for cookieSecret if env var is used', async () => { fs.writeFileSync(tempUserFile, '{}'); process.env.GIT_PROXY_COOKIE_SECRET = 'test-cookie-secret'; From e5f1d8235d457e09b2b7147975048b174f923599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C4=86ori=C4=87?= Date: Wed, 29 Apr 2026 14:35:37 +0200 Subject: [PATCH 2/6] test(config): cover required defaults handling --- src/config/index.ts | 6 +- test/testConfig.test.ts | 119 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 111 insertions(+), 14 deletions(-) diff --git a/src/config/index.ts b/src/config/index.ts index 89c3cfd40..75960c6c0 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -62,7 +62,7 @@ type MissingRequiredTopLevelConfigKeys = Exclude< type AssertNever = T; type _RequiredTopLevelConfigKeysAreExhaustive = AssertNever; -function assertHasRequiredTopLevelConfig( +export function assertHasRequiredTopLevelConfig( config: GitProxyConfig, ): asserts config is FullGitProxyConfig { const missingKeys = REQUIRED_TOP_LEVEL_CONFIG_KEYS.filter((key) => config[key] === undefined); @@ -375,7 +375,7 @@ const handleConfigUpdate = async (newConfig: Configuration) => { const validatedConfig = Convert.toGitProxyConfig(JSON.stringify(newConfig)); // 2. Get proxy module dynamically to avoid circular dependency - const proxy = require('../proxy'); + const proxy = (await import('../proxy')) as any; // 3. Stop existing services await proxy.stop(); @@ -392,7 +392,7 @@ const handleConfigUpdate = async (newConfig: Configuration) => { handleErrorAndLog(error, 'Failed to apply new configuration'); // Attempt to restart with previous config try { - const proxy = require('../proxy'); + const proxy = (await import('../proxy')) as any; await proxy.start(); } catch (startError: unknown) { handleErrorAndLog(startError, 'Failed to restart services'); diff --git a/test/testConfig.test.ts b/test/testConfig.test.ts index cf1e00274..688e9d322 100644 --- a/test/testConfig.test.ts +++ b/test/testConfig.test.ts @@ -426,24 +426,29 @@ describe('Configuration Update Handling', () => { let tempUserFile: string; let oldEnv: NodeJS.ProcessEnv; + const waitForMockCall = async (mock: MockInstance, callCount = 1) => { + for (let i = 0; i < 20; i += 1) { + if (mock.mock.calls.length >= callCount) { + return; + } + await new Promise((resolve) => setTimeout(resolve, 10)); + } + }; + beforeEach(() => { oldEnv = { ...process.env }; tempDir = fs.mkdtempSync('gitproxy-test'); tempUserFile = path.join(tempDir, 'test-settings.json'); + process.env.CONFIG_FILE = tempUserFile; configFile.setConfigFile(tempUserFile); }); it('should test ConfigLoader initialization', async () => { const configWithSources = { + ...defaultSettings, configurationSources: { enabled: true, - sources: [ - { - type: 'file', - enabled: true, - path: tempUserFile, - }, - ], + sources: [], }, }; @@ -481,15 +486,98 @@ describe('Configuration Update Handling', () => { consoleErrorSpy.mockRestore(); }); - afterEach(() => { - if (fs.existsSync(tempUserFile)) { - fs.rmSync(tempUserFile, { force: true }); + it('should apply valid configuration updates from external sources', async () => { + const updatedConfigFile = path.join(tempDir, 'updated-settings.json'); + const proxyStop = vi.fn().mockResolvedValue(undefined); + const proxyStart = vi.fn().mockResolvedValue(undefined); + vi.doMock('../src/proxy', () => ({ + stop: proxyStop, + start: proxyStart, + })); + + const configWithSources = { + configurationSources: { + enabled: true, + sources: [ + { + type: 'file', + enabled: true, + path: updatedConfigFile, + }, + ], + }, + }; + const updatedConfig = { + ...defaultSettings, + configurationSources: configWithSources.configurationSources, + sessionMaxAgeHours: 8, + }; + + fs.writeFileSync(tempUserFile, JSON.stringify(configWithSources)); + fs.writeFileSync(updatedConfigFile, JSON.stringify(updatedConfig)); + + const config = await import('../src/config'); + + await waitForMockCall(proxyStart); + + expect(proxyStop).toHaveBeenCalledTimes(1); + expect(proxyStart).toHaveBeenCalledTimes(1); + expect(config.getSessionMaxAgeHours()).toBe(updatedConfig.sessionMaxAgeHours); + }); + + it('should restart the proxy with the previous config when updates fail', async () => { + const updatedConfigFile = path.join(tempDir, 'updated-settings.json'); + const proxyStop = vi.fn().mockRejectedValue(new Error('stop failed')); + const proxyStart = vi.fn().mockResolvedValue(undefined); + vi.doMock('../src/proxy', () => ({ + stop: proxyStop, + start: proxyStart, + })); + const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {}); + + const configWithSources = { + configurationSources: { + enabled: true, + sources: [ + { + type: 'file', + enabled: true, + path: updatedConfigFile, + }, + ], + }, + }; + const updatedConfig = { + ...defaultSettings, + configurationSources: configWithSources.configurationSources, + sessionMaxAgeHours: 8, + }; + + fs.writeFileSync(tempUserFile, JSON.stringify(configWithSources)); + fs.writeFileSync(updatedConfigFile, JSON.stringify(updatedConfig)); + + try { + await import('../src/config'); + + await waitForMockCall(proxyStart); + + expect(proxyStop).toHaveBeenCalledTimes(1); + expect(proxyStart).toHaveBeenCalledTimes(1); + expect(consoleErrorSpy).toHaveBeenCalledWith( + 'Failed to apply new configuration: stop failed', + ); + } finally { + consoleErrorSpy.mockRestore(); } + }); + + afterEach(() => { if (fs.existsSync(tempDir)) { - fs.rmdirSync(tempDir); + fs.rmSync(tempDir, { recursive: true, force: true }); } process.env = oldEnv; + vi.doUnmock('../src/proxy'); vi.resetModules(); }); }); @@ -591,5 +679,14 @@ describe('loadFullConfiguration', () => { 'Invalid regular expression for commitConfig.author.email.local.block: [invalid(regex', ); }); + + it('should throw error when merged defaults miss required top-level values', async () => { + const config = await import('../src/config'); + const settingsWithoutSink = { ...defaultSettings, sink: undefined }; + + expect(() => config.assertHasRequiredTopLevelConfig(settingsWithoutSink)).toThrow( + 'Missing required top-level configuration values: sink', + ); + }); }); }); From dbbf4d347fec9e396da6f26b3f5576c76e241bf9 Mon Sep 17 00:00:00 2001 From: Juan Escalada Date: Thu, 21 May 2026 09:41:59 +0900 Subject: [PATCH 3/6] test: update handleError call to fix proxy test --- test/proxy.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/proxy.test.ts b/test/proxy.test.ts index 432d3faf7..ebfc2bd03 100644 --- a/test/proxy.test.ts +++ b/test/proxy.test.ts @@ -20,7 +20,7 @@ import { describe, it, beforeEach, afterEach, expect, vi, Mock } from 'vitest'; import fs from 'fs'; import { GitProxyConfig } from '../src/config/generated/config'; import { Proxy } from '../src/proxy'; -import { handleAndLogError } from '../src/utils/errors'; +import { handleErrorAndLog } from '../src/utils/errors'; describe('Proxy Module TLS Certificate Loading', () => { let proxyModule: Proxy; @@ -123,7 +123,7 @@ describe('Proxy Module TLS Certificate Loading', () => { try { await proxyModule.stop(); } catch (error: unknown) { - handleAndLogError(error, 'Error occurred when stopping the proxy'); + handleErrorAndLog(error, 'Error occurred when stopping the proxy'); } vi.restoreAllMocks(); }); From 7ce0663f11f102d9d7558ad3fe6c86421aa3cabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C4=86ori=C4=87?= Date: Thu, 21 May 2026 13:44:59 +0200 Subject: [PATCH 4/6] fix(config): add upstreamProxy to required top-level keys --- src/config/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/index.ts b/src/config/index.ts index 7378bcb41..694259241 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -52,6 +52,7 @@ const REQUIRED_TOP_LEVEL_CONFIG_KEYS = [ 'tempPassword', 'tls', 'uiRouteAuth', + 'upstreamProxy', 'urlShortener', ] as const satisfies readonly RequiredTopLevelConfigKey[]; From c48d0bfee9fe362f153c5ebada7c0e519aabef97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C4=86ori=C4=87?= Date: Thu, 21 May 2026 13:45:15 +0200 Subject: [PATCH 5/6] refactor(config): remove deprecated proxyUrl, sslKeyPemPath, sslCertPemPath fields These top-level fields were already marked deprecated in the schema: - proxyUrl: superseded by repository-URL-based proxying - sslKeyPemPath / sslCertPemPath: superseded by tls.key / tls.cert Drop them from the schema, regenerate the TypeScript types and reference docs, and remove the legacy fallback logic from the config module. This also lets us simplify FullGitProxyConfig to plain Required. --- config.schema.json | 15 - src/config/generated/config.ts | 17 - src/config/index.ts | 39 +-- test/ConfigLoader.test.ts | 16 +- test/configValidators.test.ts | 2 +- test/generated-config.test.ts | 32 +- test/testConfig.test.ts | 42 --- website/docs/configuration/reference.mdx | 421 +++++++---------------- 8 files changed, 160 insertions(+), 424 deletions(-) diff --git a/config.schema.json b/config.schema.json index 7d132a1ab..1937d94bd 100644 --- a/config.schema.json +++ b/config.schema.json @@ -5,11 +5,6 @@ "description": "Configuration for customizing git-proxy", "type": "object", "properties": { - "proxyUrl": { - "type": "string", - "description": "Deprecated: Used in early versions of git proxy to configure the remote host that traffic is proxied to. In later versions, the repository URL is used to determine the domain proxied, allowing multiple hosts to be proxied by one instance.", - "deprecated": true - }, "cookieSecret": { "type": "string" }, "sessionMaxAgeHours": { "type": "number" }, "api": { @@ -333,16 +328,6 @@ }, "required": ["enabled", "key", "cert"] }, - "sslKeyPemPath": { - "description": "Deprecated: Path to SSL private key file (use tls.key instead)", - "type": "string", - "deprecated": true - }, - "sslCertPemPath": { - "description": "Deprecated: Path to SSL certificate file (use tls.cert instead)", - "type": "string", - "deprecated": true - }, "configurationSources": { "enabled": { "type": "boolean" }, "reloadIntervalSeconds": { "type": "number" }, diff --git a/src/config/generated/config.ts b/src/config/generated/config.ts index aa0c04e93..69c743243 100644 --- a/src/config/generated/config.ts +++ b/src/config/generated/config.ts @@ -65,12 +65,6 @@ export interface GitProxyConfig { * commitConfig.diff.block.providers */ privateOrganizations?: any[]; - /** - * Deprecated: Used in early versions of git proxy to configure the remote host that traffic - * is proxied to. In later versions, the repository URL is used to determine the domain - * proxied, allowing multiple hosts to be proxied by one instance. - */ - proxyUrl?: string; /** * API Rate limiting configuration. */ @@ -81,14 +75,6 @@ export interface GitProxyConfig { * used. */ sink?: Database[]; - /** - * Deprecated: Path to SSL certificate file (use tls.cert instead) - */ - sslCertPemPath?: string; - /** - * Deprecated: Path to SSL private key file (use tls.key instead) - */ - sslKeyPemPath?: string; /** * Toggle the generation of temporary password for git-proxy admin user */ @@ -793,12 +779,9 @@ const typeMap: any = { { json: 'domains', js: 'domains', typ: u(undefined, r('Domains')) }, { json: 'plugins', js: 'plugins', typ: u(undefined, a('')) }, { json: 'privateOrganizations', js: 'privateOrganizations', typ: u(undefined, a('any')) }, - { json: 'proxyUrl', js: 'proxyUrl', typ: u(undefined, '') }, { json: 'rateLimit', js: 'rateLimit', typ: u(undefined, r('RateLimit')) }, { json: 'sessionMaxAgeHours', js: 'sessionMaxAgeHours', typ: u(undefined, 3.14) }, { json: 'sink', js: 'sink', typ: u(undefined, a(r('Database'))) }, - { json: 'sslCertPemPath', js: 'sslCertPemPath', typ: u(undefined, '') }, - { json: 'sslKeyPemPath', js: 'sslKeyPemPath', typ: u(undefined, '') }, { json: 'tempPassword', js: 'tempPassword', typ: u(undefined, r('TempPassword')) }, { json: 'tls', js: 'tls', typ: u(undefined, r('TLS')) }, { json: 'uiRouteAuth', js: 'uiRouteAuth', typ: u(undefined, r('UIRouteAuth')) }, diff --git a/src/config/index.ts b/src/config/index.ts index 694259241..8ff1021a3 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -25,12 +25,7 @@ import { getConfigFile } from './file'; import { validateConfig } from './validators'; import { handleErrorAndLog, handleErrorAndThrow } from '../utils/errors'; -// Deprecated compatibility fields are still optional because the defaults do not set them. -type OptionalTopLevelConfigKey = 'proxyUrl' | 'sslCertPemPath' | 'sslKeyPemPath'; -type RequiredTopLevelConfigKey = Exclude; - -export type FullGitProxyConfig = Required> & - Pick; +export type FullGitProxyConfig = Required; const REQUIRED_TOP_LEVEL_CONFIG_KEYS = [ 'api', @@ -54,10 +49,10 @@ const REQUIRED_TOP_LEVEL_CONFIG_KEYS = [ 'uiRouteAuth', 'upstreamProxy', 'urlShortener', -] as const satisfies readonly RequiredTopLevelConfigKey[]; +] as const satisfies readonly (keyof GitProxyConfig)[]; type MissingRequiredTopLevelConfigKeys = Exclude< - RequiredTopLevelConfigKey, + keyof GitProxyConfig, (typeof REQUIRED_TOP_LEVEL_CONFIG_KEYS)[number] >; type AssertNever = T; @@ -156,19 +151,6 @@ function mergeConfigurations( defaultConfig: GitProxyConfig, userSettings: Partial, ): FullGitProxyConfig { - // Special handling for TLS configuration when legacy fields are used - let tlsConfig = userSettings.tls || defaultConfig.tls; - - // If user doesn't specify tls but has legacy SSL fields, use only legacy fallback - if (!userSettings.tls && (userSettings.sslKeyPemPath || userSettings.sslCertPemPath)) { - tlsConfig = { - enabled: defaultConfig.tls?.enabled || false, - // Use empty strings so legacy fallback works - key: '', - cert: '', - }; - } - const config = { ...defaultConfig, ...userSettings, @@ -178,11 +160,8 @@ function mergeConfigurations( commitConfig: { ...defaultConfig.commitConfig, ...userSettings.commitConfig }, attestationConfig: { ...defaultConfig.attestationConfig, ...userSettings.attestationConfig }, rateLimit: userSettings.rateLimit || defaultConfig.rateLimit, - tls: tlsConfig, + tls: userSettings.tls || defaultConfig.tls, tempPassword: { ...defaultConfig.tempPassword, ...userSettings.tempPassword }, - // Preserve legacy SSL fields - sslKeyPemPath: userSettings.sslKeyPemPath || defaultConfig.sslKeyPemPath, - sslCertPemPath: userSettings.sslCertPemPath || defaultConfig.sslCertPemPath, // Environment variable overrides cookieSecret: serverConfig.GIT_PROXY_COOKIE_SECRET || @@ -194,12 +173,6 @@ function mergeConfigurations( return config; } -// Get configured proxy URL -export const getProxyUrl = (): string | undefined => { - const config = loadFullConfiguration(); - return config.proxyUrl; -}; - /** * Redacts the userinfo (credentials) from a proxy URL for safe logging. * e.g. http://user:pass@proxy.corp.local:8080 → http://@proxy.corp.local:8080 @@ -357,12 +330,12 @@ export const getPlugins = () => { export const getTLSKeyPemPath = (): string | undefined => { const config = loadFullConfiguration(); - return config.tls?.key && config.tls.key !== '' ? config.tls.key : config.sslKeyPemPath; + return config.tls?.key || undefined; }; export const getTLSCertPemPath = (): string | undefined => { const config = loadFullConfiguration(); - return config.tls?.cert && config.tls.cert !== '' ? config.tls.cert : config.sslCertPemPath; + return config.tls?.cert || undefined; }; export const getTLSEnabled = (): boolean => { diff --git a/test/ConfigLoader.test.ts b/test/ConfigLoader.test.ts index f0890a50d..ef0f41cf0 100644 --- a/test/ConfigLoader.test.ts +++ b/test/ConfigLoader.test.ts @@ -68,7 +68,7 @@ describe('ConfigLoader', () => { describe('loadFromFile', () => { it('should load configuration from file', async () => { const testConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', cookieSecret: 'test-secret', }; fs.writeFileSync(tempConfigFile, JSON.stringify(testConfig)); @@ -81,7 +81,7 @@ describe('ConfigLoader', () => { }); expect(result).toBeTypeOf('object'); - expect(result.proxyUrl).toBe('https://test.com'); + expect(result.contactEmail).toBe('admin@test.com'); expect(result.cookieSecret).toBe('test-secret'); }); }); @@ -89,7 +89,7 @@ describe('ConfigLoader', () => { describe('loadFromHttp', () => { it('should load configuration from HTTP endpoint', async () => { const testConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', cookieSecret: 'test-secret', }; @@ -104,7 +104,7 @@ describe('ConfigLoader', () => { }); expect(result).toBeTypeOf('object'); - expect(result.proxyUrl).toBe('https://test.com'); + expect(result.contactEmail).toBe('admin@test.com'); expect(result.cookieSecret).toBe('test-secret'); }); @@ -145,7 +145,7 @@ describe('ConfigLoader', () => { }; const newConfig = { - proxyUrl: 'https://new-test.com', + contactEmail: 'admin@new-test.com', }; fs.writeFileSync(tempConfigFile, JSON.stringify(newConfig)); @@ -162,7 +162,7 @@ describe('ConfigLoader', () => { it('should not emit event if config has not changed', async () => { const testConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', }; const config: Configuration = { @@ -211,7 +211,7 @@ describe('ConfigLoader', () => { it('should skip reload and log error when configuration is invalid', async () => { const invalidConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', commitConfig: { author: { email: { @@ -261,7 +261,7 @@ describe('ConfigLoader', () => { it('should successfully reload when configuration is valid', async () => { const validConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', commitConfig: { author: { email: { diff --git a/test/configValidators.test.ts b/test/configValidators.test.ts index 55083acb0..58b51085b 100644 --- a/test/configValidators.test.ts +++ b/test/configValidators.test.ts @@ -37,7 +37,7 @@ describe('validators', () => { it('should return true for config without commitConfig', () => { const config: GitProxyConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', cookieSecret: 'secret', }; expect(validateConfig(config)).toBe(true); diff --git a/test/generated-config.test.ts b/test/generated-config.test.ts index 827b19238..aaa59978e 100644 --- a/test/generated-config.test.ts +++ b/test/generated-config.test.ts @@ -22,7 +22,7 @@ describe('Generated Config (QuickType)', () => { describe('Convert class', () => { it('should parse valid configuration JSON', () => { const validConfig = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'test-secret', authorisedList: [ { @@ -48,7 +48,7 @@ describe('Generated Config (QuickType)', () => { const result = Convert.toGitProxyConfig(JSON.stringify(validConfig)); assert.isObject(result); - expect(result.proxyUrl).toBe('https://proxy.example.com'); + expect(result.contactEmail).toBe('admin@example.com'); expect(result.cookieSecret).toBe('test-secret'); assert.isArray(result.authorisedList); assert.isArray(result.authentication); @@ -57,7 +57,7 @@ describe('Generated Config (QuickType)', () => { it('should convert config object back to JSON', () => { const configObject = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'test-secret', authorisedList: [], authentication: [ @@ -72,7 +72,7 @@ describe('Generated Config (QuickType)', () => { const parsed = JSON.parse(jsonString); assert.isObject(parsed); - expect(parsed.proxyUrl).toBe('https://proxy.example.com'); + expect(parsed.contactEmail).toBe('admin@example.com'); expect(parsed.cookieSecret).toBe('test-secret'); }); @@ -91,7 +91,7 @@ describe('Generated Config (QuickType)', () => { it('should handle configuration with valid rate limit structure', () => { const validConfig = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'secret', sessionMaxAgeHours: 24, rateLimit: { @@ -121,7 +121,6 @@ describe('Generated Config (QuickType)', () => { enabled: true, }, ], - contactEmail: 'admin@example.com', csrfProtection: true, plugins: [], privateOrganizations: ['private-org'], @@ -138,7 +137,7 @@ describe('Generated Config (QuickType)', () => { assert.isBoolean(result.csrfProtection); assert.isArray(result.plugins); assert.isArray(result.privateOrganizations); - assert.isString(result.proxyUrl); + assert.isString(result.contactEmail); assert.isObject(result.rateLimit); assert.isNumber(result.sessionMaxAgeHours); assert.isArray(result.sink); @@ -146,7 +145,7 @@ describe('Generated Config (QuickType)', () => { it('should handle malformed configuration gracefully', () => { const malformedConfig = { - proxyUrl: 123, // Wrong type + contactEmail: 123, // Wrong type authentication: 'not-an-array', // Wrong type }; @@ -155,7 +154,7 @@ describe('Generated Config (QuickType)', () => { it('should preserve array structures', () => { const configWithArrays = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'secret', authorisedList: [ { project: 'proj1', name: 'repo1', url: 'https://github.com/proj1/repo1.git' }, @@ -177,7 +176,7 @@ describe('Generated Config (QuickType)', () => { it('should handle nested object structures', () => { const configWithNesting = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -207,7 +206,7 @@ describe('Generated Config (QuickType)', () => { it('should handle complex validation scenarios', () => { // Test configuration that will trigger more validation paths const complexConfig = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -246,7 +245,7 @@ describe('Generated Config (QuickType)', () => { it('should handle array validation edge cases', () => { const configWithArrays = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -277,7 +276,7 @@ describe('Generated Config (QuickType)', () => { it('should exercise transformation functions with edge cases', () => { const edgeCaseConfig = { - proxyUrl: 'https://proxy.example.com', + contactEmail: 'admin@example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -316,14 +315,13 @@ describe('Generated Config (QuickType)', () => { it('should test validation error paths', () => { assert.throws(() => - Convert.toGitProxyConfig('{"proxyUrl": 123, "authentication": "not-array"}'), + Convert.toGitProxyConfig('{"contactEmail": 123, "authentication": "not-array"}'), ); }); it('should test date and null handling', () => { // Test that null values cause validation errors (covers error paths) const configWithNulls = { - proxyUrl: 'https://proxy.example.com', cookieSecret: null, authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -338,7 +336,7 @@ describe('Generated Config (QuickType)', () => { it('should test serialization back to JSON', () => { const testConfig = { - proxyUrl: 'https://test.com', + contactEmail: 'admin@test.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -356,7 +354,7 @@ describe('Generated Config (QuickType)', () => { const serialized = Convert.gitProxyConfigToJson(parsed); const reparsed = JSON.parse(serialized); - expect(reparsed.proxyUrl).toBe('https://test.com'); + expect(reparsed.contactEmail).toBe('admin@test.com'); assert.isObject(reparsed.rateLimit); }); diff --git a/test/testConfig.test.ts b/test/testConfig.test.ts index 688e9d322..b54ea240f 100644 --- a/test/testConfig.test.ts +++ b/test/testConfig.test.ts @@ -36,7 +36,6 @@ describe('default configuration', () => { expect(config.getAuthMethods()).toEqual(enabledMethods); expect(config.getDatabase()).toEqual(defaultSettings.sink[0]); expect(config.getTempPasswordConfig()).toEqual(defaultSettings.tempPassword); - expect(config.getProxyUrl()).toBeUndefined(); expect(config.getAuthorisedList()).toEqual(defaultSettings.authorisedList); expect(config.getRateLimit()).toEqual(defaultSettings.rateLimit); expect(config.getTLSKeyPemPath()).toEqual(defaultSettings.tls.key); @@ -219,46 +218,6 @@ describe('user configuration', () => { expect(config.getPlugins()).toEqual(user.plugins); }); - it('should override default settings for sslCertPemPath', async () => { - const user = { tls: { enabled: true, key: 'my-key.pem', cert: 'my-cert.pem' } }; - fs.writeFileSync(tempUserFile, JSON.stringify(user)); - - const config = await import('../src/config'); - config.invalidateCache(); - - expect(config.getTLSCertPemPath()).toBe(user.tls.cert); - expect(config.getTLSKeyPemPath()).toBe(user.tls.key); - expect(config.getTLSEnabled()).toBe(user.tls.enabled); - }); - - it('should prioritize tls.key and tls.cert over sslKeyPemPath and sslCertPemPath', async () => { - const user = { - tls: { enabled: true, key: 'good-key.pem', cert: 'good-cert.pem' }, - sslKeyPemPath: 'bad-key.pem', - sslCertPemPath: 'bad-cert.pem', - }; - fs.writeFileSync(tempUserFile, JSON.stringify(user)); - - const config = await import('../src/config'); - config.invalidateCache(); - - expect(config.getTLSCertPemPath()).toBe(user.tls.cert); - expect(config.getTLSKeyPemPath()).toBe(user.tls.key); - expect(config.getTLSEnabled()).toBe(user.tls.enabled); - }); - - it('should use sslKeyPemPath and sslCertPemPath if tls.key and tls.cert are not present', async () => { - const user = { sslKeyPemPath: 'good-key.pem', sslCertPemPath: 'good-cert.pem' }; - fs.writeFileSync(tempUserFile, JSON.stringify(user)); - - const config = await import('../src/config'); - config.invalidateCache(); - - expect(config.getTLSCertPemPath()).toBe(user.sslCertPemPath); - expect(config.getTLSKeyPemPath()).toBe(user.sslKeyPemPath); - expect(config.getTLSEnabled()).toBe(false); - }); - it('should override default settings for api', async () => { const user = { api: { gitlab: { baseUrl: 'https://gitlab.com' } } }; fs.writeFileSync(tempUserFile, JSON.stringify(user)); @@ -338,7 +297,6 @@ describe('user configuration', () => { const config = await import('../src/config'); - expect(() => config.getProxyUrl()).not.toThrow(); expect(() => config.getCookieSecret()).not.toThrow(); expect(() => config.getSessionMaxAgeHours()).not.toThrow(); expect(() => config.getCommitConfig()).not.toThrow(); diff --git a/website/docs/configuration/reference.mdx b/website/docs/configuration/reference.mdx index 134d026d4..f7610c3a9 100644 --- a/website/docs/configuration/reference.mdx +++ b/website/docs/configuration/reference.mdx @@ -17,25 +17,7 @@ description: JSON schema reference documentation for GitProxy
- 1. [Optional] Property GitProxy configuration file > proxyUrl - - -
- -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Deprecated: Used in early versions of git proxy to configure the remote host that traffic is proxied to. In later versions, the repository URL is used to determine the domain proxied, allowing multiple hosts to be proxied by one instance. - -
-
- -
- - 2. [Optional] Property GitProxy configuration file > cookieSecret - + 1. [Optional] Property GitProxy configuration file > cookieSecret
@@ -49,8 +31,7 @@ description: JSON schema reference documentation for GitProxy
- 3. [Optional] Property GitProxy configuration file > sessionMaxAgeHours - + 2. [Optional] Property GitProxy configuration file > sessionMaxAgeHours
@@ -64,8 +45,7 @@ description: JSON schema reference documentation for GitProxy
- 4. [Optional] Property GitProxy configuration file > api - + 3. [Optional] Property GitProxy configuration file > api
@@ -79,8 +59,7 @@ description: JSON schema reference documentation for GitProxy
- 4.1. [Optional] Property GitProxy configuration file > api > ls - + 3.1. [Optional] Property GitProxy configuration file > api > ls
@@ -94,8 +73,7 @@ description: JSON schema reference documentation for GitProxy
- 4.1.1. [Optional] Property GitProxy configuration file > api > ls > userInADGroup - + 3.1.1. [Optional] Property GitProxy configuration file > api > ls > userInADGroup
@@ -120,8 +98,7 @@ description: JSON schema reference documentation for GitProxy
- 4.2. [Optional] Property GitProxy configuration file > api > gitleaks - + 3.2. [Optional] Property GitProxy configuration file > api > gitleaks
@@ -135,8 +112,7 @@ description: JSON schema reference documentation for GitProxy
- 4.2.1. [Optional] Property GitProxy configuration file > api > gitleaks > enabled - + 3.2.1. [Optional] Property GitProxy configuration file > api > gitleaks > enabled
@@ -150,8 +126,7 @@ description: JSON schema reference documentation for GitProxy
- 4.2.2. [Optional] Property GitProxy configuration file > api > gitleaks > ignoreGitleaksAllow - + 3.2.2. [Optional] Property GitProxy configuration file > api > gitleaks > ignoreGitleaksAllow
@@ -165,8 +140,7 @@ description: JSON schema reference documentation for GitProxy
- 4.2.3. [Optional] Property GitProxy configuration file > api > gitleaks > noColor - + 3.2.3. [Optional] Property GitProxy configuration file > api > gitleaks > noColor
@@ -180,8 +154,7 @@ description: JSON schema reference documentation for GitProxy
- 4.2.4. [Optional] Property GitProxy configuration file > api > gitleaks > configPath - + 3.2.4. [Optional] Property GitProxy configuration file > api > gitleaks > configPath
@@ -201,8 +174,7 @@ description: JSON schema reference documentation for GitProxy
- 5. [Optional] Property GitProxy configuration file > commitConfig - + 4. [Optional] Property GitProxy configuration file > commitConfig
@@ -218,8 +190,7 @@ description: JSON schema reference documentation for GitProxy
- 5.1. [Optional] Property GitProxy configuration file > commitConfig > author - + 4.1. [Optional] Property GitProxy configuration file > commitConfig > author
@@ -235,8 +206,7 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email - + 4.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email
@@ -252,8 +222,7 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local - + 4.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local
@@ -269,8 +238,7 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local > block - + 4.1.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local > block
@@ -291,8 +259,7 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain - + 4.1.1.2. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain
@@ -308,8 +275,7 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain > allow - + 4.1.1.2.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain > allow
@@ -336,8 +302,7 @@ description: JSON schema reference documentation for GitProxy
- 5.2. [Optional] Property GitProxy configuration file > commitConfig > message - + 4.2. [Optional] Property GitProxy configuration file > commitConfig > message
@@ -353,8 +318,7 @@ description: JSON schema reference documentation for GitProxy
- 5.2.1. [Optional] Property GitProxy configuration file > commitConfig > message > block - + 4.2.1. [Optional] Property GitProxy configuration file > commitConfig > message > block
@@ -370,8 +334,7 @@ description: JSON schema reference documentation for GitProxy
- 5.2.1.1. [Optional] Property GitProxy configuration file > commitConfig > message > block > literals - + 4.2.1.1. [Optional] Property GitProxy configuration file > commitConfig > message > block > literals
@@ -388,7 +351,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------------------------------------ | ----------- | | [literals items](#commitConfig_message_block_literals_items) | - | -###### 5.2.1.1.1. GitProxy configuration file > commitConfig > message > block > literals > literals items +###### 4.2.1.1.1. GitProxy configuration file > commitConfig > message > block > literals > literals items | | | | ------------ | -------- | @@ -400,8 +363,7 @@ description: JSON schema reference documentation for GitProxy
- 5.2.1.2. [Optional] Property GitProxy configuration file > commitConfig > message > block > patterns - + 4.2.1.2. [Optional] Property GitProxy configuration file > commitConfig > message > block > patterns
@@ -418,7 +380,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------------------------------------ | ----------- | | [patterns items](#commitConfig_message_block_patterns_items) | - | -###### 5.2.1.2.1. GitProxy configuration file > commitConfig > message > block > patterns > patterns items +###### 4.2.1.2.1. GitProxy configuration file > commitConfig > message > block > patterns > patterns items | | | | ------------ | -------- | @@ -436,8 +398,7 @@ description: JSON schema reference documentation for GitProxy
- 5.3. [Optional] Property GitProxy configuration file > commitConfig > diff - + 4.3. [Optional] Property GitProxy configuration file > commitConfig > diff
@@ -453,8 +414,7 @@ description: JSON schema reference documentation for GitProxy
- 5.3.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block - + 4.3.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block
@@ -470,8 +430,7 @@ description: JSON schema reference documentation for GitProxy
- 5.3.1.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block > literals - + 4.3.1.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block > literals
@@ -488,7 +447,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------------------------- | ----------- | | [literals items](#commitConfig_diff_block_literals_items) | - | -###### 5.3.1.1.1. GitProxy configuration file > commitConfig > diff > block > literals > literals items +###### 4.3.1.1.1. GitProxy configuration file > commitConfig > diff > block > literals > literals items | | | | ------------ | -------- | @@ -500,8 +459,7 @@ description: JSON schema reference documentation for GitProxy
- 5.3.1.2. [Optional] Property GitProxy configuration file > commitConfig > diff > block > patterns - + 4.3.1.2. [Optional] Property GitProxy configuration file > commitConfig > diff > block > patterns
@@ -518,7 +476,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------------------------- | ----------- | | [patterns items](#commitConfig_diff_block_patterns_items) | - | -###### 5.3.1.2.1. GitProxy configuration file > commitConfig > diff > block > patterns > patterns items +###### 4.3.1.2.1. GitProxy configuration file > commitConfig > diff > block > patterns > patterns items | | | | ------------------------- | ---------------- | @@ -531,8 +489,7 @@ description: JSON schema reference documentation for GitProxy
- 5.3.1.3. [Optional] Property GitProxy configuration file > commitConfig > diff > block > providers - + 4.3.1.3. [Optional] Property GitProxy configuration file > commitConfig > diff > block > providers
@@ -548,8 +505,7 @@ description: JSON schema reference documentation for GitProxy
- 5.3.1.3.1. Property GitProxy configuration file > commitConfig > diff > block > providers > additionalProperties - + 4.3.1.3.1. Property GitProxy configuration file > commitConfig > diff > block > providers > additionalProperties
@@ -575,8 +531,7 @@ description: JSON schema reference documentation for GitProxy
- 6. [Optional] Property GitProxy configuration file > attestationConfig - + 5. [Optional] Property GitProxy configuration file > attestationConfig
@@ -592,8 +547,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1. [Optional] Property GitProxy configuration file > attestationConfig > questions - + 5.1. [Optional] Property GitProxy configuration file > attestationConfig > questions
@@ -610,7 +564,7 @@ description: JSON schema reference documentation for GitProxy | ---------------------------------------------- | ----------- | | [Question](#attestationConfig_questions_items) | - | -#### 6.1.1. GitProxy configuration file > attestationConfig > questions > Question +#### 5.1.1. GitProxy configuration file > attestationConfig > questions > Question **Title:** Question @@ -622,8 +576,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > label - + 5.1.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > label
@@ -641,8 +594,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip - + 5.1.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip
@@ -658,8 +610,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1.1.2.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > text - + 5.1.1.2.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > text
@@ -675,8 +626,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1.1.2.2. [Optional] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links - + 5.1.1.2.2. [Optional] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links
@@ -691,7 +641,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------------------------------------- | ----------- | | [links items](#attestationConfig_questions_items_tooltip_links_items) | - | -###### 6.1.1.2.2.1. GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items +###### 5.1.1.2.2.1. GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items | | | | ------------------------- | ----------- | @@ -701,8 +651,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1.1.2.2.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > text - + 5.1.1.2.2.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > text
@@ -718,8 +667,7 @@ description: JSON schema reference documentation for GitProxy
- 6.1.1.2.2.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > url - + 5.1.1.2.2.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > url
@@ -748,8 +696,7 @@ description: JSON schema reference documentation for GitProxy
- 7. [Optional] Property GitProxy configuration file > domains - + 6. [Optional] Property GitProxy configuration file > domains
@@ -763,8 +710,7 @@ description: JSON schema reference documentation for GitProxy
- 7.1. [Optional] Property GitProxy configuration file > domains > proxy - + 6.1. [Optional] Property GitProxy configuration file > domains > proxy
@@ -783,8 +729,7 @@ description: JSON schema reference documentation for GitProxy
- 7.2. [Optional] Property GitProxy configuration file > domains > service - + 6.2. [Optional] Property GitProxy configuration file > domains > service
@@ -806,8 +751,7 @@ description: JSON schema reference documentation for GitProxy
- 8. [Optional] Property GitProxy configuration file > rateLimit - + 7. [Optional] Property GitProxy configuration file > rateLimit
@@ -821,8 +765,7 @@ description: JSON schema reference documentation for GitProxy
- 8.1. [Required] Property GitProxy configuration file > rateLimit > windowMs - + 7.1. [Required] Property GitProxy configuration file > rateLimit > windowMs
@@ -838,8 +781,7 @@ description: JSON schema reference documentation for GitProxy
- 8.2. [Required] Property GitProxy configuration file > rateLimit > limit - + 7.2. [Required] Property GitProxy configuration file > rateLimit > limit
@@ -855,8 +797,7 @@ description: JSON schema reference documentation for GitProxy
- 8.3. [Optional] Property GitProxy configuration file > rateLimit > statusCode - + 7.3. [Optional] Property GitProxy configuration file > rateLimit > statusCode
@@ -872,8 +813,7 @@ description: JSON schema reference documentation for GitProxy
- 8.4. [Optional] Property GitProxy configuration file > rateLimit > message - + 7.4. [Optional] Property GitProxy configuration file > rateLimit > message
@@ -892,8 +832,7 @@ description: JSON schema reference documentation for GitProxy
- 9. [Optional] Property GitProxy configuration file > privateOrganizations - + 8. [Optional] Property GitProxy configuration file > privateOrganizations
@@ -909,8 +848,7 @@ description: JSON schema reference documentation for GitProxy
- 10. [Optional] Property GitProxy configuration file > urlShortener - + 9. [Optional] Property GitProxy configuration file > urlShortener
@@ -926,8 +864,7 @@ description: JSON schema reference documentation for GitProxy
- 11. [Optional] Property GitProxy configuration file > contactEmail - + 10. [Optional] Property GitProxy configuration file > contactEmail
@@ -943,8 +880,7 @@ description: JSON schema reference documentation for GitProxy
- 12. [Optional] Property GitProxy configuration file > csrfProtection - + 11. [Optional] Property GitProxy configuration file > csrfProtection
@@ -960,8 +896,7 @@ description: JSON schema reference documentation for GitProxy
- 13. [Optional] Property GitProxy configuration file > plugins - + 12. [Optional] Property GitProxy configuration file > plugins
@@ -976,7 +911,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------- | ----------- | | [plugins items](#plugins_items) | - | -### 13.1. GitProxy configuration file > plugins > plugins items +### 12.1. GitProxy configuration file > plugins > plugins items | | | | ------------ | -------- | @@ -988,8 +923,7 @@ description: JSON schema reference documentation for GitProxy
- 14. [Optional] Property GitProxy configuration file > authorisedList - + 13. [Optional] Property GitProxy configuration file > authorisedList
@@ -1004,7 +938,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------- | ----------- | | [authorisedRepo](#authorisedList_items) | - | -### 14.1. GitProxy configuration file > authorisedList > authorisedRepo +### 13.1. GitProxy configuration file > authorisedList > authorisedRepo | | | | ------------------------- | ---------------------------- | @@ -1015,8 +949,7 @@ description: JSON schema reference documentation for GitProxy
- 14.1.1. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > project - + 13.1.1. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > project
@@ -1030,8 +963,7 @@ description: JSON schema reference documentation for GitProxy
- 14.1.2. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > name - + 13.1.2. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > name
@@ -1045,8 +977,7 @@ description: JSON schema reference documentation for GitProxy
- 14.1.3. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > url - + 13.1.3. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > url
@@ -1063,8 +994,7 @@ description: JSON schema reference documentation for GitProxy
- 15. [Optional] Property GitProxy configuration file > sink - + 14. [Optional] Property GitProxy configuration file > sink
@@ -1079,7 +1009,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------- | ---------------------------------- | | [database](#sink_items) | Configuration entry for a database | -### 15.1. GitProxy configuration file > sink > database +### 14.1. GitProxy configuration file > sink > database | | | | ------------------------- | ---------------------- | @@ -1099,7 +1029,7 @@ description: JSON schema reference documentation for GitProxy
-#### 15.1.1. Property `GitProxy configuration file > sink > sink items > oneOf > item 0` +#### 14.1.1. Property `GitProxy configuration file > sink > sink items > oneOf > item 0` | | | | ------------------------- | ---------------- | @@ -1111,8 +1041,7 @@ description: JSON schema reference documentation for GitProxy
- 15.1.1.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > type - + 14.1.1.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > type
@@ -1128,8 +1057,7 @@ Specific value: `"mongo"`
- 15.1.1.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > enabled - + 14.1.1.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > enabled
@@ -1143,8 +1071,7 @@ Specific value: `"mongo"`
- 15.1.1.3. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > connectionString - + 14.1.1.3. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > connectionString
@@ -1160,8 +1087,7 @@ Specific value: `"mongo"`
- 15.1.1.4. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options - + 14.1.1.4. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options
@@ -1175,8 +1101,7 @@ Specific value: `"mongo"`
- 15.1.1.4.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties - + 14.1.1.4.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties
@@ -1188,8 +1113,7 @@ Specific value: `"mongo"`
- 15.1.1.4.1.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties > AWS_CREDENTIAL_PROVIDER - + 14.1.1.4.1.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties > AWS_CREDENTIAL_PROVIDER
@@ -1212,7 +1136,7 @@ Specific value: `"mongo"`
-#### 15.1.2. Property `GitProxy configuration file > sink > sink items > oneOf > item 1` +#### 14.1.2. Property `GitProxy configuration file > sink > sink items > oneOf > item 1` | | | | ------------------------- | ---------------- | @@ -1224,8 +1148,7 @@ Specific value: `"mongo"`
- 15.1.2.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > type - + 14.1.2.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > type
@@ -1241,8 +1164,7 @@ Specific value: `"fs"`
- 15.1.2.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > enabled - + 14.1.2.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > enabled
@@ -1263,8 +1185,7 @@ Specific value: `"fs"`
- 16. [Optional] Property GitProxy configuration file > authentication - + 15. [Optional] Property GitProxy configuration file > authentication
@@ -1279,7 +1200,7 @@ Specific value: `"fs"` | ---------------------------------------------- | ------------------------------------------ | | [authenticationElement](#authentication_items) | Configuration for an authentication source | -### 16.1. GitProxy configuration file > authentication > authenticationElement +### 15.1. GitProxy configuration file > authentication > authenticationElement | | | | ------------------------- | ----------------------------------- | @@ -1301,7 +1222,7 @@ Specific value: `"fs"`
-#### 16.1.1. Property `GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config` +#### 15.1.1. Property `GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config` **Title:** Local Auth Config @@ -1315,8 +1236,7 @@ Specific value: `"fs"`
- 16.1.1.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > type - + 15.1.1.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > type
@@ -1332,8 +1252,7 @@ Specific value: `"local"`
- 16.1.1.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > enabled - + 15.1.1.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > enabled
@@ -1348,7 +1267,7 @@ Specific value: `"local"`
-#### 16.1.2. Property `GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config` +#### 15.1.2. Property `GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config` **Title:** Active Directory Auth Config @@ -1362,8 +1281,7 @@ Specific value: `"local"`
- 16.1.2.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > type - + 15.1.2.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > type
@@ -1379,8 +1297,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > enabled - + 15.1.2.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > enabled
@@ -1394,8 +1311,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adminGroup - + 15.1.2.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adminGroup
@@ -1411,8 +1327,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > userGroup - + 15.1.2.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > userGroup
@@ -1428,8 +1343,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > domain - + 15.1.2.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > domain
@@ -1445,8 +1359,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.6. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig - + 15.1.2.6. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig
@@ -1460,8 +1373,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.6.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > url - + 15.1.2.6.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > url
@@ -1477,8 +1389,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.6.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > baseDN - + 15.1.2.6.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > baseDN
@@ -1494,8 +1405,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.6.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > username - + 15.1.2.6.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > username
@@ -1511,8 +1421,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.6.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > password - + 15.1.2.6.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > password
@@ -1528,8 +1437,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.2.6.5. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > searchBase - + 15.1.2.6.5. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > searchBase
@@ -1549,7 +1457,7 @@ Specific value: `"ActiveDirectory"`
-#### 16.1.3. Property `GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config` +#### 15.1.3. Property `GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config` **Title:** Open ID Connect Auth Config @@ -1563,8 +1471,7 @@ Specific value: `"ActiveDirectory"`
- 16.1.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > type - + 15.1.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > type
@@ -1580,8 +1487,7 @@ Specific value: `"openidconnect"`
- 16.1.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > enabled - + 15.1.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > enabled
@@ -1595,8 +1501,7 @@ Specific value: `"openidconnect"`
- 16.1.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig - + 15.1.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig
@@ -1610,8 +1515,7 @@ Specific value: `"openidconnect"`
- 16.1.3.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > issuer - + 15.1.3.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > issuer
@@ -1625,8 +1529,7 @@ Specific value: `"openidconnect"`
- 16.1.3.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientID - + 15.1.3.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientID
@@ -1640,8 +1543,7 @@ Specific value: `"openidconnect"`
- 16.1.3.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientSecret - + 15.1.3.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientSecret
@@ -1655,8 +1557,7 @@ Specific value: `"openidconnect"`
- 16.1.3.3.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > callbackURL - + 15.1.3.3.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > callbackURL
@@ -1670,8 +1571,7 @@ Specific value: `"openidconnect"`
- 16.1.3.3.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > scope - + 15.1.3.3.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > scope
@@ -1689,7 +1589,7 @@ Specific value: `"openidconnect"`
-#### 16.1.4. Property `GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config` +#### 15.1.4. Property `GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config` **Title:** JWT Auth Config @@ -1703,8 +1603,7 @@ Specific value: `"openidconnect"`
- 16.1.4.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > type - + 15.1.4.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > type
@@ -1720,8 +1619,7 @@ Specific value: `"jwt"`
- 16.1.4.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > enabled - + 15.1.4.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > enabled
@@ -1735,8 +1633,7 @@ Specific value: `"jwt"`
- 16.1.4.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig - + 15.1.4.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig
@@ -1750,8 +1647,7 @@ Specific value: `"jwt"`
- 16.1.4.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > clientID - + 15.1.4.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > clientID
@@ -1765,8 +1661,7 @@ Specific value: `"jwt"`
- 16.1.4.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > authorityURL - + 15.1.4.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > authorityURL
@@ -1780,8 +1675,7 @@ Specific value: `"jwt"`
- 16.1.4.3.3. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > expectedAudience - + 15.1.4.3.3. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > expectedAudience
@@ -1795,8 +1689,7 @@ Specific value: `"jwt"`
- 16.1.4.3.4. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping - + 15.1.4.3.4. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping
@@ -1808,8 +1701,7 @@ Specific value: `"jwt"`
- 16.1.4.3.4.1. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping > admin - + 15.1.4.3.4.1. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping > admin
@@ -1837,8 +1729,7 @@ Specific value: `"jwt"`
- 17. [Optional] Property GitProxy configuration file > tempPassword - + 16. [Optional] Property GitProxy configuration file > tempPassword
@@ -1852,8 +1743,7 @@ Specific value: `"jwt"`
- 17.1. [Optional] Property GitProxy configuration file > tempPassword > sendEmail - + 16.1. [Optional] Property GitProxy configuration file > tempPassword > sendEmail
@@ -1867,8 +1757,7 @@ Specific value: `"jwt"`
- 17.2. [Optional] Property GitProxy configuration file > tempPassword > emailConfig - + 16.2. [Optional] Property GitProxy configuration file > tempPassword > emailConfig
@@ -1888,8 +1777,7 @@ Specific value: `"jwt"`
- 18. [Optional] Property GitProxy configuration file > apiAuthentication - + 17. [Optional] Property GitProxy configuration file > apiAuthentication
@@ -1904,7 +1792,7 @@ Specific value: `"jwt"` | ------------------------------------------------- | ------------------------------------------ | | [authenticationElement](#apiAuthentication_items) | Configuration for an authentication source | -### 18.1. GitProxy configuration file > apiAuthentication > authenticationElement +### 17.1. GitProxy configuration file > apiAuthentication > authenticationElement | | | | ------------------------- | --------------------------------------------- | @@ -1920,8 +1808,7 @@ Specific value: `"jwt"`
- 19. [Optional] Property GitProxy configuration file > tls - + 18. [Optional] Property GitProxy configuration file > tls
@@ -1935,8 +1822,7 @@ Specific value: `"jwt"`
- 19.1. [Required] Property GitProxy configuration file > tls > enabled - + 18.1. [Required] Property GitProxy configuration file > tls > enabled
@@ -1950,8 +1836,7 @@ Specific value: `"jwt"`
- 19.2. [Required] Property GitProxy configuration file > tls > key - + 18.2. [Required] Property GitProxy configuration file > tls > key
@@ -1965,8 +1850,7 @@ Specific value: `"jwt"`
- 19.3. [Required] Property GitProxy configuration file > tls > cert - + 18.3. [Required] Property GitProxy configuration file > tls > cert
@@ -1983,42 +1867,7 @@ Specific value: `"jwt"`
- 20. [Optional] Property GitProxy configuration file > sslKeyPemPath - - -
- -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Deprecated: Path to SSL private key file (use tls.key instead) - -
-
- -
- - 21. [Optional] Property GitProxy configuration file > sslCertPemPath - - -
- -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Deprecated: Path to SSL certificate file (use tls.cert instead) - -
-
- -
- - 22. [Optional] Property GitProxy configuration file > configurationSources - + 19. [Optional] Property GitProxy configuration file > configurationSources
@@ -2033,8 +1882,7 @@ Specific value: `"jwt"`
- 23. [Optional] Property GitProxy configuration file > uiRouteAuth - + 20. [Optional] Property GitProxy configuration file > uiRouteAuth
@@ -2048,8 +1896,7 @@ Specific value: `"jwt"`
- 23.1. [Optional] Property GitProxy configuration file > uiRouteAuth > enabled - + 20.1. [Optional] Property GitProxy configuration file > uiRouteAuth > enabled
@@ -2063,8 +1910,7 @@ Specific value: `"jwt"`
- 23.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules - + 20.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules
@@ -2077,7 +1923,7 @@ Specific value: `"jwt"` | ----------------------------------------- | ----------- | | [routeAuthRule](#uiRouteAuth_rules_items) | - | -#### 23.2.1. GitProxy configuration file > uiRouteAuth > rules > routeAuthRule +#### 20.2.1. GitProxy configuration file > uiRouteAuth > rules > routeAuthRule | | | | ------------------------- | --------------------------- | @@ -2088,8 +1934,7 @@ Specific value: `"jwt"`
- 23.2.1.1. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > pattern - + 20.2.1.1. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > pattern
@@ -2103,8 +1948,7 @@ Specific value: `"jwt"`
- 23.2.1.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > adminOnly - + 20.2.1.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > adminOnly
@@ -2118,8 +1962,7 @@ Specific value: `"jwt"`
- 23.2.1.3. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > loginRequired - + 20.2.1.3. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > loginRequired
@@ -2139,8 +1982,7 @@ Specific value: `"jwt"`
- 24. [Optional] Property GitProxy configuration file > upstreamProxy - + 21. [Optional] Property GitProxy configuration file > upstreamProxy
@@ -2154,8 +1996,7 @@ Specific value: `"jwt"`
- 24.1. [Optional] Property GitProxy configuration file > upstreamProxy > enabled - + 21.1. [Optional] Property GitProxy configuration file > upstreamProxy > enabled
@@ -2171,8 +2012,7 @@ Specific value: `"jwt"`
- 24.2. [Optional] Property GitProxy configuration file > upstreamProxy > url - + 21.2. [Optional] Property GitProxy configuration file > upstreamProxy > url
@@ -2189,8 +2029,7 @@ Specific value: `"jwt"`
- 24.3. [Optional] Property GitProxy configuration file > upstreamProxy > noProxy - + 21.3. [Optional] Property GitProxy configuration file > upstreamProxy > noProxy
@@ -2205,7 +2044,7 @@ Specific value: `"jwt"` | --------------------------------------------- | ----------- | | [noProxy items](#upstreamProxy_noProxy_items) | - | -#### 24.3.1. GitProxy configuration file > upstreamProxy > noProxy > noProxy items +#### 21.3.1. GitProxy configuration file > upstreamProxy > noProxy > noProxy items | | | | ------------ | -------- | @@ -2219,4 +2058,4 @@ Specific value: `"jwt"`
---------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-13 at 15:33:22 +0100 +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-21 at 13:42:52 +0200 From 4234c16fbddca7abc10f08fc4bd2285e0a58ec44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C4=86ori=C4=87?= Date: Sat, 23 May 2026 01:06:40 +0200 Subject: [PATCH 6/6] Revert "refactor(config): remove deprecated proxyUrl, sslKeyPemPath, sslCertPemPath fields" This reverts commit c48d0bfee9fe362f153c5ebada7c0e519aabef97. Removing these fields is a breaking change for existing 2.x configs. Keep them in the schema as deprecated and defer removal to the next major (3.0). --- config.schema.json | 15 + src/config/generated/config.ts | 17 + src/config/index.ts | 39 ++- test/ConfigLoader.test.ts | 16 +- test/configValidators.test.ts | 2 +- test/generated-config.test.ts | 32 +- test/testConfig.test.ts | 42 +++ website/docs/configuration/reference.mdx | 421 ++++++++++++++++------- 8 files changed, 424 insertions(+), 160 deletions(-) diff --git a/config.schema.json b/config.schema.json index 1937d94bd..7d132a1ab 100644 --- a/config.schema.json +++ b/config.schema.json @@ -5,6 +5,11 @@ "description": "Configuration for customizing git-proxy", "type": "object", "properties": { + "proxyUrl": { + "type": "string", + "description": "Deprecated: Used in early versions of git proxy to configure the remote host that traffic is proxied to. In later versions, the repository URL is used to determine the domain proxied, allowing multiple hosts to be proxied by one instance.", + "deprecated": true + }, "cookieSecret": { "type": "string" }, "sessionMaxAgeHours": { "type": "number" }, "api": { @@ -328,6 +333,16 @@ }, "required": ["enabled", "key", "cert"] }, + "sslKeyPemPath": { + "description": "Deprecated: Path to SSL private key file (use tls.key instead)", + "type": "string", + "deprecated": true + }, + "sslCertPemPath": { + "description": "Deprecated: Path to SSL certificate file (use tls.cert instead)", + "type": "string", + "deprecated": true + }, "configurationSources": { "enabled": { "type": "boolean" }, "reloadIntervalSeconds": { "type": "number" }, diff --git a/src/config/generated/config.ts b/src/config/generated/config.ts index 69c743243..aa0c04e93 100644 --- a/src/config/generated/config.ts +++ b/src/config/generated/config.ts @@ -65,6 +65,12 @@ export interface GitProxyConfig { * commitConfig.diff.block.providers */ privateOrganizations?: any[]; + /** + * Deprecated: Used in early versions of git proxy to configure the remote host that traffic + * is proxied to. In later versions, the repository URL is used to determine the domain + * proxied, allowing multiple hosts to be proxied by one instance. + */ + proxyUrl?: string; /** * API Rate limiting configuration. */ @@ -75,6 +81,14 @@ export interface GitProxyConfig { * used. */ sink?: Database[]; + /** + * Deprecated: Path to SSL certificate file (use tls.cert instead) + */ + sslCertPemPath?: string; + /** + * Deprecated: Path to SSL private key file (use tls.key instead) + */ + sslKeyPemPath?: string; /** * Toggle the generation of temporary password for git-proxy admin user */ @@ -779,9 +793,12 @@ const typeMap: any = { { json: 'domains', js: 'domains', typ: u(undefined, r('Domains')) }, { json: 'plugins', js: 'plugins', typ: u(undefined, a('')) }, { json: 'privateOrganizations', js: 'privateOrganizations', typ: u(undefined, a('any')) }, + { json: 'proxyUrl', js: 'proxyUrl', typ: u(undefined, '') }, { json: 'rateLimit', js: 'rateLimit', typ: u(undefined, r('RateLimit')) }, { json: 'sessionMaxAgeHours', js: 'sessionMaxAgeHours', typ: u(undefined, 3.14) }, { json: 'sink', js: 'sink', typ: u(undefined, a(r('Database'))) }, + { json: 'sslCertPemPath', js: 'sslCertPemPath', typ: u(undefined, '') }, + { json: 'sslKeyPemPath', js: 'sslKeyPemPath', typ: u(undefined, '') }, { json: 'tempPassword', js: 'tempPassword', typ: u(undefined, r('TempPassword')) }, { json: 'tls', js: 'tls', typ: u(undefined, r('TLS')) }, { json: 'uiRouteAuth', js: 'uiRouteAuth', typ: u(undefined, r('UIRouteAuth')) }, diff --git a/src/config/index.ts b/src/config/index.ts index 8ff1021a3..694259241 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -25,7 +25,12 @@ import { getConfigFile } from './file'; import { validateConfig } from './validators'; import { handleErrorAndLog, handleErrorAndThrow } from '../utils/errors'; -export type FullGitProxyConfig = Required; +// Deprecated compatibility fields are still optional because the defaults do not set them. +type OptionalTopLevelConfigKey = 'proxyUrl' | 'sslCertPemPath' | 'sslKeyPemPath'; +type RequiredTopLevelConfigKey = Exclude; + +export type FullGitProxyConfig = Required> & + Pick; const REQUIRED_TOP_LEVEL_CONFIG_KEYS = [ 'api', @@ -49,10 +54,10 @@ const REQUIRED_TOP_LEVEL_CONFIG_KEYS = [ 'uiRouteAuth', 'upstreamProxy', 'urlShortener', -] as const satisfies readonly (keyof GitProxyConfig)[]; +] as const satisfies readonly RequiredTopLevelConfigKey[]; type MissingRequiredTopLevelConfigKeys = Exclude< - keyof GitProxyConfig, + RequiredTopLevelConfigKey, (typeof REQUIRED_TOP_LEVEL_CONFIG_KEYS)[number] >; type AssertNever = T; @@ -151,6 +156,19 @@ function mergeConfigurations( defaultConfig: GitProxyConfig, userSettings: Partial, ): FullGitProxyConfig { + // Special handling for TLS configuration when legacy fields are used + let tlsConfig = userSettings.tls || defaultConfig.tls; + + // If user doesn't specify tls but has legacy SSL fields, use only legacy fallback + if (!userSettings.tls && (userSettings.sslKeyPemPath || userSettings.sslCertPemPath)) { + tlsConfig = { + enabled: defaultConfig.tls?.enabled || false, + // Use empty strings so legacy fallback works + key: '', + cert: '', + }; + } + const config = { ...defaultConfig, ...userSettings, @@ -160,8 +178,11 @@ function mergeConfigurations( commitConfig: { ...defaultConfig.commitConfig, ...userSettings.commitConfig }, attestationConfig: { ...defaultConfig.attestationConfig, ...userSettings.attestationConfig }, rateLimit: userSettings.rateLimit || defaultConfig.rateLimit, - tls: userSettings.tls || defaultConfig.tls, + tls: tlsConfig, tempPassword: { ...defaultConfig.tempPassword, ...userSettings.tempPassword }, + // Preserve legacy SSL fields + sslKeyPemPath: userSettings.sslKeyPemPath || defaultConfig.sslKeyPemPath, + sslCertPemPath: userSettings.sslCertPemPath || defaultConfig.sslCertPemPath, // Environment variable overrides cookieSecret: serverConfig.GIT_PROXY_COOKIE_SECRET || @@ -173,6 +194,12 @@ function mergeConfigurations( return config; } +// Get configured proxy URL +export const getProxyUrl = (): string | undefined => { + const config = loadFullConfiguration(); + return config.proxyUrl; +}; + /** * Redacts the userinfo (credentials) from a proxy URL for safe logging. * e.g. http://user:pass@proxy.corp.local:8080 → http://@proxy.corp.local:8080 @@ -330,12 +357,12 @@ export const getPlugins = () => { export const getTLSKeyPemPath = (): string | undefined => { const config = loadFullConfiguration(); - return config.tls?.key || undefined; + return config.tls?.key && config.tls.key !== '' ? config.tls.key : config.sslKeyPemPath; }; export const getTLSCertPemPath = (): string | undefined => { const config = loadFullConfiguration(); - return config.tls?.cert || undefined; + return config.tls?.cert && config.tls.cert !== '' ? config.tls.cert : config.sslCertPemPath; }; export const getTLSEnabled = (): boolean => { diff --git a/test/ConfigLoader.test.ts b/test/ConfigLoader.test.ts index ef0f41cf0..f0890a50d 100644 --- a/test/ConfigLoader.test.ts +++ b/test/ConfigLoader.test.ts @@ -68,7 +68,7 @@ describe('ConfigLoader', () => { describe('loadFromFile', () => { it('should load configuration from file', async () => { const testConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', cookieSecret: 'test-secret', }; fs.writeFileSync(tempConfigFile, JSON.stringify(testConfig)); @@ -81,7 +81,7 @@ describe('ConfigLoader', () => { }); expect(result).toBeTypeOf('object'); - expect(result.contactEmail).toBe('admin@test.com'); + expect(result.proxyUrl).toBe('https://test.com'); expect(result.cookieSecret).toBe('test-secret'); }); }); @@ -89,7 +89,7 @@ describe('ConfigLoader', () => { describe('loadFromHttp', () => { it('should load configuration from HTTP endpoint', async () => { const testConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', cookieSecret: 'test-secret', }; @@ -104,7 +104,7 @@ describe('ConfigLoader', () => { }); expect(result).toBeTypeOf('object'); - expect(result.contactEmail).toBe('admin@test.com'); + expect(result.proxyUrl).toBe('https://test.com'); expect(result.cookieSecret).toBe('test-secret'); }); @@ -145,7 +145,7 @@ describe('ConfigLoader', () => { }; const newConfig = { - contactEmail: 'admin@new-test.com', + proxyUrl: 'https://new-test.com', }; fs.writeFileSync(tempConfigFile, JSON.stringify(newConfig)); @@ -162,7 +162,7 @@ describe('ConfigLoader', () => { it('should not emit event if config has not changed', async () => { const testConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', }; const config: Configuration = { @@ -211,7 +211,7 @@ describe('ConfigLoader', () => { it('should skip reload and log error when configuration is invalid', async () => { const invalidConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', commitConfig: { author: { email: { @@ -261,7 +261,7 @@ describe('ConfigLoader', () => { it('should successfully reload when configuration is valid', async () => { const validConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', commitConfig: { author: { email: { diff --git a/test/configValidators.test.ts b/test/configValidators.test.ts index 58b51085b..55083acb0 100644 --- a/test/configValidators.test.ts +++ b/test/configValidators.test.ts @@ -37,7 +37,7 @@ describe('validators', () => { it('should return true for config without commitConfig', () => { const config: GitProxyConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', cookieSecret: 'secret', }; expect(validateConfig(config)).toBe(true); diff --git a/test/generated-config.test.ts b/test/generated-config.test.ts index aaa59978e..827b19238 100644 --- a/test/generated-config.test.ts +++ b/test/generated-config.test.ts @@ -22,7 +22,7 @@ describe('Generated Config (QuickType)', () => { describe('Convert class', () => { it('should parse valid configuration JSON', () => { const validConfig = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'test-secret', authorisedList: [ { @@ -48,7 +48,7 @@ describe('Generated Config (QuickType)', () => { const result = Convert.toGitProxyConfig(JSON.stringify(validConfig)); assert.isObject(result); - expect(result.contactEmail).toBe('admin@example.com'); + expect(result.proxyUrl).toBe('https://proxy.example.com'); expect(result.cookieSecret).toBe('test-secret'); assert.isArray(result.authorisedList); assert.isArray(result.authentication); @@ -57,7 +57,7 @@ describe('Generated Config (QuickType)', () => { it('should convert config object back to JSON', () => { const configObject = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'test-secret', authorisedList: [], authentication: [ @@ -72,7 +72,7 @@ describe('Generated Config (QuickType)', () => { const parsed = JSON.parse(jsonString); assert.isObject(parsed); - expect(parsed.contactEmail).toBe('admin@example.com'); + expect(parsed.proxyUrl).toBe('https://proxy.example.com'); expect(parsed.cookieSecret).toBe('test-secret'); }); @@ -91,7 +91,7 @@ describe('Generated Config (QuickType)', () => { it('should handle configuration with valid rate limit structure', () => { const validConfig = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'secret', sessionMaxAgeHours: 24, rateLimit: { @@ -121,6 +121,7 @@ describe('Generated Config (QuickType)', () => { enabled: true, }, ], + contactEmail: 'admin@example.com', csrfProtection: true, plugins: [], privateOrganizations: ['private-org'], @@ -137,7 +138,7 @@ describe('Generated Config (QuickType)', () => { assert.isBoolean(result.csrfProtection); assert.isArray(result.plugins); assert.isArray(result.privateOrganizations); - assert.isString(result.contactEmail); + assert.isString(result.proxyUrl); assert.isObject(result.rateLimit); assert.isNumber(result.sessionMaxAgeHours); assert.isArray(result.sink); @@ -145,7 +146,7 @@ describe('Generated Config (QuickType)', () => { it('should handle malformed configuration gracefully', () => { const malformedConfig = { - contactEmail: 123, // Wrong type + proxyUrl: 123, // Wrong type authentication: 'not-an-array', // Wrong type }; @@ -154,7 +155,7 @@ describe('Generated Config (QuickType)', () => { it('should preserve array structures', () => { const configWithArrays = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'secret', authorisedList: [ { project: 'proj1', name: 'repo1', url: 'https://github.com/proj1/repo1.git' }, @@ -176,7 +177,7 @@ describe('Generated Config (QuickType)', () => { it('should handle nested object structures', () => { const configWithNesting = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -206,7 +207,7 @@ describe('Generated Config (QuickType)', () => { it('should handle complex validation scenarios', () => { // Test configuration that will trigger more validation paths const complexConfig = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -245,7 +246,7 @@ describe('Generated Config (QuickType)', () => { it('should handle array validation edge cases', () => { const configWithArrays = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -276,7 +277,7 @@ describe('Generated Config (QuickType)', () => { it('should exercise transformation functions with edge cases', () => { const edgeCaseConfig = { - contactEmail: 'admin@example.com', + proxyUrl: 'https://proxy.example.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -315,13 +316,14 @@ describe('Generated Config (QuickType)', () => { it('should test validation error paths', () => { assert.throws(() => - Convert.toGitProxyConfig('{"contactEmail": 123, "authentication": "not-array"}'), + Convert.toGitProxyConfig('{"proxyUrl": 123, "authentication": "not-array"}'), ); }); it('should test date and null handling', () => { // Test that null values cause validation errors (covers error paths) const configWithNulls = { + proxyUrl: 'https://proxy.example.com', cookieSecret: null, authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -336,7 +338,7 @@ describe('Generated Config (QuickType)', () => { it('should test serialization back to JSON', () => { const testConfig = { - contactEmail: 'admin@test.com', + proxyUrl: 'https://test.com', cookieSecret: 'secret', authentication: [{ type: 'local', enabled: true }], sink: [{ type: 'fs', enabled: true }], @@ -354,7 +356,7 @@ describe('Generated Config (QuickType)', () => { const serialized = Convert.gitProxyConfigToJson(parsed); const reparsed = JSON.parse(serialized); - expect(reparsed.contactEmail).toBe('admin@test.com'); + expect(reparsed.proxyUrl).toBe('https://test.com'); assert.isObject(reparsed.rateLimit); }); diff --git a/test/testConfig.test.ts b/test/testConfig.test.ts index b54ea240f..688e9d322 100644 --- a/test/testConfig.test.ts +++ b/test/testConfig.test.ts @@ -36,6 +36,7 @@ describe('default configuration', () => { expect(config.getAuthMethods()).toEqual(enabledMethods); expect(config.getDatabase()).toEqual(defaultSettings.sink[0]); expect(config.getTempPasswordConfig()).toEqual(defaultSettings.tempPassword); + expect(config.getProxyUrl()).toBeUndefined(); expect(config.getAuthorisedList()).toEqual(defaultSettings.authorisedList); expect(config.getRateLimit()).toEqual(defaultSettings.rateLimit); expect(config.getTLSKeyPemPath()).toEqual(defaultSettings.tls.key); @@ -218,6 +219,46 @@ describe('user configuration', () => { expect(config.getPlugins()).toEqual(user.plugins); }); + it('should override default settings for sslCertPemPath', async () => { + const user = { tls: { enabled: true, key: 'my-key.pem', cert: 'my-cert.pem' } }; + fs.writeFileSync(tempUserFile, JSON.stringify(user)); + + const config = await import('../src/config'); + config.invalidateCache(); + + expect(config.getTLSCertPemPath()).toBe(user.tls.cert); + expect(config.getTLSKeyPemPath()).toBe(user.tls.key); + expect(config.getTLSEnabled()).toBe(user.tls.enabled); + }); + + it('should prioritize tls.key and tls.cert over sslKeyPemPath and sslCertPemPath', async () => { + const user = { + tls: { enabled: true, key: 'good-key.pem', cert: 'good-cert.pem' }, + sslKeyPemPath: 'bad-key.pem', + sslCertPemPath: 'bad-cert.pem', + }; + fs.writeFileSync(tempUserFile, JSON.stringify(user)); + + const config = await import('../src/config'); + config.invalidateCache(); + + expect(config.getTLSCertPemPath()).toBe(user.tls.cert); + expect(config.getTLSKeyPemPath()).toBe(user.tls.key); + expect(config.getTLSEnabled()).toBe(user.tls.enabled); + }); + + it('should use sslKeyPemPath and sslCertPemPath if tls.key and tls.cert are not present', async () => { + const user = { sslKeyPemPath: 'good-key.pem', sslCertPemPath: 'good-cert.pem' }; + fs.writeFileSync(tempUserFile, JSON.stringify(user)); + + const config = await import('../src/config'); + config.invalidateCache(); + + expect(config.getTLSCertPemPath()).toBe(user.sslCertPemPath); + expect(config.getTLSKeyPemPath()).toBe(user.sslKeyPemPath); + expect(config.getTLSEnabled()).toBe(false); + }); + it('should override default settings for api', async () => { const user = { api: { gitlab: { baseUrl: 'https://gitlab.com' } } }; fs.writeFileSync(tempUserFile, JSON.stringify(user)); @@ -297,6 +338,7 @@ describe('user configuration', () => { const config = await import('../src/config'); + expect(() => config.getProxyUrl()).not.toThrow(); expect(() => config.getCookieSecret()).not.toThrow(); expect(() => config.getSessionMaxAgeHours()).not.toThrow(); expect(() => config.getCommitConfig()).not.toThrow(); diff --git a/website/docs/configuration/reference.mdx b/website/docs/configuration/reference.mdx index f7610c3a9..134d026d4 100644 --- a/website/docs/configuration/reference.mdx +++ b/website/docs/configuration/reference.mdx @@ -17,7 +17,25 @@ description: JSON schema reference documentation for GitProxy
- 1. [Optional] Property GitProxy configuration file > cookieSecret + 1. [Optional] Property GitProxy configuration file > proxyUrl + + +
+ +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Deprecated: Used in early versions of git proxy to configure the remote host that traffic is proxied to. In later versions, the repository URL is used to determine the domain proxied, allowing multiple hosts to be proxied by one instance. + +
+
+ +
+ + 2. [Optional] Property GitProxy configuration file > cookieSecret +
@@ -31,7 +49,8 @@ description: JSON schema reference documentation for GitProxy
- 2. [Optional] Property GitProxy configuration file > sessionMaxAgeHours + 3. [Optional] Property GitProxy configuration file > sessionMaxAgeHours +
@@ -45,7 +64,8 @@ description: JSON schema reference documentation for GitProxy
- 3. [Optional] Property GitProxy configuration file > api + 4. [Optional] Property GitProxy configuration file > api +
@@ -59,7 +79,8 @@ description: JSON schema reference documentation for GitProxy
- 3.1. [Optional] Property GitProxy configuration file > api > ls + 4.1. [Optional] Property GitProxy configuration file > api > ls +
@@ -73,7 +94,8 @@ description: JSON schema reference documentation for GitProxy
- 3.1.1. [Optional] Property GitProxy configuration file > api > ls > userInADGroup + 4.1.1. [Optional] Property GitProxy configuration file > api > ls > userInADGroup +
@@ -98,7 +120,8 @@ description: JSON schema reference documentation for GitProxy
- 3.2. [Optional] Property GitProxy configuration file > api > gitleaks + 4.2. [Optional] Property GitProxy configuration file > api > gitleaks +
@@ -112,7 +135,8 @@ description: JSON schema reference documentation for GitProxy
- 3.2.1. [Optional] Property GitProxy configuration file > api > gitleaks > enabled + 4.2.1. [Optional] Property GitProxy configuration file > api > gitleaks > enabled +
@@ -126,7 +150,8 @@ description: JSON schema reference documentation for GitProxy
- 3.2.2. [Optional] Property GitProxy configuration file > api > gitleaks > ignoreGitleaksAllow + 4.2.2. [Optional] Property GitProxy configuration file > api > gitleaks > ignoreGitleaksAllow +
@@ -140,7 +165,8 @@ description: JSON schema reference documentation for GitProxy
- 3.2.3. [Optional] Property GitProxy configuration file > api > gitleaks > noColor + 4.2.3. [Optional] Property GitProxy configuration file > api > gitleaks > noColor +
@@ -154,7 +180,8 @@ description: JSON schema reference documentation for GitProxy
- 3.2.4. [Optional] Property GitProxy configuration file > api > gitleaks > configPath + 4.2.4. [Optional] Property GitProxy configuration file > api > gitleaks > configPath +
@@ -174,7 +201,8 @@ description: JSON schema reference documentation for GitProxy
- 4. [Optional] Property GitProxy configuration file > commitConfig + 5. [Optional] Property GitProxy configuration file > commitConfig +
@@ -190,7 +218,8 @@ description: JSON schema reference documentation for GitProxy
- 4.1. [Optional] Property GitProxy configuration file > commitConfig > author + 5.1. [Optional] Property GitProxy configuration file > commitConfig > author +
@@ -206,7 +235,8 @@ description: JSON schema reference documentation for GitProxy
- 4.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email + 5.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email +
@@ -222,7 +252,8 @@ description: JSON schema reference documentation for GitProxy
- 4.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local + 5.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local +
@@ -238,7 +269,8 @@ description: JSON schema reference documentation for GitProxy
- 4.1.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local > block + 5.1.1.1.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > local > block +
@@ -259,7 +291,8 @@ description: JSON schema reference documentation for GitProxy
- 4.1.1.2. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain + 5.1.1.2. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain +
@@ -275,7 +308,8 @@ description: JSON schema reference documentation for GitProxy
- 4.1.1.2.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain > allow + 5.1.1.2.1. [Optional] Property GitProxy configuration file > commitConfig > author > email > domain > allow +
@@ -302,7 +336,8 @@ description: JSON schema reference documentation for GitProxy
- 4.2. [Optional] Property GitProxy configuration file > commitConfig > message + 5.2. [Optional] Property GitProxy configuration file > commitConfig > message +
@@ -318,7 +353,8 @@ description: JSON schema reference documentation for GitProxy
- 4.2.1. [Optional] Property GitProxy configuration file > commitConfig > message > block + 5.2.1. [Optional] Property GitProxy configuration file > commitConfig > message > block +
@@ -334,7 +370,8 @@ description: JSON schema reference documentation for GitProxy
- 4.2.1.1. [Optional] Property GitProxy configuration file > commitConfig > message > block > literals + 5.2.1.1. [Optional] Property GitProxy configuration file > commitConfig > message > block > literals +
@@ -351,7 +388,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------------------------------------ | ----------- | | [literals items](#commitConfig_message_block_literals_items) | - | -###### 4.2.1.1.1. GitProxy configuration file > commitConfig > message > block > literals > literals items +###### 5.2.1.1.1. GitProxy configuration file > commitConfig > message > block > literals > literals items | | | | ------------ | -------- | @@ -363,7 +400,8 @@ description: JSON schema reference documentation for GitProxy
- 4.2.1.2. [Optional] Property GitProxy configuration file > commitConfig > message > block > patterns + 5.2.1.2. [Optional] Property GitProxy configuration file > commitConfig > message > block > patterns +
@@ -380,7 +418,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------------------------------------ | ----------- | | [patterns items](#commitConfig_message_block_patterns_items) | - | -###### 4.2.1.2.1. GitProxy configuration file > commitConfig > message > block > patterns > patterns items +###### 5.2.1.2.1. GitProxy configuration file > commitConfig > message > block > patterns > patterns items | | | | ------------ | -------- | @@ -398,7 +436,8 @@ description: JSON schema reference documentation for GitProxy
- 4.3. [Optional] Property GitProxy configuration file > commitConfig > diff + 5.3. [Optional] Property GitProxy configuration file > commitConfig > diff +
@@ -414,7 +453,8 @@ description: JSON schema reference documentation for GitProxy
- 4.3.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block + 5.3.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block +
@@ -430,7 +470,8 @@ description: JSON schema reference documentation for GitProxy
- 4.3.1.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block > literals + 5.3.1.1. [Optional] Property GitProxy configuration file > commitConfig > diff > block > literals +
@@ -447,7 +488,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------------------------- | ----------- | | [literals items](#commitConfig_diff_block_literals_items) | - | -###### 4.3.1.1.1. GitProxy configuration file > commitConfig > diff > block > literals > literals items +###### 5.3.1.1.1. GitProxy configuration file > commitConfig > diff > block > literals > literals items | | | | ------------ | -------- | @@ -459,7 +500,8 @@ description: JSON schema reference documentation for GitProxy
- 4.3.1.2. [Optional] Property GitProxy configuration file > commitConfig > diff > block > patterns + 5.3.1.2. [Optional] Property GitProxy configuration file > commitConfig > diff > block > patterns +
@@ -476,7 +518,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------------------------- | ----------- | | [patterns items](#commitConfig_diff_block_patterns_items) | - | -###### 4.3.1.2.1. GitProxy configuration file > commitConfig > diff > block > patterns > patterns items +###### 5.3.1.2.1. GitProxy configuration file > commitConfig > diff > block > patterns > patterns items | | | | ------------------------- | ---------------- | @@ -489,7 +531,8 @@ description: JSON schema reference documentation for GitProxy
- 4.3.1.3. [Optional] Property GitProxy configuration file > commitConfig > diff > block > providers + 5.3.1.3. [Optional] Property GitProxy configuration file > commitConfig > diff > block > providers +
@@ -505,7 +548,8 @@ description: JSON schema reference documentation for GitProxy
- 4.3.1.3.1. Property GitProxy configuration file > commitConfig > diff > block > providers > additionalProperties + 5.3.1.3.1. Property GitProxy configuration file > commitConfig > diff > block > providers > additionalProperties +
@@ -531,7 +575,8 @@ description: JSON schema reference documentation for GitProxy
- 5. [Optional] Property GitProxy configuration file > attestationConfig + 6. [Optional] Property GitProxy configuration file > attestationConfig +
@@ -547,7 +592,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1. [Optional] Property GitProxy configuration file > attestationConfig > questions + 6.1. [Optional] Property GitProxy configuration file > attestationConfig > questions +
@@ -564,7 +610,7 @@ description: JSON schema reference documentation for GitProxy | ---------------------------------------------- | ----------- | | [Question](#attestationConfig_questions_items) | - | -#### 5.1.1. GitProxy configuration file > attestationConfig > questions > Question +#### 6.1.1. GitProxy configuration file > attestationConfig > questions > Question **Title:** Question @@ -576,7 +622,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > label + 6.1.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > label +
@@ -594,7 +641,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip + 6.1.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip +
@@ -610,7 +658,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > text + 6.1.1.2.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > text +
@@ -626,7 +675,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2.2. [Optional] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links + 6.1.1.2.2. [Optional] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links +
@@ -641,7 +691,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------------------------------------- | ----------- | | [links items](#attestationConfig_questions_items_tooltip_links_items) | - | -###### 5.1.1.2.2.1. GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items +###### 6.1.1.2.2.1. GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items | | | | ------------------------- | ----------- | @@ -651,7 +701,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2.2.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > text + 6.1.1.2.2.1.1. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > text +
@@ -667,7 +718,8 @@ description: JSON schema reference documentation for GitProxy
- 5.1.1.2.2.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > url + 6.1.1.2.2.1.2. [Required] Property GitProxy configuration file > attestationConfig > questions > Question > tooltip > links > links items > url +
@@ -696,7 +748,8 @@ description: JSON schema reference documentation for GitProxy
- 6. [Optional] Property GitProxy configuration file > domains + 7. [Optional] Property GitProxy configuration file > domains +
@@ -710,7 +763,8 @@ description: JSON schema reference documentation for GitProxy
- 6.1. [Optional] Property GitProxy configuration file > domains > proxy + 7.1. [Optional] Property GitProxy configuration file > domains > proxy +
@@ -729,7 +783,8 @@ description: JSON schema reference documentation for GitProxy
- 6.2. [Optional] Property GitProxy configuration file > domains > service + 7.2. [Optional] Property GitProxy configuration file > domains > service +
@@ -751,7 +806,8 @@ description: JSON schema reference documentation for GitProxy
- 7. [Optional] Property GitProxy configuration file > rateLimit + 8. [Optional] Property GitProxy configuration file > rateLimit +
@@ -765,7 +821,8 @@ description: JSON schema reference documentation for GitProxy
- 7.1. [Required] Property GitProxy configuration file > rateLimit > windowMs + 8.1. [Required] Property GitProxy configuration file > rateLimit > windowMs +
@@ -781,7 +838,8 @@ description: JSON schema reference documentation for GitProxy
- 7.2. [Required] Property GitProxy configuration file > rateLimit > limit + 8.2. [Required] Property GitProxy configuration file > rateLimit > limit +
@@ -797,7 +855,8 @@ description: JSON schema reference documentation for GitProxy
- 7.3. [Optional] Property GitProxy configuration file > rateLimit > statusCode + 8.3. [Optional] Property GitProxy configuration file > rateLimit > statusCode +
@@ -813,7 +872,8 @@ description: JSON schema reference documentation for GitProxy
- 7.4. [Optional] Property GitProxy configuration file > rateLimit > message + 8.4. [Optional] Property GitProxy configuration file > rateLimit > message +
@@ -832,7 +892,8 @@ description: JSON schema reference documentation for GitProxy
- 8. [Optional] Property GitProxy configuration file > privateOrganizations + 9. [Optional] Property GitProxy configuration file > privateOrganizations +
@@ -848,7 +909,8 @@ description: JSON schema reference documentation for GitProxy
- 9. [Optional] Property GitProxy configuration file > urlShortener + 10. [Optional] Property GitProxy configuration file > urlShortener +
@@ -864,7 +926,8 @@ description: JSON schema reference documentation for GitProxy
- 10. [Optional] Property GitProxy configuration file > contactEmail + 11. [Optional] Property GitProxy configuration file > contactEmail +
@@ -880,7 +943,8 @@ description: JSON schema reference documentation for GitProxy
- 11. [Optional] Property GitProxy configuration file > csrfProtection + 12. [Optional] Property GitProxy configuration file > csrfProtection +
@@ -896,7 +960,8 @@ description: JSON schema reference documentation for GitProxy
- 12. [Optional] Property GitProxy configuration file > plugins + 13. [Optional] Property GitProxy configuration file > plugins +
@@ -911,7 +976,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------- | ----------- | | [plugins items](#plugins_items) | - | -### 12.1. GitProxy configuration file > plugins > plugins items +### 13.1. GitProxy configuration file > plugins > plugins items | | | | ------------ | -------- | @@ -923,7 +988,8 @@ description: JSON schema reference documentation for GitProxy
- 13. [Optional] Property GitProxy configuration file > authorisedList + 14. [Optional] Property GitProxy configuration file > authorisedList +
@@ -938,7 +1004,7 @@ description: JSON schema reference documentation for GitProxy | --------------------------------------- | ----------- | | [authorisedRepo](#authorisedList_items) | - | -### 13.1. GitProxy configuration file > authorisedList > authorisedRepo +### 14.1. GitProxy configuration file > authorisedList > authorisedRepo | | | | ------------------------- | ---------------------------- | @@ -949,7 +1015,8 @@ description: JSON schema reference documentation for GitProxy
- 13.1.1. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > project + 14.1.1. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > project +
@@ -963,7 +1030,8 @@ description: JSON schema reference documentation for GitProxy
- 13.1.2. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > name + 14.1.2. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > name +
@@ -977,7 +1045,8 @@ description: JSON schema reference documentation for GitProxy
- 13.1.3. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > url + 14.1.3. [Required] Property GitProxy configuration file > authorisedList > authorisedList items > url +
@@ -994,7 +1063,8 @@ description: JSON schema reference documentation for GitProxy
- 14. [Optional] Property GitProxy configuration file > sink + 15. [Optional] Property GitProxy configuration file > sink +
@@ -1009,7 +1079,7 @@ description: JSON schema reference documentation for GitProxy | ------------------------------- | ---------------------------------- | | [database](#sink_items) | Configuration entry for a database | -### 14.1. GitProxy configuration file > sink > database +### 15.1. GitProxy configuration file > sink > database | | | | ------------------------- | ---------------------- | @@ -1029,7 +1099,7 @@ description: JSON schema reference documentation for GitProxy
-#### 14.1.1. Property `GitProxy configuration file > sink > sink items > oneOf > item 0` +#### 15.1.1. Property `GitProxy configuration file > sink > sink items > oneOf > item 0` | | | | ------------------------- | ---------------- | @@ -1041,7 +1111,8 @@ description: JSON schema reference documentation for GitProxy
- 14.1.1.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > type + 15.1.1.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > type +
@@ -1057,7 +1128,8 @@ Specific value: `"mongo"`
- 14.1.1.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > enabled + 15.1.1.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > enabled +
@@ -1071,7 +1143,8 @@ Specific value: `"mongo"`
- 14.1.1.3. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > connectionString + 15.1.1.3. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > connectionString +
@@ -1087,7 +1160,8 @@ Specific value: `"mongo"`
- 14.1.1.4. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options + 15.1.1.4. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options +
@@ -1101,7 +1175,8 @@ Specific value: `"mongo"`
- 14.1.1.4.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties + 15.1.1.4.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties +
@@ -1113,7 +1188,8 @@ Specific value: `"mongo"`
- 14.1.1.4.1.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties > AWS_CREDENTIAL_PROVIDER + 15.1.1.4.1.1. [Optional] Property GitProxy configuration file > sink > sink items > oneOf > item 0 > options > authMechanismProperties > AWS_CREDENTIAL_PROVIDER +
@@ -1136,7 +1212,7 @@ Specific value: `"mongo"`
-#### 14.1.2. Property `GitProxy configuration file > sink > sink items > oneOf > item 1` +#### 15.1.2. Property `GitProxy configuration file > sink > sink items > oneOf > item 1` | | | | ------------------------- | ---------------- | @@ -1148,7 +1224,8 @@ Specific value: `"mongo"`
- 14.1.2.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > type + 15.1.2.1. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > type +
@@ -1164,7 +1241,8 @@ Specific value: `"fs"`
- 14.1.2.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > enabled + 15.1.2.2. [Required] Property GitProxy configuration file > sink > sink items > oneOf > item 1 > enabled +
@@ -1185,7 +1263,8 @@ Specific value: `"fs"`
- 15. [Optional] Property GitProxy configuration file > authentication + 16. [Optional] Property GitProxy configuration file > authentication +
@@ -1200,7 +1279,7 @@ Specific value: `"fs"` | ---------------------------------------------- | ------------------------------------------ | | [authenticationElement](#authentication_items) | Configuration for an authentication source | -### 15.1. GitProxy configuration file > authentication > authenticationElement +### 16.1. GitProxy configuration file > authentication > authenticationElement | | | | ------------------------- | ----------------------------------- | @@ -1222,7 +1301,7 @@ Specific value: `"fs"`
-#### 15.1.1. Property `GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config` +#### 16.1.1. Property `GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config` **Title:** Local Auth Config @@ -1236,7 +1315,8 @@ Specific value: `"fs"`
- 15.1.1.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > type + 16.1.1.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > type +
@@ -1252,7 +1332,8 @@ Specific value: `"local"`
- 15.1.1.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > enabled + 16.1.1.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Local Auth Config > enabled +
@@ -1267,7 +1348,7 @@ Specific value: `"local"`
-#### 15.1.2. Property `GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config` +#### 16.1.2. Property `GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config` **Title:** Active Directory Auth Config @@ -1281,7 +1362,8 @@ Specific value: `"local"`
- 15.1.2.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > type + 16.1.2.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > type +
@@ -1297,7 +1379,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > enabled + 16.1.2.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > enabled +
@@ -1311,7 +1394,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adminGroup + 16.1.2.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adminGroup +
@@ -1327,7 +1411,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > userGroup + 16.1.2.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > userGroup +
@@ -1343,7 +1428,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > domain + 16.1.2.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > domain +
@@ -1359,7 +1445,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.6. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig + 16.1.2.6. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig +
@@ -1373,7 +1460,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.6.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > url + 16.1.2.6.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > url +
@@ -1389,7 +1477,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.6.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > baseDN + 16.1.2.6.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > baseDN +
@@ -1405,7 +1494,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.6.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > username + 16.1.2.6.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > username +
@@ -1421,7 +1511,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.6.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > password + 16.1.2.6.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > password +
@@ -1437,7 +1528,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.2.6.5. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > searchBase + 16.1.2.6.5. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > Active Directory Auth Config > adConfig > searchBase +
@@ -1457,7 +1549,7 @@ Specific value: `"ActiveDirectory"`
-#### 15.1.3. Property `GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config` +#### 16.1.3. Property `GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config` **Title:** Open ID Connect Auth Config @@ -1471,7 +1563,8 @@ Specific value: `"ActiveDirectory"`
- 15.1.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > type + 16.1.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > type +
@@ -1487,7 +1580,8 @@ Specific value: `"openidconnect"`
- 15.1.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > enabled + 16.1.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > enabled +
@@ -1501,7 +1595,8 @@ Specific value: `"openidconnect"`
- 15.1.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig + 16.1.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig +
@@ -1515,7 +1610,8 @@ Specific value: `"openidconnect"`
- 15.1.3.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > issuer + 16.1.3.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > issuer +
@@ -1529,7 +1625,8 @@ Specific value: `"openidconnect"`
- 15.1.3.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientID + 16.1.3.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientID +
@@ -1543,7 +1640,8 @@ Specific value: `"openidconnect"`
- 15.1.3.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientSecret + 16.1.3.3.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > clientSecret +
@@ -1557,7 +1655,8 @@ Specific value: `"openidconnect"`
- 15.1.3.3.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > callbackURL + 16.1.3.3.4. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > callbackURL +
@@ -1571,7 +1670,8 @@ Specific value: `"openidconnect"`
- 15.1.3.3.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > scope + 16.1.3.3.5. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > Open ID Connect Auth Config > oidcConfig > scope +
@@ -1589,7 +1689,7 @@ Specific value: `"openidconnect"`
-#### 15.1.4. Property `GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config` +#### 16.1.4. Property `GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config` **Title:** JWT Auth Config @@ -1603,7 +1703,8 @@ Specific value: `"openidconnect"`
- 15.1.4.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > type + 16.1.4.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > type +
@@ -1619,7 +1720,8 @@ Specific value: `"jwt"`
- 15.1.4.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > enabled + 16.1.4.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > enabled +
@@ -1633,7 +1735,8 @@ Specific value: `"jwt"`
- 15.1.4.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig + 16.1.4.3. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig +
@@ -1647,7 +1750,8 @@ Specific value: `"jwt"`
- 15.1.4.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > clientID + 16.1.4.3.1. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > clientID +
@@ -1661,7 +1765,8 @@ Specific value: `"jwt"`
- 15.1.4.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > authorityURL + 16.1.4.3.2. [Required] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > authorityURL +
@@ -1675,7 +1780,8 @@ Specific value: `"jwt"`
- 15.1.4.3.3. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > expectedAudience + 16.1.4.3.3. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > expectedAudience +
@@ -1689,7 +1795,8 @@ Specific value: `"jwt"`
- 15.1.4.3.4. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping + 16.1.4.3.4. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping +
@@ -1701,7 +1808,8 @@ Specific value: `"jwt"`
- 15.1.4.3.4.1. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping > admin + 16.1.4.3.4.1. [Optional] Property GitProxy configuration file > authentication > authentication items > oneOf > JWT Auth Config > jwtConfig > roleMapping > admin +
@@ -1729,7 +1837,8 @@ Specific value: `"jwt"`
- 16. [Optional] Property GitProxy configuration file > tempPassword + 17. [Optional] Property GitProxy configuration file > tempPassword +
@@ -1743,7 +1852,8 @@ Specific value: `"jwt"`
- 16.1. [Optional] Property GitProxy configuration file > tempPassword > sendEmail + 17.1. [Optional] Property GitProxy configuration file > tempPassword > sendEmail +
@@ -1757,7 +1867,8 @@ Specific value: `"jwt"`
- 16.2. [Optional] Property GitProxy configuration file > tempPassword > emailConfig + 17.2. [Optional] Property GitProxy configuration file > tempPassword > emailConfig +
@@ -1777,7 +1888,8 @@ Specific value: `"jwt"`
- 17. [Optional] Property GitProxy configuration file > apiAuthentication + 18. [Optional] Property GitProxy configuration file > apiAuthentication +
@@ -1792,7 +1904,7 @@ Specific value: `"jwt"` | ------------------------------------------------- | ------------------------------------------ | | [authenticationElement](#apiAuthentication_items) | Configuration for an authentication source | -### 17.1. GitProxy configuration file > apiAuthentication > authenticationElement +### 18.1. GitProxy configuration file > apiAuthentication > authenticationElement | | | | ------------------------- | --------------------------------------------- | @@ -1808,7 +1920,8 @@ Specific value: `"jwt"`
- 18. [Optional] Property GitProxy configuration file > tls + 19. [Optional] Property GitProxy configuration file > tls +
@@ -1822,7 +1935,8 @@ Specific value: `"jwt"`
- 18.1. [Required] Property GitProxy configuration file > tls > enabled + 19.1. [Required] Property GitProxy configuration file > tls > enabled +
@@ -1836,7 +1950,8 @@ Specific value: `"jwt"`
- 18.2. [Required] Property GitProxy configuration file > tls > key + 19.2. [Required] Property GitProxy configuration file > tls > key +
@@ -1850,7 +1965,8 @@ Specific value: `"jwt"`
- 18.3. [Required] Property GitProxy configuration file > tls > cert + 19.3. [Required] Property GitProxy configuration file > tls > cert +
@@ -1867,7 +1983,42 @@ Specific value: `"jwt"`
- 19. [Optional] Property GitProxy configuration file > configurationSources + 20. [Optional] Property GitProxy configuration file > sslKeyPemPath + + +
+ +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Deprecated: Path to SSL private key file (use tls.key instead) + +
+
+ +
+ + 21. [Optional] Property GitProxy configuration file > sslCertPemPath + + +
+ +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Deprecated: Path to SSL certificate file (use tls.cert instead) + +
+
+ +
+ + 22. [Optional] Property GitProxy configuration file > configurationSources +
@@ -1882,7 +2033,8 @@ Specific value: `"jwt"`
- 20. [Optional] Property GitProxy configuration file > uiRouteAuth + 23. [Optional] Property GitProxy configuration file > uiRouteAuth +
@@ -1896,7 +2048,8 @@ Specific value: `"jwt"`
- 20.1. [Optional] Property GitProxy configuration file > uiRouteAuth > enabled + 23.1. [Optional] Property GitProxy configuration file > uiRouteAuth > enabled +
@@ -1910,7 +2063,8 @@ Specific value: `"jwt"`
- 20.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules + 23.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules +
@@ -1923,7 +2077,7 @@ Specific value: `"jwt"` | ----------------------------------------- | ----------- | | [routeAuthRule](#uiRouteAuth_rules_items) | - | -#### 20.2.1. GitProxy configuration file > uiRouteAuth > rules > routeAuthRule +#### 23.2.1. GitProxy configuration file > uiRouteAuth > rules > routeAuthRule | | | | ------------------------- | --------------------------- | @@ -1934,7 +2088,8 @@ Specific value: `"jwt"`
- 20.2.1.1. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > pattern + 23.2.1.1. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > pattern +
@@ -1948,7 +2103,8 @@ Specific value: `"jwt"`
- 20.2.1.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > adminOnly + 23.2.1.2. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > adminOnly +
@@ -1962,7 +2118,8 @@ Specific value: `"jwt"`
- 20.2.1.3. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > loginRequired + 23.2.1.3. [Optional] Property GitProxy configuration file > uiRouteAuth > rules > rules items > loginRequired +
@@ -1982,7 +2139,8 @@ Specific value: `"jwt"`
- 21. [Optional] Property GitProxy configuration file > upstreamProxy + 24. [Optional] Property GitProxy configuration file > upstreamProxy +
@@ -1996,7 +2154,8 @@ Specific value: `"jwt"`
- 21.1. [Optional] Property GitProxy configuration file > upstreamProxy > enabled + 24.1. [Optional] Property GitProxy configuration file > upstreamProxy > enabled +
@@ -2012,7 +2171,8 @@ Specific value: `"jwt"`
- 21.2. [Optional] Property GitProxy configuration file > upstreamProxy > url + 24.2. [Optional] Property GitProxy configuration file > upstreamProxy > url +
@@ -2029,7 +2189,8 @@ Specific value: `"jwt"`
- 21.3. [Optional] Property GitProxy configuration file > upstreamProxy > noProxy + 24.3. [Optional] Property GitProxy configuration file > upstreamProxy > noProxy +
@@ -2044,7 +2205,7 @@ Specific value: `"jwt"` | --------------------------------------------- | ----------- | | [noProxy items](#upstreamProxy_noProxy_items) | - | -#### 21.3.1. GitProxy configuration file > upstreamProxy > noProxy > noProxy items +#### 24.3.1. GitProxy configuration file > upstreamProxy > noProxy > noProxy items | | | | ------------ | -------- | @@ -2058,4 +2219,4 @@ Specific value: `"jwt"`
---------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-21 at 13:42:52 +0200 +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-13 at 15:33:22 +0100