New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using kcadm.sh create components result to 400 Bad Request #25746
Labels
Comments
If you run the server with --log-level=debug you may see:
Can you use debug to see what exactly is the problem on the server side? Ideally the exception message should be provided to the admin client in some form, unforutnately all that is conveyed is the bad request message. This issue should at least cover improving that. |
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Dec 27, 2023
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Jan 3, 2024
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Jan 3, 2024
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Jan 4, 2024
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Jan 5, 2024
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Jan 5, 2024
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
added a commit
to shawkins/keycloak
that referenced
this issue
Jan 8, 2024
closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
ghost
removed
the
status/triage
label
Jan 8, 2024
pedroigor
pushed a commit
to alice-wondered/keycloak
that referenced
this issue
Jan 12, 2024
keycloak#25806) closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
wistefan
pushed a commit
to wistefan/keycloak
that referenced
this issue
Jan 17, 2024
keycloak#25806) closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com> Signed-off-by: Stefan Wiedemann <wistefan@googlemail.com>
kamontat
pushed a commit
to kamontat/keycloak
that referenced
this issue
Jan 20, 2024
keycloak#25806) closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com> Signed-off-by: Kamontat Chantrachirathumrong <14089557+kamontat@users.noreply.github.com>
ShefeeqPM
pushed a commit
to ShefeeqPM/keycloak
that referenced
this issue
Jan 27, 2024
keycloak#25806) closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com> Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
ahus1
pushed a commit
to ahus1/keycloak
that referenced
this issue
Mar 22, 2024
keycloak#25806) closes: keycloak#25746 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Before reporting an issue
Area
admin/cli
Describe the bug
I'm using Keycloak 23.0.3 in Docker. After launch the container and the container is ready, I authenticate as admin, using
kcadm.sh config credentials --server http://localhost:$KC_INTERNAL_PORT --user $KEYCLOAK_ADMIN --password $KEYCLOAK_ADMIN_PASSWORD --realm master
. After that, I create a realm being my-realm, and I want to create a component usingkcadm.sh create components -r my-realm -s name=my-realm-component -s parentId=my-realm -s providerId=my-component-id -s providerType=my.package.providerType
. This request gives me a 400 Bad Request.With the parameter -x, the stacktrace is :
null [HTTP 400 Bad Request] org.keycloak.client.admin.cli.util.HttpResponseException: null [HTTP 400 Bad Request] at org.keycloak.client.admin.cli.util.HeadersBodyStatus.checkSuccess(HeadersBodyStatus.java:61) at org.keycloak.client.admin.cli.util.HttpUtil.checkSuccess(HttpUtil.java:353) at org.keycloak.client.admin.cli.commands.AbstractRequestCmd.process(AbstractRequestCmd.java:365) at org.keycloak.client.admin.cli.commands.AbstractRequestCmd.execute(AbstractRequestCmd.java:128) at org.jboss.aesh.console.command.container.DefaultCommandContainer.executeCommand(DefaultCommandContainer.java:63) at org.jboss.aesh.console.command.container.DefaultCommandContainer.executeCommand(DefaultCommandContainer.java:48) at org.keycloak.client.admin.cli.aesh.AeshConsoleCallbackImpl.execute(AeshConsoleCallbackImpl.java:54) at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: java.lang.RuntimeException: {"error":"HTTP 400 Bad Request"} ... 11 more
Version
23.0.3
Expected behavior
Creates the components and returning a 200 Success.
Actual behavior
Do not create the component and returns a 400 Bad Request.
How to Reproduce?
Building image quay.io/keycloak/keycloak:23.0.3 with
ENV KEYCLOAK_ADMIN=admin ENV KEYCLOAK_ADMIN_PASSWORD=admin ENTRYPOINT["/opt/keycloak/bin/kc.sh"] CMD["start-dev"]
Launches the conainer.
Waiting the container is ready.
Using the container terminal.
Executing
cd /opt/keycloak/bin
Executing
./kcadm.sh config credentials --server http://localhost:8080 --user admin --password admin --realm master
Executing
./kcadm.sh create realms -s realm=my-realm -s enabled=true
Executing
./kcadm.sh create components -r my-realm -s name=my-realm-component -s parentId=my-realm -s providerId=my-component-id -s providerType=my.package.providerType
Gets a 400 Bad Request.
Anything else?
No response
The text was updated successfully, but these errors were encountered: