AryanPatel226 opened a new pull request, #3749: URL: https://github.com/apache/polaris/pull/3749
<!-- ๐ Describe what changes you're proposing, especially breaking or user-facing changes. ๐ See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more. --> ## Summary Fixes the bug where the `federated` field was being ignored when creating a PrincipalRole via the API, causing all principal roles to be created as non-federated regardless of the input value. ## Changes - **Bug Fix**: Added `.setFederated(request.getPrincipalRole().getFederated())` to `PolarisServiceImpl.createPrincipalRole()` to properly preserve the federated flag from the request - **Test Enhancement**: Updated `testCreateFederatedPrincipalRoleSucceeds` to actually verify the `federated` field value in the response, not just the HTTP 201 status code ## Testing ### Manual Testing Verified the fix by running a Polaris server and executing API calls: 1. Created a principal role with `federated: true` โ correctly returned `federated: true` โ 2. Created a principal role with `federated: false` โ correctly returned `federated: false` โ 3. Verified federated roles cannot be assigned to principals (correct validation behavior) โ ## Checklist - [x] ๐ก๏ธ Don't disclose security issues! (contact [email protected]) - [x] ๐ Clearly explained why the changes are needed, or linked related issues: Fixes #2966 - [x] ๐งช Added/updated tests with good coverage, or manually tested (and explained how) - [ ] ๐ก Added comments for complex logic - [ ] ๐งพ Updated `CHANGELOG.md` (if needed) - [ ] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
