Skip to content

Commit 3e5b50f

Browse files
committed
[CLOUDTRUST-8008] Add BO external IDP management flag
1 parent 9a99d53 commit 3e5b50f

6 files changed

Lines changed: 16 additions & 5 deletions

File tree

api/account/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ type Configuration struct {
157157
PhysicalIdentificationAllowedRoles []string `json:"physical_identification_allowed_roles"`
158158
AllowedBackURLs []string `json:"allowed_back_urls"`
159159
AllowInitialPasswordDefinition *bool `json:"allow_initial_password_definition"`
160-
IdentificationURL *string `json:"identification_url"`
160+
IdentificationURL *string `json:"identification_url"`
161+
BOExternalIDPManagementEnabled *bool `json:"bo_external_idp_management_enabled"`
161162
}
162163

163164
// UpdatePasswordBody is the definition of the expected body content of UpdatePassword method

api/management/api.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ type RealmAdminConfiguration struct {
339339
AutoGeneratedUsernameEnabled *bool `json:"auto_generated_username_enabled"`
340340
AutoGeneratedUsernameToggleEnabled *bool `json:"auto_generated_username_toggle_enabled"`
341341
RegisterMode *string `json:"register_mode"`
342+
BOExternalIDPManagementEnabled *bool `json:"bo_external_idp_management_enabled"`
342343
}
343344

344345
// RealmAdminAccreditation struct
@@ -916,6 +917,7 @@ func ConvertRealmAdminConfigurationFromDBStruct(conf configuration.RealmAdminCon
916917
AutoGeneratedUsernameEnabled: defaultBool(conf.AutoGeneratedUsernameEnabled, false),
917918
AutoGeneratedUsernameToggleEnabled: defaultBool(conf.AutoGeneratedUsernameToggleEnabled, false),
918919
RegisterMode: defaultString(conf.RegisterMode, "default"),
920+
BOExternalIDPManagementEnabled: defaultBool(conf.BOExternalIDPManagementEnabled, false),
919921
}
920922
}
921923

@@ -952,6 +954,7 @@ func (rac RealmAdminConfiguration) ConvertToDBStruct() configuration.RealmAdminC
952954
AutoGeneratedUsernameEnabled: rac.AutoGeneratedUsernameEnabled,
953955
AutoGeneratedUsernameToggleEnabled: rac.AutoGeneratedUsernameToggleEnabled,
954956
RegisterMode: rac.RegisterMode,
957+
BOExternalIDPManagementEnabled: rac.BOExternalIDPManagementEnabled,
955958
}
956959
}
957960

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/cloudtrust/keycloak-bridge
33
go 1.25.3
44

55
require (
6-
github.com/cloudtrust/common-service/v2 v2.17.0
6+
github.com/cloudtrust/common-service/v2 v2.17.1-0.20260225124935-dc4023bd830e
77
github.com/cloudtrust/httpclient v1.6.0
88
github.com/cloudtrust/kafka-client v1.7.2
99
github.com/cloudtrust/keycloak-client/v2 v2.17.0
@@ -46,7 +46,7 @@ require (
4646
github.com/jcmturner/gofork v1.7.6 // indirect
4747
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
4848
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
49-
github.com/klauspost/compress v1.18.1 // indirect
49+
github.com/klauspost/compress v1.18.4 // indirect
5050
github.com/nyaruka/phonenumbers v1.6.10 // indirect
5151
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
5252
github.com/pierrec/lz4/v4 v4.1.22 // indirect

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd
88
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
99
github.com/cloudtrust/common-service/v2 v2.17.0 h1:0OWOZ+VQ0lWupp+wXPMKjgJFqLiXXDHQWHPmInrtK6k=
1010
github.com/cloudtrust/common-service/v2 v2.17.0/go.mod h1:p1jDdOVLkYAg6/0u9D9Akg+QBj1VbIT5aktbJ3DcQ14=
11+
github.com/cloudtrust/common-service/v2 v2.17.1-0.20260224142134-b7f60514c29f h1:ywLA+OC/bWSioF2umc0GONizuRURhkGvA74bs7XCx6c=
12+
github.com/cloudtrust/common-service/v2 v2.17.1-0.20260224142134-b7f60514c29f/go.mod h1:n31FTuCITidJUn0E1nLsR0b/VnAG6TztT8MYZtQFEuk=
13+
github.com/cloudtrust/common-service/v2 v2.17.1-0.20260225124935-dc4023bd830e h1:tRKO1Ans+5zjKE6Xo/ugpEnC9/7Xl067G7CW62szTUI=
14+
github.com/cloudtrust/common-service/v2 v2.17.1-0.20260225124935-dc4023bd830e/go.mod h1:n31FTuCITidJUn0E1nLsR0b/VnAG6TztT8MYZtQFEuk=
1115
github.com/cloudtrust/httpclient v1.6.0 h1:/E/y2wZNyUIjADbP3RLI2pLTWdNvcFSLe1MeRD6RlN4=
1216
github.com/cloudtrust/httpclient v1.6.0/go.mod h1:CK0idOHAQ2CiN2GFOwIYP5hDl2tfUgGdTI9n7Ygbnrs=
1317
github.com/cloudtrust/kafka-client v1.7.2 h1:wezQkWb4nMA2u6PP+x8e54GrZTvEOHQkFuyOziB7Ea0=
@@ -77,6 +81,8 @@ github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZ
7781
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
7882
github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=
7983
github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0=
84+
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
85+
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
8086
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
8187
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
8288
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

pkg/account/component.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ func (c *component) GetConfiguration(ctx context.Context, realmIDOverride string
548548
OnboardingUserEditingEnabled: config.OnboardingUserEditingEnabled,
549549
AllowInitialPasswordDefinition: config.APISelfInitialPasswordDefinitionAllowed,
550550
IdentificationURL: config.IdentificationURL,
551+
BOExternalIDPManagementEnabled: adminConfig.BOExternalIDPManagementEnabled,
551552
}
552553

553554
if realmIDOverride != "" {

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ filippo.io/edwards25519/field
77
github.com/IBM/sarama
88
# github.com/VividCortex/gohistogram v1.0.0
99
## explicit
10-
# github.com/cloudtrust/common-service/v2 v2.17.0
10+
# github.com/cloudtrust/common-service/v2 v2.17.1-0.20260225124935-dc4023bd830e
1111
## explicit; go 1.25.3
1212
github.com/cloudtrust/common-service/v2
1313
github.com/cloudtrust/common-service/v2/configuration
@@ -148,7 +148,7 @@ github.com/jcmturner/gokrb5/v8/types
148148
## explicit; go 1.13
149149
github.com/jcmturner/rpc/v2/mstypes
150150
github.com/jcmturner/rpc/v2/ndr
151-
# github.com/klauspost/compress v1.18.1
151+
# github.com/klauspost/compress v1.18.4
152152
## explicit; go 1.23
153153
github.com/klauspost/compress
154154
github.com/klauspost/compress/flate

0 commit comments

Comments
 (0)