プロジェクト

全般

プロフィール

Vote #78746

未完了

HTTP code 401 on login failure

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Accounts / authentication_7
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
7
version_id:
0
issue_org_id:
26677
author_id:
306539
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

When purposely causing a login error on Redmine, I can see (using web inspector and/or logfiles) that the HTTP return code is 200, i.e. "everything is ok", for the page that presents the error to the user.

It would be great if Redmine would return a 401 ("Unauthorized", see here: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_errors).

Indeed, I think a 401 code in the webserver logs has great security value, and makes it easy to integrate with solutions such as Fail2Ban and others.

If this change were made, there should be absolutely no impact on the user.


journals

The 401 status code is specifically used for Basic or Digest authentication. It has no value when using form authentication as done with Redmine.

If Redmine would return a 401 here, your browser would ask for authentication with a Basic-Auth form, similar to

!https://i.stack.imgur.com/5C6Pp.png!

This not what we want. As such, returning a 200 is okay here for the user. When querying the API, we do already return a 401 if the user did not provide any credentials along with their request. API clients are equipped to deal with this.
--------------------------------------------------------------------------------
This is not what I obtain with other services (e.g. with Jenkins CI instances), where a 401 code is returned, and presents the usual HTML login form (not through the browser, as the authentication is made through the application, not the web server).

--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0