File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
fleetshard/pkg/central/reconciler Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 6464 RoleName : "Admin" ,
6565 }
6666 },
67+ func (providerId string , auth private.ManagedCentralAllOfSpecAuth ) * storage.Group {
68+ return & storage.Group {
69+ Props : & storage.GroupProperties {
70+ AuthProviderId : providerId ,
71+ Key : "rh_is_org_admin" ,
72+ Value : "true" ,
73+ Traits : & storage.Traits {
74+ MutabilityMode : storage .Traits_ALLOW_MUTATE_FORCED ,
75+ },
76+ },
77+ RoleName : "Admin" ,
78+ }
79+ },
6780 }
6881)
6982
@@ -163,9 +176,17 @@ func createAuthProviderRequest(central private.ManagedCentral) *storage.AuthProv
163176 },
164177 ClaimMappings : map [string ]string {
165178 "realm_access.roles" : "groups" ,
179+ "org_id" : "rh_org_id" ,
180+ "is_org_admin" : "rh_is_org_admin" ,
166181 },
167182 // TODO: for testing purposes only; remove once host is correctly specified in fleet-manager
168183 ExtraUiEndpoints : []string {"localhost:8443" },
184+ RequiredAttributes : []* storage.AuthProvider_RequiredAttribute {
185+ {
186+ AttributeKey : "rh_org_id" ,
187+ AttributeValue : central .Spec .Auth .OwnerOrgId ,
188+ },
189+ },
169190 Traits : & storage.Traits {
170191 MutabilityMode : storage .Traits_ALLOW_MUTATE_FORCED ,
171192 },
You can’t perform that action at this time.
0 commit comments