Skip to content

gocloak is broken for Keycloak v17.0 : need to remove /auth from the gocloak endpoint path #346

Closed
@ksingh7

Description

@ksingh7

Describe the bug
Upon hitting any of the API calls i am getting error

404 Not Found: RESTEASY003210: Could not find resource for full path: http://localhost:8080/auth/realms/dev/protocol/openid-connect/token

To Reproduce
Steps to reproduce the behavior:

  1. Keycloak Version 17.0.1
  2. gocloak version 11.0.2
  3. Hit the gocloak api (any method)
jwt, err := keycloakClient.Login(
		kCTX,
		kCreds.clientId,
		kCreds.clientSecret, kCreds.realm,
		kCreds.username, kCreds.password,
	)

FYI direct CURL on keyckoak works fine

image

Expected behavior
We should able to successfully authenticatae using gocloak method
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS
  • Browser [e.g. chrome, safari] Chrome

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Important : Starting 17.0+ version of Keycloak, there's a change in endpoints as per the official documentation, you need to omit /auth from the endpoint.
We need a mechanism in gocloak to omit \admin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions