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]

Reply via email to