I will answer my own question
It is supported out of the box   in
org.keycloak.models.jpa.entities UserEntity 
@Table(name="USER_ENTITY", uniqueConstraints = {
        @UniqueConstraint(columnNames = { "REALM_ID", "USERNAME" }),
        @UniqueConstraint(columnNames = { "REALM_ID", "EMAIL_CONSTRAINT" })
Cool stuff,
George







On 06/12/2015 01:07 PM, George Leon wrote:


Hi Keycloak Team ,



Best way to add Unique constraint  to username and email in Keycloak ?


Best Regards
George Leon