Accéder au contenu.
Menu Sympa

belenios-discuss - Re: [belenios-discuss] Keycloak CAS fails with 502 error

Objet : Discussion list for Belenios

Archives de la liste

Re: [belenios-discuss] Keycloak CAS fails with 502 error


Chronologique Discussions 
  • From: Stéphane Glondu <stephane.glondu AT inria.fr>
  • To: Alban Bruder <alban.bruder AT uni-weimar.de>, belenios-discuss AT inria.fr
  • Subject: Re: [belenios-discuss] Keycloak CAS fails with 502 error
  • Date: Tue, 6 Apr 2021 17:26:07 +0200
  • Ironport-hdrordr: A9a23:8RRKdK2Q5cpNT+FMTgKwDQqjBaVyeYIsi2QD101hICF9WMqeisyogbAnxQb54Qx8ZFgMu/ClfJOBT3TV6IJv7eAqVouKcQH6tAKTQ71KwofvzjbpES+71sM178ldWodkDtmYNzlHpOP7+hT9M9tI+rm62YWpn/qb83B2UQpxYbph5AsRMHf5LmRSRBNaQaY/DoaW/MBdpzGtPU0QdNnTPAhmY8Hmh/nm0K3regQHARlP0njqsRqN5KThGxaVmjcSOgk/pYsKyHPImQD16qKov5iAu3jh/lTe5ZhXh9fto+ErbPCkscQNLyWptwDAXvUGZ5S5oDs3rOuzgWxGrPDwpX4bVfhb2jf6ZGnwix3owgzp0DEy8RbZuCalqEqmhcT4QT4gYvAx/b5xQ1/840okvNY5+qpOxmqYuZ0/N2K6oA3No/zBVxRrkQ6fpHovlvN7tQ0kbaIuLKVQpsge8SpuYeo9IB4=

Hello,

Le 06/04/2021 à 15:44, Alban Bruder a écrit :
> I am trying to create an election with Belenios and CAS via the
> following Keycloak plugin.
> (https://github.com/jacekkow/keycloak-protocol-cas)
>
> If authentication is successful, the Keycloak endpoint
> https://your.keycloak.host/auth/realms/master/protocol/cas/validate
> returns the response string "yes". However, Belenios terminates with a
> "502 - Bad Gateway" error. The problem occurs in the public demo as well
> as in my private instance. Unfortunately I'm not an OCAML expert but the
> corresponding position in the code should be the following
> (https://gitlab.inria.fr/belenios/belenios/-/blob/master/src/web/web_auth_cas.ml#L97).
>
>
> Does anyone have any idea how we can solve this problem?

Belenios implements the CAS 1.0 protocol:

https://apereo.github.io/cas/5.2.x/protocol/CAS-Protocol-V2-Specification.html#24-validate-cas-10

In the validate endpoint, the response string "yes" should be followed
by (a newline and) the login being authenticated. Is it indeed returned
by your CAS server?

Looking at:

https://github.com/jacekkow/keycloak-protocol-cas/blob/master/src/main/java/org/keycloak/protocol/cas/endpoints/ValidateEndpoint.java

it seems that just "yes" is returned. How is one supposed to know who
has been authenticated in this case?


Cheers,

--
Stéphane




Archives gérées par MHonArc 2.6.19+.

Haut de le page