Skip to content

Conversation

@eliykat
Copy link
Member

@eliykat eliykat commented Dec 9, 2021

Type of change

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

Objective

Required to support bitwarden/web#1332. Because we disable the inactive SSO fields (e.g. disable SAML if configuring OpenId), that field data is not sent to the server. This is a slight change in behaviour, as previously you could save both an OpenId and SAML configuration and switch between them. However, after discussing with Jordan, we were unable to identify a use case for this. I assume it's probably an unintended side-effect of using template forms.

Most types are nullable by default, we just need to make the bools nullable and then call getValueOrDefault() when mapping it over to the data model.

Before you submit

  • If making database changes - I have also updated Entity Framework queries and/or migrations
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@Hinton
Copy link
Member

Hinton commented Dec 9, 2021

@eliykat Does this mean we reset the values if a user switches between SAML and OpenID? I suspect it's a fairly rare scenario, but currently we don't reset them when switching between, so you could in theory have two working configs that you can easily switch between.

@eliykat
Copy link
Member Author

eliykat commented Dec 9, 2021

Yes that's correct. This PR will change the current behaviour so that you can only store 1 config at a time. I did discuss it with Jordan (who deals directly with users to troubleshoot SSO issues) and we couldn't identify any need for the current behaviour - i.e. we do not think there is a use case for having 2 different SSO configs and switching between them in production.

It's also contrary to the form design, which presents the two options as either-or. I suspect that users do not currently expect the non-selected SSO type to be saved.

@eliykat eliykat merged commit 3ae573b into master Dec 14, 2021
@eliykat eliykat deleted the fix/sso-validation branch December 14, 2021 10:02
dlundgren pushed a commit to dlundgren/server that referenced this pull request Dec 14, 2021
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