Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Cedar authorization policies by updating the migration script to also re-migrate groups with old-format policies (using principal in RocketAdmin::Group instead of bare principal), and adds Cedar policy generation to the DemoDataService so demo connections get proper Cedar policies on creation.
Changes:
- Updated
migratePermissionsToCedarto detect and re-migrate old-format Cedar policies using aLIKEclause - Added Cedar policy generation step in
DemoDataService.createDemoData()after creating groups/permissions, with care to avoid TypeORM wiping the join table - Added comprehensive e2e tests for both SaaS and non-SaaS Cedar migration scenarios
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| backend/src/entities/cedar-authorization/scripts/migrate-permissions-to-cedar.ts | Broadened migration query to also re-migrate old-format Cedar policies |
| backend/src/entities/demo-data/demo-data.service.ts | Added Cedar policy generation for demo data groups |
| backend/src/helpers/constants/constants.ts | Whitespace-only change |
| backend/test/ava-tests/saas-tests/saas-cedar-migration-existing-users-e2e.test.ts | New e2e tests for SaaS Cedar migration |
| backend/test/ava-tests/non-saas-tests/non-saas-cedar-migration-existing-users-e2e.test.ts | New e2e tests for non-SaaS Cedar migration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.