Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-12940

inconsistancy between keycloak.json generated and keycloak-connect nodejs adapter

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Adapter - Node.js
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1/ Define a client using bearer-token .
      2/ Create an nodejs API using keycloak-connect using the keycloak.json generated by the admin.
      3/ Try to reach a secure endpoint with a valid token --> error 403 .

      Show
      1/ Define a client using bearer-token . 2/ Create an nodejs API using keycloak-connect using the keycloak.json generated by the admin. 3/ Try to reach a secure endpoint with a valid token --> error 403 .
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Hello,

      I spent a lot of time figuring out why I couldn't secure my API using a bearer_only client.

      I ended up understanding that it was not working because the keycloak.json generated with the Installation Tab puts an extra / at the end of auth-server-url . And this is not compatible with the keycloak-connect Node JS Adapter.

      For example :

      {
        "realm": "myrealm",
        "bearer-only": true,
        "auth-server-url": "http://localhost:8085/auth/",
        "ssl-required": "external",
        "resource": "nodejs-sample",
        "verify-token-audience": true,
        "use-resource-role-mappings": true,
        "confidential-port": 0
      }
      

      Could you align both ?
      Thanks

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  flapouille Hermine lalvee
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: