micedre/keycloak-mail-whitelisting

Not working on Keycloak 17 (quarkus)

xgaia opened this issue · 2 comments

xgaia commented

Hello @micedre,
I'm trying to install keycloak-mail-whitelisting on Keycloak 17 (docker). I copied the keycloak-mail-whitelisting-1.3.3.jar into /opt/keycloak/standalone/deployments but I can't see the Profile Validation With Email Domain Check on the execution menu.

image

Is keycloak-mail-whitelisting it compatible with KeyCloak 17 ?

[root@b4030626acf8 deployments]# pwd
/opt/keycloak/standalone/deployments
[root@b4030626acf8 deployments]# ls -lh
total 8.0K
-rw-r--r-- 1 keycloak root 6.6K Aug  2  2021 keycloak-mail-whitelisting-1.3.3.jar

Here is the docker logs:

Changes detected in configuration. Updating the server image.
Updating the configuration and installing your custom providers, if any. Please wait.
2022-02-22 11:38:50,557 INFO  [org.keycloak.common.Profile] (build-10) Preview feature enabled: token_exchange
2022-02-22 11:38:50,925 WARN  [org.keycloak.services] (build-10) KC-SERVICES0047: restrict-client-auth-authenticator (de.sventorben.keycloak.authorization.client.RestrictClientAuthAuthenticatorFactory) is implementing the internal SPI authenticator. This SPI is internal and may change without notice
2022-02-22 11:38:50,958 WARN  [org.keycloak.services] (build-10) KC-SERVICES0047: client-role (de.sventorben.keycloak.authorization.client.access.role.ClientRoleBasedAccessProviderFactory) is implementing the internal SPI restrict-client-auth-access-provider. This SPI is internal and may change without notice
2022-02-22 11:38:50,958 WARN  [org.keycloak.services] (build-10) KC-SERVICES0047: policy (de.sventorben.keycloak.authorization.client.access.policy.PolicyBasedAccessProviderFactory) is implementing the internal SPI restrict-client-auth-access-provider. This SPI is internal and may change without notice
2022-02-22 11:38:53,716 INFO  [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 4015ms
Server configuration updated and persisted. Run the following command to review the configuration:

  kc.sh show-config

Next time you run the server, just run:

  kc.sh start --hostname-strict=false --db-url=jdbc:postgresql://postgres:5432/keycloak --db-username=keycloak --db-password=*******

2022-02-22 11:38:55,978 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: token_exchange
2022-02-22 11:38:55,984 INFO  [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: <request>, Strict HTTPS: true, Path: <request>, Strict BackChannel: false, Admin: <request>
2022-02-22 11:38:56,568 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2022-02-22 11:38:56,605 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2022-02-22 11:38:56,632 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2022-02-22 11:38:56,782 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.5.Final
2022-02-22 11:38:56,892 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2022-02-22 11:38:56,893 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2022-02-22 11:38:56,977 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-02-22 11:38:56,977 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20.00MB, but the OS only allocated 212.99KB
2022-02-22 11:38:56,977 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-02-22 11:38:56,977 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25.00MB, but the OS only allocated 212.99KB
2022-02-22 11:38:58,984 INFO  [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) b4030626acf8-32232: no members discovered after 2002 ms: creating cluster as coordinator
2022-02-22 11:38:58,994 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [b4030626acf8-32232|0] (1) [b4030626acf8-32232]
2022-02-22 11:38:59,001 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `b4030626acf8-32232`, physical addresses are `[172.21.0.3:40126]`
2022-02-22 11:38:59,417 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: b4030626acf8-32232, Site name: null
2022-02-22 11:38:59,705 INFO  [io.quarkus] (main) Keycloak 17.0.0 on JVM (powered by Quarkus 2.7.0.Final) started in 5.871s. Listening on: http://0.0.0.0:8080
2022-02-22 11:38:59,705 INFO  [io.quarkus] (main) Profile prod activated. 
2022-02-22 11:38:59,705 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, infinispan-client, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, narayana-jta, reactive-routes, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vault, vertx]

Quarkus changes the extensions folder. Did you try with /opt/keycloak/providers/ ?

A simple docker run like this :

docker run -v keycloak-provider:/opt/keycloak/providers -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak start-dev

With the keycloak-provider volume containing the jar seems to work fine.

xgaia commented

🥳 thanks it's working with the new directory. I sent you a PR (#42 ) with some docs