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

[BUG] Getting "Invalid Username or Password" as soon as visiting a client with the restricted-access step in the flow. #100

Closed
1 task done
HrBingR opened this issue Aug 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@HrBingR
Copy link

HrBingR commented Aug 6, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When visiting any client I receive an error message upon the page loading that states "Invalid Username or Password".

It doesn't even ask a username or password or try to authenticate, I just immediately experience the above on all clients after binding.

I tested:

  • Having added the restricted-access role to the client and users.
  • Without the restricted-access role on any clients.
  • With the restricted-access on all clients and all users.
  • Without the existence of the restricted-access role at all, and not configured on any client.

As soon as I remove the "Restrict user authentication on clients" step from the flow, it works.

This is my current flow (cloned from the default flow, and tested before/after adding the restrict step):
image

This is the configuration of the step:
image

The error message in action:
image

Expected Behavior

I expect to see the normal authentication dialog before getting access granted/access denied based on the authenticator and associated roles been given to users and clients per the readme instructions.

Steps To Reproduce

  1. My docker config is as follows (sensitive details (such as networks and DB info) omitted, external port and host censored):
  keycloak:
    image: quay.io/keycloak/keycloak:latest
    container_name: keycloak
    restart: unless-stopped
    command:
      - 'start'
      - '--hostname=x
      - '--proxy=edge'
    ports:
      - x:8080    
    volumes:
      - ./keycloak-restrict-client-auth.jar:/opt/keycloak/providers/keycloak-restrict-client-auth.jar
    labels:
      - 'traefik.http.routers.keycloak.entrypoints=websecure'
      - 'traefik.http.routers.keycloak.rule=Host(`x`)'
      - 'traefik.http.routers.keycloak.tls=true'
      - 'traefik.http.routers.keycloak.tls.certresolver=myresolver'
      - 'traefik.http.services.keycloak.loadbalancer.server.scheme=http'
      - 'traefik.http.services.keycloak.loadbalancer.server.port=8080'
      - 'traefik.enable=true
  1. I copied the default Browser flow.
  2. Added the 'Restrict user authentication on clients' step.
  3. Configured it as Required and for 'client-role'.
  4. Bound it as my Browser flow.
  5. I did test configuring the restricted-access role on users and clients, but the problem starts from step 5 and continues no matter what I do unless I remove the authenticator from the flow.

Version

- Keycloak: 19.0.1 (quarkus)
- This extension: 19.0.0 (Latest Release)

Anything else?

No response

@HrBingR HrBingR added the bug Something isn't working label Aug 6, 2022
@sventorben
Copy link
Owner

Hey @HrBingR,

I think you mixed up required and alternative executions in your flow.
Please see #9 for configuration instructions and let me know if this works for you.

@HrBingR
Copy link
Author

HrBingR commented Aug 6, 2022

Okay yup that's on me.

Difficult working from the new interface and trying to translate flows from the old interface (which IMO was much clearer) but I see you're planning to update the screenshots soon so looking forward to that.

Thanks for the assist!

@HrBingR HrBingR closed this as completed Aug 6, 2022
sventorben added a commit that referenced this issue Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants