Unable to save SAML SSO form with all checkboxes disabled and empty field values

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

On a top-level group on gitlab.com, that just got it’s Premium license setup, this possible to configure SAML+SSO.

There is no SAML or SSO configured, besides the default links, yet it's not possible to disable them

image

And once you leave and go back to the page both are again enabled

image__1_

This has been tested by @jackie_fraser on staging:

I tested this workaround on staging: By first saving a "valid" 'sso url' and 'fingerprint" in the form fields, afterwards, both checkboxes could be disabled. However, the URL and fingerprint are then saved.

I'm not sure how this specific group could have become saved as enforced_sso in the first place, but I think one "bug" here is that there doesn't seem to be a way to save the form with the top 2 checkboxes disabled, without valid values also already saved in the "Identity provider single sign-on URL" and "Certificate fingerprint" fields. Even for a group that isn't stuck partially enabled.

Screen_Shot_2021-08-26_at_6.35.11_AM

Screen_Shot_2021-08-26_at_6.47.31_AM

Screen_Shot_2021-08-26_at_6.31.18_AM

Steps to reproduce

Go to a top-level groups' "Settings -> SAML SSO" page (with Premium+ license) and attempt to uncheck all SAML+SSO checkboxes and save form with empty configuration fields.

Example Project

TBD

What is the current bug behavior?

It's not possible to save a groups' SAML SSO form with disabled SAML+SSO checkboxes and empty configuration fields.

What is the expected correct behavior?

It's possible to save a groups' SAML SSO form with disabled SAML+SSO checkboxes and empty configuration fields.

If all are unchecked do not validate configuration fields but empty them and save. And, do not throw (red) error text field.

Only throw (red) error text field when SAML is enabled and invalid values are entered in the configuration fields.

Relevant logs and/or screenshots

No logs. screenshots already attached ☝️

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

TBD

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

TBD

Possible fixes

TBD

Edited by 🤖 GitLab Bot 🤖