devopskube / redmine_openid_connect

Redmine OpenId Connect Plugin - based on redmine_cas
65 stars 94 forks source link

redirect uri issue #91

Open pravee03 opened 10 months ago

pravee03 commented 10 months ago

I have configured Redmine OpenID connect plugin with respective details.

  1. openId connect server url: https://our-company-keycloak/realms/test-realm (We provided this link)
  2. OpenID Connect scopes (comma-separated): OpenID scopes we provided email, username
  3. client ID: Redmine (From key cloak)
  4. client secret: ***** (From key Cloak Redmine client secret provided)
  5. Disable ssl Validation: checkmark enabled.
  6. Create user if not exists: checkmark enabled

In key Cloak configuration

  1. Root URL: http://your-host-url/my/page (Can anyone tell me it is correct or not)
  2. Home URL: http://your-host-url/my/page (Can anyone tell me it is correct or not)
  3. Valid redirect URIs: http://your-host-url/oic/local_login (Can anyone tell me it is correct or not)

After all configuration from Redmine on click of login with sso button am getting error invalid parameter redirect url In address bar i can see localhost:3000 but am not using this port no were in redmine and keycloak also

7667aa35-032a-449f-b835-3f06b258c402

klasyc commented 7 months ago

Hi,

I think, your configuration is valid (I am also using Redmine with Keycloak with the same settings). The problem is that you have to specify two redirect URIs: one for login and one for logout:

http://your-host-url/oic/local_login http://your-host-url/oic/local_logout

Klasyc

coldnfire commented 6 months ago

Redmine Information:

Environment:
  Redmine version                5.1.2.stable
  Ruby version                   3.2.3-p157 (2024-01-18) [x86_64-linux-musl]
  Rails version                  6.1.7.7
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Fluentmine (includes JavaScript)
SCM:
  Subversion                     1.14.2
  Mercurial                      6.4.5
  Git                            2.40.1
  Filesystem                     
Redmine plugins:
  redmine_openid_connect         0.9.4

Keycloak information:

docker.io/bitnami/keycloak:23.0.7-debian-12-r1

Hi,

I got exactly the same problem here:

openId connect server url: https://my-company-keycloak/realms/5lyNinj4 OpenID Connect scopes (comma-separated): openid,username client ID: projects0 client secret: ***** (From keycloak Redmine client secret provided) Enable ssl Validation: checkmark enabled. Create user if not exists: checkmark disabled

Here is the logs in keycloak container:

2024-03-11 12:43:33,691 WARN  [org.keycloak.events] (executor-thread-6) type="LOGIN_ERROR", realmId="9cd237d0-c8c7-485f-b7db-7e84efe13fd1", clientId="projects0", userId="null", ipAddress="x.x.x.x", error="invalid_redirect_uri", redirect_uri="https://https://my-company-redmine/oic/local_login"