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

Fix incorrect SSO behaviour following 2.4.0 --> 2.6.0 upgrade #4015

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/jetstream/repository/console_config/env_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,14 @@ func MigrateSetupData(portal interfaces.PortalProxy, configStore Repository) err
return err
}

if err := migrateConfigSetting(portal.Env(), configStore, "SSO_LOGIN", strconv.FormatBool(config.UseSSO), "false"); err != nil {
return err
// Don't store previous SSO_LOGIN value if it's false.
// SSO_LOGIN was incorrectly being set in previous console config table, this was then transferred over here where the console expects
// previous values to have been explicitly set by user (and as such should take precedents over env vars)
// See https://github.com/cloudfoundry/stratos/issues/4013
if config.UseSSO == true {
if err := migrateConfigSetting(portal.Env(), configStore, "SSO_LOGIN", strconv.FormatBool(config.UseSSO), "false"); err != nil {
return err
}
}

// Delete the content form the legacy table
Expand Down