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:
Mike Chong authored and Andras Bacsai committed 2026-07-20 23:21:40 +02:00
1 parent 9d341d0bb9
commit a26091de0a
32 files changed
+2216 -26

No files matched your search

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('gitlab_apps', function (Blueprint $table) {
$table->longText('client_id')->nullable()->after('app_secret');
$table->longText('client_secret')->nullable()->after('client_id');
$table->longText('access_token')->nullable()->after('client_secret');
$table->longText('refresh_token')->nullable()->after('access_token');
$table->integer('expires_at')->nullable()->after('refresh_token');
$table->string('redirect_uri')->nullable()->after('expires_at');
});
}
public function down(): void
{
Schema::table('gitlab_apps', function (Blueprint $table) {
$table->dropColumn([
'client_id',
'client_secret',
'access_token',
'refresh_token',
'expires_at',
'redirect_uri',
]);
});
}
};