-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Bugs: OAuth2 can not be disabled (was: OAuth2 maps only to the account "admin") #1874
Comments
Can you look at this? |
Hi, |
On my Wekan install, there is multiple existing users, but anyone logging in with oauth logs in as me, first admin user. |
I wonder if the mapping logic checks the verification status (tab named "verified" in people section) of the account ? and even tough there's no verified account including the default admin account all users can login with their local accounts but not with oauth |
There may be a problem with datas returned by meteor-accounts-oidc. |
It seems to try to find only those that have verified true. But most have verified false on Wekan. |
I have 2 users at Rocket.Chat and Wekan: xet7 and test.
|
do you test this with a private window ? |
Yes, in private window it behaves same way. |
@xet7 |
Because currrently in Standalone Wekan Admin Panel all users seems to be not verified, because setting somebody verified does not work. I was thinking that your code would only work for user that are set as verified. But removing "verified:true" did not change anything, and did not fix anything, everyone always logins as first admin user. |
Verified property does not effect authentification. My code sets it to true because the account come from oAuth identity provider who checks the email. |
I don't get any output. I added these console.log lines:
I don't even know where you check and validate info that is coming from oidc. There seems to be some code on create user, but I probably would need to go through oidc documentation to figure it out. |
It should be interesting to be able to disable the Oidc feature & button directly in the Wekan config. |
Yes sure. But first the feature needs to be fixed so that it works. |
Could you give me an account to rocket.chat to debug this problem please ? Trial is disabled on rocket.chat currently... |
Yes, send me email to x@xet7.org |
Is it possible to hide the "Sign in with Oidc" button until this feature works and there is a way of disabling the feature? |
I will add sometime in near future check to code, that if OAuth2 is not configured, Oidc button is not shown. |
Wekan v1.49 has now been released, it has IFTTT and OAuth2 removed. Their development continues at wekan repo edge branch, until they work. This is how to use snap stable channel, that most Wekan users have installed:
This is how to use snap edge channel:
|
Hi, Could you test ? |
What personal identity provider you used for oidc? Is it open source? |
I use doorkeeper (https://github.com/doorkeeper-gem/doorkeeper) |
Thanks ! I will test. |
Does this work well for you with doorkeeper? Does my change oidc username to preferred_username fix or break something? |
Admin creation logic would go to wekan/server/authentication.js where Wekan would check is env variables set and create admin user. |
Do you have ideas what is problem with Auth0? Auth0 OIDC settings: {"issuer":"https://example.eu.auth0.com/","authorization_endpoint":"https://example.eu.auth0.com/authorize","token_endpoint":"https://example.eu.auth0.com/oauth/token","userinfo_endpoint":"https://example.eu.auth0.com/userinfo","mfa_challenge_endpoint":"https://example.eu.auth0.com/mfa/challenge","jwks_uri":"https://example.eu.auth0.com/.well-known/jwks.json","registration_endpoint":"https://example.eu.auth0.com/oidc/register","revocation_endpoint":"https://example.eu.auth0.com/oauth/revoke","scopes_supported":["openid","profile","offline_access","name","given_name","family_name","nickname","email","email_verified","picture","created_at","identities","phone","address"],"response_types_supported":["code","token","id_token","code token","code id_token","token id_token","code token id_token"],"response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["public"],"id_token_signing_alg_values_supported":["HS256","RS256"],"token_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post"],"claims_supported":["aud","auth_time","created_at","email","email_verified","exp","family_name","given_name","iat","identities","iss","name","nickname","phone_number","picture","sub"],"request_uri_parameter_supported":false} I get this error:
I have tried this, but still get error:
|
Happy to help debug where I can. The first thing I notice is that the sub (object?) looks different than mine for both the getUserInfo and userInfo debug statement: Yours => In my logs I also see the detail from the userinfo endpoint right afterwards:
Possibly the OAUTH2_ parameters are not correct for Auth0? Was this working prior to v2.21? Here are my ENV variables:
|
No, Auth0 has not worked yet for me. There is also existing Auth0 issue with some more details. I have been trying to get Auth0 working for some months. |
I tried converting my acceptance wekan deployment over to auth0, but our firewalls block the necessary callbacks. Maybe I can spin up a stand-alone instance at home and get it to work. Let you know what I find.
… On Feb 12, 2019, at 1:00 PM, Lauri Ojansivu ***@***.***> wrote:
No, Auth0 has not worked yet for me. There is also existing Auth0 issue with some more details. I have been trying to get Auth0 working for some months.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
and OAUTH2_REQUEST_PERMISSIONS. Thanks to xet7. Related #1874
settings [OAUTH2_ID_TOKEN_WHITELIST_FIELDS and OAUTH2_REQUEST_PERMISSIONS](b66f471). Thanks to xet7.
@xet7 Looks like the recent updates for OIDC (post v11 haha) broke my keycloak instance. Actually it made it better and easier. I will re-test and fix the documentation. I think with the recent mapping additions, it will be much easier to get Keycloak up and running. Any chance there is a way to hide the email login and registration from the startup? Is there an email variable that we can set to FALSE? |
@xet7 The v2.24 image broke OAUTH2 for Keycloak with this error: Uncaught TypeError: a.join is not a function |
@xet7 Thank you. |
I looked in the yaml file and did not see anything, is there a variable to disable login/register by Email and force only OAUTH2? Similar to OAUTH2=true |
I will add disabling Email. It's not in Wekan yet, so I'll start coding it now. |
The new method doesn't work with nextcloud, because the user information is nested. My code that works is like this: but the new userinfo[process.env.OAUTH2_ID_MAP] Any idea to make it work with the variables? |
Is that only change required? Or is there more? |
@xet7 that would work, even if it's not very elegant, I don't know enough javascript to understand if this is possible using reflection or something to get the fields from the parameter string. full code is in my previous comment, here it is: var userinfodata = userinfo.ocs.data; And line 34: profile.name = userinfodata['display-name']; |
In https://github.com/wekan/wekan/blob/master/packages/wekan-oidc/oidc_server.js at line 13:
should do it. We can then use the mapping config properly. I am trying to get a dev environment working, but my homeserver is taking ages to build wekan. As for a sample config:
In the end this is to circumvent the fact, that nextcloud does not provide a proper userinfo endpoint. I do not know why, but here we are. |
Implemented Nextcloud OAuth2 Hack References Issue #1874
About original issue, disabling OAuth2:
|
I wrote to top of https://github.com/wekan/wekan/wiki/Keycloak NOTE: Is that preffered_username setting wrong? Correct settings should be for OIDC login:
I think that For OIDC login tor work correcty, username and email both need to be set to be email. This is similar how OAuth2 login works at Azure login and Google login. |
Issue
Server Setup Information:
Problem description:
oauth maps only to the account "admin" regardless of the user credentials entered in oauth implemantation
Explain steps how to reproduce
wekan <-Oauth-> rocketchat <--ldap-->AD
Attach log files in .zip file)
The text was updated successfully, but these errors were encountered: