-
Notifications
You must be signed in to change notification settings - Fork 208
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
Problem connecting OpenQA to Keycloak via OpenID #6065
Comments
We also ran into "Could not determine ID provider from URL" with our OpenID provider in the past and it was an IPv6 related issue. Otherwise I'm also not sure as we normally use the default OpenID provider or OAuth2. If your provider also supports OAuth2 you could give that a try instead. For further debugging, the OpenID-related code is in https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Auth/OpenID.pm where you might be able to add additional debug printing. |
Yes, I read about the IPv6 case in documentation. I tried to disable it, but it didn't help. I also tried to configure OAuth2, the situation is better with it: OpenQA starts communicating with the provider, logs in as a client, receives an authorization token and user data. But everything ends with the message "User data returned by OAuth2 provider is insufficient". Here is a message in the openQA log:
openqa.ini:
So I can't connect with either OpenID Connect or OAuth2. But could it be easier to solve the problem with OAuth2? As I understand it, the message "User data returned by OAuth2 provider is insufficient" indicates that OpenQA did not receive some necessary parameters from the auth provider? But which ones exactly? |
I say OAuth2 is probably easier to resolve. The error message sounds indeed like some expected parameters are missing. I think the parameter |
Thanks for the link, I looked at But as for OpenID, it's still unclear. Apparently, it does not work, because the "_openid_secret" parameter is not set, but I still did not understand where it should be set. And besides the "secret" auth provider usually also waits for the Client ID (as in OAuth2) - here it is not visible at all. |
So could you make it work with OAuth2? If there were code changes required, feel free to create a PR. I now realize that you mean OpenID Connect and not OpenID. I think OpenID Connect is not supported by openQA (which uses https://metacpan.org/pod/Net::OpenID::Consumer which only supports OpenID 1 and 2 judging by its CPAN description). (Also see https://security.stackexchange.com/questions/44797/when-do-you-use-openid-vs-openid-connect for the difference between OpenID and OpenID Connect.) |
Yes, OAuth2 is working now! The next step is to figure out how to divide users into administrators, operators and regular users through it - is this possible? I've just see, there is OpenID, and not OpenID Connect. Sorry, it's different things, Keycloak not working with OpenID. Then we'll just use OAuth2. |
Only by manually assigning a role in the users menu after the initial login. |
I have OpenQA 4.6 and I want to set up OpenID Connect authorization on Keycloak 22.0.3. According to the documentation, only the following specification in /etc/openqa/openqa.ini is needed:
For OIDC, also need to specify "Client ID" and "Client secret", but how to do this is not specified in the openQA documentation.
When I try to go to the login page https://openqa.my.domain/login, I always get the message "Forbidden". There is an error in the OpenQA log: "Claiming OpenID identity for URL 'https://openqa.my.domain' failed: no_identity_server: Could not determine ID provider from URL".
You can specify one of the OpenID Connect public providers to check this situation, for example:
And get the same behavior that I observe myself.
What am I doing wrong and how do I set up OpenID connect correctly?
The text was updated successfully, but these errors were encountered: