Skip to content

feat(mac): add MacGiverClient and facsWrapper for FACS integration (Phase 1, steps 2–3)#1600

Draft
ravverma wants to merge 7 commits into
mainfrom
feat/mac-facs-integration
Draft

feat(mac): add MacGiverClient and facsWrapper for FACS integration (Phase 1, steps 2–3)#1600
ravverma wants to merge 7 commits into
mainfrom
feat/mac-facs-integration

Conversation

@ravverma
Copy link
Copy Markdown
Contributor

  • Add spacecat-shared-mac-giver-client package with MacGiverClient (getPermissions + checkPermission via POST /api/facs/permissions/check) and macGiverClientWrapper; defaults MACGIVER_BASE_URL to localhost:8080
  • Add AuthInfo.getFacsPermissions() and hasFacsPermission() to http-utils
  • Add facsWrapper to http-utils: enforces FACS permissions per route with internal-identity bypass, internal-org bypass, LD feature-flag gate, deny-by-default for unmapped routes, and x-product header composition
  • Export FF_MAC_FACS_PERMISSIONS and X_PRODUCT_HEADER from constants

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

ravverma and others added 2 commits May 8, 2026 17:06
…hase 1, steps 2–3)

- Add spacecat-shared-mac-giver-client package with MacGiverClient
  (getPermissions + checkPermission via POST /api/facs/permissions/check)
  and macGiverClientWrapper; defaults MACGIVER_BASE_URL to localhost:8080
- Add AuthInfo.getFacsPermissions() and hasFacsPermission() to http-utils
- Add facsWrapper to http-utils: enforces FACS permissions per route with
  internal-identity bypass, internal-org bypass, LD feature-flag gate,
  deny-by-default for unmapped routes, and x-product header composition
- Export FF_MAC_FACS_PERMISSIONS and X_PRODUCT_HEADER from constants

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

This PR will trigger a minor release when merged.

ravverma and others added 5 commits May 12, 2026 14:22
… with current guard message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ACS_EXCEPTION_INTERNAL_ORGS

- FF_MAC_FACS_PERMISSIONS is now a map from uppercased product code to flag key
  (e.g. { LLMO: 'FT_LLMO-3026' }); products without an entry bypass FACS
- Wrapper resolves x-product header first, looks up the per-product flag, and
  bypasses (without calling LD) when no flag is configured for the product
- Rename internal-org bypass env var INTERNAL_IMS_ORG_IDS to FACS_EXCEPTION_INTERNAL_ORGS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ervice token

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant