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

+20 -2
View File
@@ -5,9 +5,12 @@
<div class="flex items-center gap-2">
<h1>Sources</h1>
@can('createAnyResource')
<x-modal-input buttonTitle="+ Add" title="New GitHub App" :closeOutside="false">
<x-modal-input buttonTitle="+ Add GitHub" title="New GitHub App" :closeOutside="false">
<livewire:source.github.create />
</x-modal-input>
<x-modal-input buttonTitle="+ Add GitLab" title="New GitLab App" :closeOutside="false">
<livewire:source.gitlab.create />
</x-modal-input>
@endcan
</div>
<div class="subtitle">Git sources for your applications.</div>
@@ -17,7 +20,6 @@
<a class="flex gap-2 text-center hover:no-underline coolbox group"
{{ wireNavigate() }}
href="{{ route('source.github.show', ['github_app_uuid' => data_get($source, 'uuid')]) }}">
{{-- <x-git-icon class="dark:text-white w-8 h-8 mt-1" git="{{ $source->getMorphClass() }}" /> --}}
<div class="text-left dark:group-hover:text-white flex flex-col justify-center mx-6">
<div class="box-title">{{ $source->name }}</div>
@if (is_null($source->app_id))
@@ -29,6 +31,22 @@
@endif
</div>
</a>
@elseif ($source->getMorphClass() === 'App\Models\GitlabApp')
<a class="flex gap-2 text-center hover:no-underline coolbox group"
{{ wireNavigate() }}
href="{{ route('source.gitlab.show', ['gitlab_app_uuid' => data_get($source, 'uuid')]) }}">
<div class="text-left dark:group-hover:text-white flex flex-col justify-center mx-6">
<div class="box-title">
<x-git-icon class="inline-block w-4 h-4 mr-1" git="App\Models\GitlabApp" />
{{ $source->name }}
</div>
@if ($source->isConnected())
<span class="box-description text-success">Connected — {{ $source->html_url }}</span>
@else
<span class="box-description text-warning">Setup required — {{ $source->html_url }}</span>
@endif
</div>
</a>
@endif
@empty
<div>