Skip to content
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

[AC-1438] Updated SCIM controllers to respond with "content-Type: application/scim+json" #3072

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

r-tome
Copy link
Contributor

@r-tome r-tome commented Jul 5, 2023

Type of change

- [ ] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [X] Other

Objective

Microsoft reviewed our integration and provided the following feedback, as it is a requirement to add our integration to their catalog.

The content-Type: application/scim+json should be in the response header of all of our SCIM responses.

Code changes

  • bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: Added content-Type: application/scim+json to responses
  • bitwarden_license/src/Scim/Controllers/v2/UsersController.cs: Added content-Type: application/scim+json to responses
  • bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/GroupsControllerTests.cs: Asserting the response content type
  • bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/UsersControllerTests.cs: Asserting the response content type

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@r-tome r-tome marked this pull request as ready for review July 5, 2023 14:55
@r-tome r-tome requested a review from a team as a code owner July 5, 2023 14:55
Copy link
Member

@eliykat eliykat left a comment

Choose a reason for hiding this comment

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

I didn't know about the Produces attribute, easy fix.

@r-tome
Copy link
Contributor Author

r-tome commented Jul 17, 2023

I didn't know about the Produces attribute, easy fix.

I only learnt about it to use it here. My initial idea was to configure this on Startup using Middleware or something similar to that. I'm glad this exists, its way cleaner.

@bitwarden-devops-bot bitwarden-devops-bot temporarily deployed to QA Cloud August 2, 2023 01:09 Inactive
@r-tome r-tome removed the needs-qa label Aug 2, 2023
@r-tome r-tome merged commit 4a110ad into master Aug 2, 2023
81 of 82 checks passed
@r-tome r-tome deleted the AC-1438-scim-update-for-microsoft branch August 2, 2023 10:03
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