Skip to content

feat(cloud): wildcard (*) support for ENGRAM_CLOUD_ALLOWED_PROJECTS#431

Merged
Alan-TheGentleman merged 1 commit into
mainfrom
fix/cloud-allowed-projects-wildcard
May 27, 2026
Merged

feat(cloud): wildcard (*) support for ENGRAM_CLOUD_ALLOWED_PROJECTS#431
Alan-TheGentleman merged 1 commit into
mainfrom
fix/cloud-allowed-projects-wildcard

Conversation

@Alan-TheGentleman
Copy link
Copy Markdown
Collaborator

Summary

  • Adds * (allow-all) support to ENGRAM_CLOUD_ALLOWED_PROJECTS. With 1000+ projects, maintaining an exact-match allowlist is impractical.
  • When * is present, all projects are authorized for sync and visible in the dashboard, with no explicit listing.
  • Backward compatible: existing exact-match allowlists are unchanged.

Only * is supported (prefix globs like team-* were not requested by the issue and are left as a future extension).

Implementation

  • Auth layer (internal/cloud/auth/auth.go): SetAllowedProjects detects *allowedAll flag; AuthorizeProject/EnrolledProjects respect it.
  • Dashboard layer (internal/cloud/cloudstore/): SetDashboardAllowedProjects sets dashboardAllowedAll; scope filters skip when set.

Test plan

  • TestAuthorizeProjectWildcard, TestAuthorizeProjectWildcardMixedWithExact, TestProjectScopeAuthorizerWildcard, TestAuthorizeProjectExactMatchStillWorksAfterWildcardChange, plus 3 dashboard scope tests
  • go test ./... && go vet ./... && go build ./... clean

Closes #260

Setting ENGRAM_CLOUD_ALLOWED_PROJECTS="*" now permits any project for
both sync authorization and dashboard display, eliminating the need to
maintain exhaustive project lists in local dev / CI environments.

Closes #260
Copilot AI review requested due to automatic review settings May 27, 2026 15:28
@Alan-TheGentleman Alan-TheGentleman added the type:feature New feature label May 27, 2026
@Alan-TheGentleman Alan-TheGentleman merged commit 81e8728 into main May 27, 2026
8 of 9 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the fix/cloud-allowed-projects-wildcard branch May 27, 2026 15:30
@Alan-TheGentleman Alan-TheGentleman review requested due to automatic review settings May 27, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cloud): add wildcard support to ENGRAM_CLOUD_ALLOWED_PROJECTS for local development

1 participant