mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-05 12:16:52 +00:00
feat: self-hosted GitLab Apps OAuth integration
Adds self-hosted GitLab OAuth sources so Coolify can connect to a self-managed GitLab instance, list private repositories, clone over an OAuth token, and deploy (the GitLab counterpart to GitHub Apps). Hardening: authenticated, one-time team-bound OAuth callback state; token redaction in deploy logs; custom host port/path kept in clone and ls-remote URLs; submodule OAuth auth; system-wide source selection. Covered by unit and feature tests. cosigned by OpenAI Codex at M1 Max
This commit is contained in:
committed by
Andras Bacsai
parent
9d341d0bb9
commit
a26091de0a
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
it('redacts oauth2 tokens from deployment logs', function () {
|
||||
$fakeOAuthToken = str_repeat('a', 30); // ggignore
|
||||
$text = "git clone https://oauth2:{$fakeOAuthToken}@gitlab.example.com/group/repo.git /app";
|
||||
$result = remove_iip($text);
|
||||
|
||||
expect($result)->not->toContain($fakeOAuthToken);
|
||||
expect($result)->toContain('oauth2:');
|
||||
});
|
||||
|
||||
it('redacts x-access-token from logs', function () {
|
||||
$fakeToken = str_repeat('x', 40); // ggignore
|
||||
$text = "git clone https://x-access-token:{$fakeToken}@github.com/org/repo.git /app";
|
||||
$result = remove_iip($text);
|
||||
|
||||
expect($result)->not->toContain($fakeToken);
|
||||
expect($result)->toContain('x-access-token:');
|
||||
});
|
||||
|
||||
it('redacts gitlab personal access tokens', function () {
|
||||
$fakeToken = 'glpat-'.str_repeat('y', 20); // ggignore
|
||||
$text = "Authorization: Bearer {$fakeToken}";
|
||||
$result = remove_iip($text);
|
||||
|
||||
expect($result)->not->toContain($fakeToken);
|
||||
});
|
||||
Reference in New Issue
Block a user