Skip to content
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

'Resource not found' for standalone running #103

Open
mleegwt opened this issue Sep 29, 2021 · 4 comments
Open

'Resource not found' for standalone running #103

mleegwt opened this issue Sep 29, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@mleegwt
Copy link

mleegwt commented Sep 29, 2021

When starting the standalone version I expected to be able to access the realms and other URIs.

Startup shows the following logging (including accessing a realm):

$ java -jar standalone-0.10.0.jar
[main] INFO com.tngtech.keycloakmock.standalone.Main - Server is running on http://localhost:8000
[vert.x-eventloop-thread-0] INFO com.tngtech.keycloakmock.impl.handler.CommonHandler - 404: GET /auth/realms/master

Is my expectation correct to be able to access these URLs? Or is this a bug?

@ostrya
Copy link
Collaborator

ostrya commented Sep 30, 2021

At the moment, only the bare minimum endpoints are implemented to make OpenID Connect work. Stuff like /auth/realms/master is just not implemented, so you'll get a 404.

@ostrya
Copy link
Collaborator

ostrya commented Oct 1, 2021

Do you need this endpoint? It does not seem to be part of the OpenID spec but a Keycloak-specific endpoint. Also, I did not find any documentation of this feature in the Keycloak documentation.

@mleegwt
Copy link
Author

mleegwt commented Oct 1, 2021

The validation that already exists in my application uses the information to check validity of the KeyCloak instance. So I would prefer to include this.
The Keycloak documentation is https://www.keycloak.org/docs-api/5.0/rest-api/index.html#_realmrepresentation and https://www.keycloak.org/docs-api/5.0/rest-api/index.html#_realms_admin_resource I think.
Many fields are optional. Currently in use: Public key and realm. Both to allow checking validity of the token.

@ostrya
Copy link
Collaborator

ostrya commented Oct 4, 2021

I think the standard way would be to use the /auth/realms/master/.well-known/openid-configuration to discover the URL to the public key, and the realm name is already part of the URL. But we can put this on the queue with low prio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants