micedre/keycloak-mail-whitelisting

Execution isn't showing up

Closed this issue · 9 comments

We're looking for something quite similar to this, so was testing it locally. Built the jar and added it to standalone/deployments, and it looks like it deployed properly:

test04_keycloak.1.vha615uf5w1@ip-1-2-3-4    | 14:45:59,762 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 35) WFLYSRV0010: Deployed "keycloak-mail-whitelisting-1.2-SNAPSHOT.jar" (runtime-name : "keycloak-mail-whitelisting-1.2-SNAPSHOT.jar")

No errors reported, so assuming the deployment was OK.

Went into the admin console and pulled up my realm, copied the auth registration flow, and clicked on "add execution". In the resulting drop down, there's no option for Profile Validation With Email Domain Check. I don't really see anything new actually.

How do I figure out what's missing?

Adding some basic logging/debug statements at the top of every method. When I go to the "add execution" page, it is calling into the objects:

test04_keycloak.1.ildg91vpcgyf@ip-1-2-3-4    | 19:56:02,786 INFO  [net.micedre.keycloak.registration.RegistrationProfileWithMailDomainCheck] (default task-1) -------------------- IN getId() -------------------- registration-mail-check-action
test04_keycloak.1.ildg91vpcgyf@ip-1-2-3-4    | 19:56:02,788 INFO  [net.micedre.keycloak.registration.RegistrationProfileWithMailDomainCheck] (default task-1) -------------------- IN getHelpText() --------------------
test04_keycloak.1.ildg91vpcgyf@ip-1-2-3-4    | 19:56:02,788 INFO  [net.micedre.keycloak.registration.RegistrationProfileWithMailDomainCheck] (default task-1) -------------------- IN getDisplayType() --------------------

However the list still contains no "Profile Validation With Email Domain Check" entry:
Screen Shot 2021-03-24 at 3 59 13 PM

Ah.... never mind.

I was trying to add it by clicking the "add execution" button at the top of the auth table. But you have to find the "actions" drop down beside the specific row for your registration form, and then selecting "add execution" from that drop down list. Kind of a sketchy interface on KeyCloak's part.

Seems to be working - sorry for the user error.

teebu commented

Keycloak: Server Version 14.0.0

I see logs say its added:

23:35:24,363 WARN  [org.keycloak.services] (MSC service thread 1-1) KC-SERVICES0047: registration-mail-check-action (net.micedre.keycloak.registration.RegistrationProfileWithMailDo
mainCheck) is implementing the internal SPI form-action. This SPI is internal and may change without notice
23:35:24,428 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "keycloak-mail-whitelisting-1.3.3.jar" (runtime-name : "keycloak-mail-whitelisting-1.
3.3.jar")

Where is this option? I can't find it either. Needs better instructions.
image

image

image

solution:

image

thank you, I will try to clarify the doc

image
Followed the steps by @teebu but still can't find "Profile Validation With Email Domain Check"

I'm using v1.3.3 .jar file and it's also deployed after I restarted the docker container. Am I missing something?

Could you paste the entire startup log ? Which keycloak version are you using ?

Here's the entire log. Apologies, I quite new to Docker and ran the first command I could come across for logs. Also, I'm using the latest stable version of keycloak: v16.1.0

it seems the jar deployed is keycloak-mail-whitelisting-1.3.3-javadoc.jar

04:06:38,929 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "keycloak-mail-whitelisting-1.3.3-javadoc.jar" (runtime-name: "keycloak-mail-whitelisting-1.3.3-javadoc.jar")

You need keycloak-mail-whitelisting-1.3.3.jar only in the deployment folder

Got it. Worked fine after deploying the correct file, a silly mistake on my part. Thanks for helping though!