-
Notifications
You must be signed in to change notification settings - Fork 37
feat: Cloudflare JWT Assertion Authentication Method #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1d4c1e0
1385c24
b147183
cd441d9
9f36854
1f2aba0
4611618
b37ece7
dcd051e
280e910
659619a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,25 +24,6 @@ jobs: | |
| working-directory: control-plane | ||
| run: go run ./cmd/migrationcheck | ||
|
|
||
| - name: Guard against model changes without a new migration | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| run: | | ||
| set -euo pipefail | ||
| # Compare against the merge base on PRs; against the previous commit on push. | ||
| if [ -n "${GITHUB_BASE_REF:-}" ]; then | ||
| base="origin/${GITHUB_BASE_REF}" | ||
| git fetch --no-tags --depth=1 origin "${GITHUB_BASE_REF}" | ||
| else | ||
| base="HEAD~1" | ||
| fi | ||
| changed_models=$(git diff --name-only "$base"...HEAD -- 'control-plane/internal/database/models/*.go' || true) | ||
| new_migrations=$(git diff --name-only --diff-filter=A "$base"...HEAD -- 'control-plane/internal/database/migrations/migration_*.go' || true) | ||
| if [ -n "$changed_models" ] && [ -z "$new_migrations" ]; then | ||
| echo "ERROR: models.go changed but no new migration_*.go was added." | ||
| echo " Run 'make migration' from control-plane/ to author one." | ||
| exit 1 | ||
| fi | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jeremyhart why did you decide to remove this step?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, that wasn't meant to make it through to the PR
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you restore the file content? |
||
| unit: | ||
| name: Unit Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { ShieldCheck } from "lucide-react"; | ||
|
|
||
| // Shown on /login when Cloudflare Access (Zero Trust) is the active auth mode. | ||
| // There is no username/password form: identity is established by Cloudflare at | ||
| // the edge. A user landing here is either signed out of Cloudflare Access or has | ||
| // no matching Claworc account, so reloading re-runs the Access challenge. | ||
| export default function CloudflareLoginNotice() { | ||
| return ( | ||
| <div className="min-h-screen flex items-center justify-center bg-gray-50"> | ||
| <div className="w-full max-w-sm"> | ||
| <div className="bg-white rounded-lg shadow-sm border border-gray-200 p-6 text-center"> | ||
| <div className="flex justify-center mb-3"> | ||
| <ShieldCheck size={32} className="text-blue-600" /> | ||
| </div> | ||
| <h1 | ||
| data-testid="cf-login-title" | ||
| className="text-xl font-semibold text-gray-900 mb-1" | ||
| > | ||
| Sign in via Cloudflare Access | ||
| </h1> | ||
| <p className="text-sm text-gray-500 mb-6">OpenClaw Orchestrator</p> | ||
| <p className="text-sm text-gray-600 mb-6"> | ||
| This deployment authenticates through your organization's Cloudflare | ||
| Access. If you reached this page, your session may have expired or | ||
| your account isn't provisioned yet. | ||
| </p> | ||
| <button | ||
| data-testid="cf-reload-button" | ||
| onClick={() => window.location.reload()} | ||
| className="w-full px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700" | ||
| > | ||
| Retry sign in | ||
| </button> | ||
| <p className="text-xs text-gray-400 mt-4"> | ||
| If the problem persists, contact your administrator to confirm your | ||
| email is registered. | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?