Open nodew opened 1 month ago
This feature is not implemented. However, you could use existing implementation and override arguments. Based on: https://www.keycloak.org/server/db
If we are talking about extending this library to support such a scenario, we can do that and I'm open for contribution.
We could implement it as suggested in the original post, but there are downsides to that - taking a dependency on actual database components is, probably, not a good idea. Let's discuss it.
Since Keycloak supports only a subset of databases, it should be easy to add support for main databases.
We could provide a simple adapter. E.g:
var pg = builder.AddPostgres("postgresql");
var pga = new KeycloakDbAdapter(pg);
var keycloak = builder
.AddKeycloakContainer("keycloak")
.WithDatabase(pga);
The Adapter could define something like this:
public interface IKeycloakDbAdapter
{
KeycloakCredential GetKeycloakCredential()
}
What I want to do is as the follow: