I'm trying to sync Clients from external source to Keycloak via the Client Registration API using the Keycloak Client Representation. It allows setting the Client Secret when creating the Client, but not updating it. The Admin API has the same issue, Client Secret can't be set to a specific value on update.
As a workaround I tried to recreate the Client using the same Id and clientId, but all consents given by users are removed, which is unacceptable as a workaround.
Proposed solution is to allow updating Client Secret via the Client Registration API using the Keycloak Client Representation, which already allows setting it on creating. Having a special permission for this would be fine. Also adding this to the Admin Endpoints would make sense for feature party.