You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was configuring Keycloak 25.0.6 through , and I needed to update the realm-management default configuration, and I came accross this edge case: I can have BearerOnly: true and ServiceAccountsEnabled: true
I don't have the reasons why there is ValidateOpenidClient, I could propose a PR if there is no obvious reason to keep the validation.
The go code that validates the openIdClient configuration
func (keycloakClient*KeycloakClient) ValidateOpenidClient(ctx context.Context, client*OpenidClient) error {
ifclient.BearerOnly&& (client.StandardFlowEnabled||client.ImplicitFlowEnabled||client.DirectAccessGrantsEnabled||client.ServiceAccountsEnabled) {
returnfmt.Errorf("validation error: Keycloak cannot issue tokens for bearer-only clients; no oauth2 flows can be enabled for this client")
}
if (client.StandardFlowEnabled||client.ImplicitFlowEnabled) &&len(client.ValidRedirectUris) ==0 {
returnfmt.Errorf("validation error: standard (authorization code) and implicit flows require at least one valid redirect uri")
}
ifclient.ServiceAccountsEnabled&&client.PublicClient {
returnfmt.Errorf("validation error: service accounts (client credentials flow) cannot be enabled on public clients")
}
serverInfo, err:=keycloakClient.GetServerInfo(ctx)
iferr!=nil {
returnerr
}
ifclient.Attributes.LoginTheme!=""&&!serverInfo.ThemeIsInstalled("login", client.Attributes.LoginTheme) {
returnfmt.Errorf("validation error: theme \"%s\" does not exist on the server", client.Attributes.LoginTheme)
}
returnnil
}
Keycloak error when setting bearerOnly: true and serviceAccountEnabled: false
Hello,
I was configuring Keycloak 25.0.6 through , and I needed to update the realm-management default configuration, and I came accross this edge case: I can have BearerOnly: true and ServiceAccountsEnabled: true
I don't have the reasons why there is ValidateOpenidClient, I could propose a PR if there is no obvious reason to keep the validation.
Keycloak error when setting
bearerOnly: true
andserviceAccountEnabled: false
The text was updated successfully, but these errors were encountered: