Skip to content

Refactor Mappings in SAML2ClientAddon from map[string]string to map[string]interface{} for enhanced flexibility #533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

developerkunal
Copy link
Contributor

🔧 Changes

  • Updated Mappings field in SAML2ClientAddon from map[string]string to map[string]interface{}.
  • Allows for greater flexibility by supporting both string and array values in SAML assertions.

📚 References

N/A

🔬 Testing

  • Verified that existing SAML mappings work as expected.
  • Manually tested to confirm that both string and array values are correctly processed in assertions.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@developerkunal developerkunal requested a review from a team as a code owner March 27, 2025 11:06
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.85%. Comparing base (e865086) to head (8bb22a1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #533   +/-   ##
=======================================
  Coverage   95.85%   95.85%           
=======================================
  Files          59       59           
  Lines       11540    11540           
=======================================
  Hits        11062    11062           
  Misses        359      359           
  Partials      119      119           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@developerkunal developerkunal requested a review from Copilot March 31, 2025 13:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the SAML2ClientAddon to support a more flexible mapping type by changing the Mappings field from map[string]string to map[string]interface{}. The key changes include updating the test file, modifying the accessor method in the generated code, and updating the client structure with an expanded JSON schema for Mappings.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
management/management.gen_test.go Updated the test to use the new flexible map type
management/management.gen.go Changed the GetMappings method to return map[string]interface{} instead of map[string]string
management/client.go Modified the SAML2ClientAddon struct to support interface values in Mappings

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.

3 participants