Repository navigation
Cloudflare: --auth login and token via Cloudflare Access; default public provider Cloudflare - #6
Merged
Merged
Conversation
…lic provider Cloudflare - login: one Access app per service, reusable policy allowing the --allow emails, email one-time-code login (enabled on the Zero Trust org if missing). - token: an Access service token; clients send CF-Access-Client-Id/-Secret. - password stays Pangolin-only (a WAF block can't send WWW-Authenticate). - expose waits until credential-less requests are refused; unexpose and rollback remove the app, policy and service token. - Default public provider is now Cloudflare (Pangolin if only Pangolin is set up); --auth password picks Pangolin, bearer picks Cloudflare. - Fix rollback traps: they referenced $fqdn after errexit had unwound the function's locals, so a failed expose aborted its own rollback. - 0.6.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
--via cloudflare --auth login --allow a@x.com,b@y.com: creates a Cloudflare Access self-hosted appomarchy-remote:<name>:login, guarded by a reusable policyomarchy-remote:<name>that allows those emails. Login uses an email one-time code (allowed_idps= the account's one-time PIN method,auto_redirect_to_identity). If the Zero Trust org doesn't have one-time PIN yet, it is added.--via cloudflare --auth token: creates an Access service tokenomarchy-remote:<name>and anon_identity(Service Auth) policy. Clients sendCF-Access-Client-Id/CF-Access-Client-Secret.exposewaits for a credential-less 302/401/403 before it reports success.unexposeand rollback delete the app, then the policy, then the service token. When the token has no Access permissions (bearer-only setups), these steps are skipped quietly.--auth passwordon Cloudflare is refused with a hint: a WAF block can't sendWWW-Authenticate, so browsers would never see a prompt.passwordpicks Pangolin andbearerpicks Cloudflare. An explicitconfig set publicstill wins.$fqdnafter errexit had unwound the function's locals (fqdn: unbound variable), so a failedexposeaborted its own rollback. This affected Pangolin and Cloudflare bearer too.Testing
shellcheck install.sh bin/omarchy-remoteis clean.POST /access/policies, apps with policy links{id, precedence}, service tokens, identity providerstype: onetimepin).--allow, password on Cloudflare;🤖 Generated with Claude Code