ログインエラー:アカウントに問題があります。サイトの管理者にお問い合わせください

ログインエラー:アカウントに問題があります。サイトの管理者に連絡してください。

2人のユーザーのみで発生し、時間とともに現れたり消えたりするログインエラーに直面しています。私自身も多くの他のユーザーも正常にログインできています。Discourse CAS SSO サービスのログによると、ユーザーは問題なくフォーラムへ引き継がれています。このエラーは皆さんもご存知でしょうか?このバグの特定に役立つ追加のログはどこで見つかるでしょうか?

ユーザー名は同じですが、1つのアカウントは文字の大文字小文字が異なります。もう1人のユーザーのユーザー名は完全に同一です。CAS サーバー上のメールアドレスは、フォーラム上のアドレスと一致しています。私たちは数日前に最新の Discourse バージョンを運用しており、アプリケーションコードにパッチは適用していません。

偶然かもしれませんが、この問題は以前、CAS SSO サービスを再起動した後に一時的に1人のユーザーで解消しましたが、現在はフォーラムにログインできなくなっています(その時点では1人のユーザーのみがこの問題を報告していました)。この問題に対する恒久的な解決策を見つけたいと考えています。

1人のユーザーには、ブラウザにパスなしでフォーラムのドメイン名のみを入力するよう提案しましたが、成功したとは報告されていません。ログによると、少なくとも1人のユーザーは初期ログインプロセスを通過しているため、ブラウザで間違った URL を入力しているか、不正なブックマークを使用していることが原因ではないと推測しています。

エラーのスクリーンショットを以下に示します:

スクリーンショットの引数と一致させることで、失敗したログインに関連する SSO プロバイダーのログを見つけました。それを私の正常なログインと比較したところ、変更されたのは sso と sig のパラメーター、CAS チケット番号、日付スタンプ、IP アドレスなどだけでした。両方のログは非常に似ており、初期の SSO 検証ステップが正常に機能していることを示唆しています。失敗したログインに関連する SSO プロバイダーのログインログの編集版を以下に示します:

I, [2019-02-05T05:31:33.683842 #18023]  INFO -- : Started GET "/?sso=...&sig=..." for ... at 2019-02-05 05:31:33 -0500
I, [2019-02-05T05:31:33.685726 #18023]  INFO -- : Processing by LoginController#login as HTML
I, [2019-02-05T05:31:33.685829 #18023]  INFO -- :   Parameters: {"sso"=>"...", "sig"=>"..."}
I, [2019-02-05T05:31:33.687034 #18023]  INFO -- : Redirected to https://forum.members.fsf.org/auth/cas
I, [2019-02-05T05:31:33.687299 #18023]  INFO -- : Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
I, [2019-02-05T05:31:33.812099 #18023]  INFO -- : Started GET "/auth/cas" for ... at 2019-02-05 05:31:33 -0500
I, [2019-02-05T05:31:49.217709 #18023]  INFO -- : Started GET "/auth/cas/callback?url&ticket=ST-..." for ... at 2019-02-05 05:31:49 -0500
I, [2019-02-05T05:31:49.256905 #18023]  INFO -- : Processing by LoginController#create as HTML
I, [2019-02-05T05:31:49.257047 #18023]  INFO -- :   Parameters: {"url"=>nil, "ticket"=>"ST-...", "provider"=>"cas"}
I, [2019-02-05T05:31:49.259105 #18023]  INFO -- : inside allow_groups ["is_member"] empty? false
I, [2019-02-05T05:31:49.259686 #18023]  INFO -- : Redirected to https://forum.members.fsf.org/session/sso_login?sso=...&sig=...
I, [2019-02-05T05:31:49.260007 #18023]  INFO -- : Completed 302 Found in 3ms (ActiveRecord: 0.0ms)

この問題に関するご支援を心よりお待ちしております。

ありがとうございます!: D

I’ve seen the error you reported in the screenshot for users who were imported, but have never before logged in. In my case WP is the SSO provider and the “problem users” don’t have a Single Sign On section at the bottom of their user page.

Thanks for the input. In my case, they have logged in before, and they do have the SSO section at the bottom of their user account page.

Great news! I figured out how to reproduce the error. If I try to log in as “Sudoman” instead of “sudoman”, then this error appears. Our CAS server (i’m not referring to the CAS SSO service connected with Discourse) allows people to log in lto our systems like that.

In any case, presuming that the SSO provider is passing the user to Discourse with the user name of “Sudoman”, is this error message the desired behavior in Discourse, or is it a bug?

In my case, it would make sense to allow the user to log in, but in other systems, that could be a different user who is trying to log in.

I tried creating an account with capitalized letters in the user name, and an account was created with the same capitalization. Trying to log in again with all lower case letters caused an error. That makes sense to me.

Maybe it would make sense to create a resource that lists the list of possible causes that produces this error message. It would help systems administrators track down the issue when this happens to their users.

Thanks! :smiley: