mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-16 06:43:45 +00:00
Document OpenID 2.0 removal (#633)
Documents https://github.com/go-gitea/gitea/pull/40231 for main, which removes OpenID 2.0 authentication. Drops the `[openid]` settings and OpenID 2.0 mentions from the current docs in all three languages. OpenID Connect docs are unchanged. _Written by Claude (Opus 5.5)._ --------- Co-authored-by: Lunny Xiao <[email protected]> Reviewed-on: https://gitea.com/gitea/docs/pulls/633 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
01c8000cfd
commit
c9c3e39b0f
11 files changed
+11
-83
No files matched your search
@@ -112,7 +112,7 @@ Events cover security-relevant changes, grouped by action family:
|
|||||||
|
|
||||||
- **User**: create and delete, admin, restricted and active status, name,
|
- **User**: create and delete, admin, restricted and active status, name,
|
||||||
password and password reset requests, visibility, emails, authentication
|
password and password reset requests, visibility, emails, authentication
|
||||||
source, 2FA, WebAuthn, OpenID, external logins, access tokens, OAuth2
|
source, 2FA, WebAuthn, external logins, access tokens, OAuth2
|
||||||
applications and grants, SSH/GPG/principal keys, secrets, webhooks,
|
applications and grants, SSH/GPG/principal keys, secrets, webhooks,
|
||||||
impersonation, failed two-factor authentication
|
impersonation, failed two-factor authentication
|
||||||
- **Organization**: create and delete, name, visibility, members, teams,
|
- **Organization**: create and delete, name, visibility, members, teams,
|
||||||
|
|||||||
@@ -432,8 +432,3 @@ USERNAME = nickname
|
|||||||
; what to do when the username or email is already taken
|
; what to do when the username or email is already taken
|
||||||
ACCOUNT_LINKING = login
|
ACCOUNT_LINKING = login
|
||||||
```
|
```
|
||||||
|
|
||||||
:::note
|
|
||||||
This is unrelated to `ENABLE_OPENID_SIGNIN` and the `[openid]` section, which
|
|
||||||
configure the older OpenID 2.0 sign-in.
|
|
||||||
:::
|
|
||||||
@@ -50,13 +50,6 @@ Listing all embedded files with `openid` in their path:
|
|||||||
```sh
|
```sh
|
||||||
$ gitea embedded list '**openid**'
|
$ gitea embedded list '**openid**'
|
||||||
public/assets/img/auth/openid_connect.svg
|
public/assets/img/auth/openid_connect.svg
|
||||||
public/assets/img/openid-16x16.png
|
|
||||||
templates/user/auth/finalize_openid.tmpl
|
|
||||||
templates/user/auth/signin_openid.tmpl
|
|
||||||
templates/user/auth/signup_openid_connect.tmpl
|
|
||||||
templates/user/auth/signup_openid_navbar.tmpl
|
|
||||||
templates/user/auth/signup_openid_register.tmpl
|
|
||||||
templates/user/settings/security_openid.tmpl
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Extracting resources
|
## Extracting resources
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ And the following unique queues:
|
|||||||
- `manage_ssh_keys`: User cannot configure ssh keys.
|
- `manage_ssh_keys`: User cannot configure ssh keys.
|
||||||
- `manage_gpg_keys`: User cannot configure gpg keys.
|
- `manage_gpg_keys`: User cannot configure gpg keys.
|
||||||
- `manage_mfa`: a User cannot configure mfa devices.
|
- `manage_mfa`: a User cannot configure mfa devices.
|
||||||
- `manage_credentials`: a user cannot configure emails, passwords, or openid
|
- `manage_credentials`: a user cannot configure emails or passwords
|
||||||
- `change_username`: a user cannot change their username
|
- `change_username`: a user cannot change their username
|
||||||
- `change_full_name`: a user cannot change their full name
|
- `change_full_name`: a user cannot change their full name
|
||||||
- `EXTERNAL_USER_DISABLE_FEATURES`: **_empty_**: Comma separated list of disabled features ONLY if the user has an external login type (eg. LDAP, Oauth, etc.), could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys`, `manage_mfa`, `manage_credentials`. This setting is independent from `USER_DISABLED_FEATURES` and supplements its behavior.
|
- `EXTERNAL_USER_DISABLE_FEATURES`: **_empty_**: Comma separated list of disabled features ONLY if the user has an external login type (eg. LDAP, Oauth, etc.), could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys`, `manage_mfa`, `manage_credentials`. This setting is independent from `USER_DISABLED_FEATURES` and supplements its behavior.
|
||||||
@@ -575,7 +575,7 @@ And the following unique queues:
|
|||||||
- `manage_ssh_keys`: User cannot configure ssh keys.
|
- `manage_ssh_keys`: User cannot configure ssh keys.
|
||||||
- `manage_gpg_keys`: User cannot configure gpg keys.
|
- `manage_gpg_keys`: User cannot configure gpg keys.
|
||||||
- `manage_mfa`: a User cannot configure mfa devices.
|
- `manage_mfa`: a User cannot configure mfa devices.
|
||||||
- `manage_credentials`: a user cannot configure emails, passwords, or openid
|
- `manage_credentials`: a user cannot configure emails or passwords
|
||||||
- `change_username`: a user cannot change their username
|
- `change_username`: a user cannot change their username
|
||||||
- `change_full_name`: a user cannot change their full name
|
- `change_full_name`: a user cannot change their full name
|
||||||
|
|
||||||
@@ -677,15 +677,6 @@ And the following unique queues:
|
|||||||
- `HMAC_KEY`: **_empty_**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled.
|
- `HMAC_KEY`: **_empty_**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled.
|
||||||
- `ALWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied. `ALLWAYS` is deprecated and will be removed in a future release.
|
- `ALWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied. `ALLWAYS` is deprecated and will be removed in a future release.
|
||||||
|
|
||||||
## OpenID (`openid`)
|
|
||||||
|
|
||||||
- `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID.
|
|
||||||
- `ENABLE_OPENID_SIGNUP`: **false**: Allow registering via OpenID.
|
|
||||||
- `WHITELISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
|
|
||||||
OpenID URI's to permit.
|
|
||||||
- `BLACKLISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
|
|
||||||
OpenID URI's to block.
|
|
||||||
|
|
||||||
## OAuth2 Client (`oauth2_client`)
|
## OAuth2 Client (`oauth2_client`)
|
||||||
|
|
||||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section)
|
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section)
|
||||||
|
|||||||
+2
-11
@@ -134,22 +134,13 @@ You can also see an example of the `swagger.json` file at https://gitea.com/swag
|
|||||||
There are multiple things you can combine to prevent spammers.
|
There are multiple things you can combine to prevent spammers.
|
||||||
|
|
||||||
1. By whitelisting or blocklisting certain email domains
|
1. By whitelisting or blocklisting certain email domains
|
||||||
2. By only whitelisting certain domains with OpenID (see below)
|
2. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
|
||||||
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
|
3. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](../administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI
|
||||||
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](../administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI
|
|
||||||
|
|
||||||
### Only allow/block certain email domains
|
### Only allow/block certain email domains
|
||||||
|
|
||||||
You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]`
|
You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]`
|
||||||
|
|
||||||
### Only allow/block certain OpenID providers
|
|
||||||
|
|
||||||
You can configure `WHITELISTED_URIS` or `BLACKLISTED_URIS` under `[openid]` in your `app.ini`
|
|
||||||
|
|
||||||
:::note
|
|
||||||
Whitelisted takes precedence, so if it is non-blank then blacklisted is ignored.
|
|
||||||
:::
|
|
||||||
|
|
||||||
### Issue only users
|
### Issue only users
|
||||||
|
|
||||||
The current way to achieve this is to create/modify a user with a max repo creation limit of 0.
|
The current way to achieve this is to create/modify a user with a max repo creation limit of 0.
|
||||||
|
|||||||
@@ -42,13 +42,6 @@ gitea embedded list [--include-vendored] [patterns...]
|
|||||||
```sh
|
```sh
|
||||||
$ gitea embedded list '**openid**'
|
$ gitea embedded list '**openid**'
|
||||||
public/assets/img/auth/openid_connect.svg
|
public/assets/img/auth/openid_connect.svg
|
||||||
public/assets/img/openid-16x16.png
|
|
||||||
templates/user/auth/finalize_openid.tmpl
|
|
||||||
templates/user/auth/signin_openid.tmpl
|
|
||||||
templates/user/auth/signup_openid_connect.tmpl
|
|
||||||
templates/user/auth/signup_openid_navbar.tmpl
|
|
||||||
templates/user/auth/signup_openid_register.tmpl
|
|
||||||
templates/user/settings/security_openid.tmpl
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 提取资源
|
## 提取资源
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ Gitea 创建以下非唯一队列:
|
|||||||
- `manage_ssh_keys`:用户不能配置 SSH 密钥。
|
- `manage_ssh_keys`:用户不能配置 SSH 密钥。
|
||||||
- `manage_gpg_keys`:用户不能配置 GPG 密钥。
|
- `manage_gpg_keys`:用户不能配置 GPG 密钥。
|
||||||
- `manage_mfa`:用户不能配置 MFA 设备。
|
- `manage_mfa`:用户不能配置 MFA 设备。
|
||||||
- `manage_credentials`:用户不能配置邮箱、密码或 OpenID。
|
- `manage_credentials`:用户不能配置邮箱或密码。
|
||||||
- `change_username`:用户不能更改其用户名。
|
- `change_username`:用户不能更改其用户名。
|
||||||
- `change_full_name`:用户不能更改其全名。
|
- `change_full_name`:用户不能更改其全名。
|
||||||
|
|
||||||
@@ -573,13 +573,6 @@ Gitea 创建以下非唯一队列:
|
|||||||
- `HMAC_KEY`: **_empty_**: 为 URL 编码提供 HMAC 密钥,如果启用 camo,则**必填**。
|
- `HMAC_KEY`: **_empty_**: 为 URL 编码提供 HMAC 密钥,如果启用 camo,则**必填**。
|
||||||
- `ALWAYS`: **false**: 设置为 true 以在 HTTP 和 HTTPS 内容上使用 camo,否则仅代理非 HTTPS URL。`ALLWAYS` 已经过期,并且会在未来版本中删除。
|
- `ALWAYS`: **false**: 设置为 true 以在 HTTP 和 HTTPS 内容上使用 camo,否则仅代理非 HTTPS URL。`ALLWAYS` 已经过期,并且会在未来版本中删除。
|
||||||
|
|
||||||
## OpenID (`openid`)
|
|
||||||
|
|
||||||
- `ENABLE_OPENID_SIGNIN`: **true**: 允许通过 OpenID 进行身份验证。
|
|
||||||
- `ENABLE_OPENID_SIGNUP`: **! DISABLE_REGISTRATION**: 允许通过 OpenID 进行注册。
|
|
||||||
- `WHITELISTED_URIS`: **_empty_**: 如果非空,是一组匹配 OpenID URI 的 POSIX 正则表达式模式,用于允许访问。
|
|
||||||
- `BLACKLISTED_URIS`: **_empty_**: 如果非空,是一组匹配 OpenID URI 的 POSIX 正则表达式模式,用于阻止访问。
|
|
||||||
|
|
||||||
## OAuth2 Client (`oauth2_client`)
|
## OAuth2 Client (`oauth2_client`)
|
||||||
|
|
||||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 设置此项以启用或禁用 OAuth2 自动注册的电子邮件确认。(覆盖`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`设置)
|
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 设置此项以启用或禁用 OAuth2 自动注册的电子邮件确认。(覆盖`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`设置)
|
||||||
|
|||||||
@@ -143,20 +143,13 @@ Gitea 不提供内置的 Pages 服务器。您需要一个专用的域名来提
|
|||||||
有多种方法可以组合使用来防止垃圾邮件发送者:
|
有多种方法可以组合使用来防止垃圾邮件发送者:
|
||||||
|
|
||||||
1. 通过设置电子邮件域名的白名单或黑名单。
|
1. 通过设置电子邮件域名的白名单或黑名单。
|
||||||
2. 通过设置一些域名或者 OpenID 白名单(见下文)。
|
2. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
||||||
3. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
3. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。
|
||||||
4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。
|
|
||||||
|
|
||||||
### 仅允许/阻止特定的电子邮件域名
|
### 仅允许/阻止特定的电子邮件域名
|
||||||
|
|
||||||
您可以在`app.ini`中的`[service]`下的配置`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
您可以在`app.ini`中的`[service]`下的配置`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
||||||
|
|
||||||
### 仅允许/阻止特定的 OpenID 提供商
|
|
||||||
|
|
||||||
您可以在`app.ini`的`[openid]`下配置`WHITELISTED_URI`或`BLACKLISTED_URIS`。
|
|
||||||
|
|
||||||
**注意**: 白名单优先,如果白名单非空,则忽略黑名单。
|
|
||||||
|
|
||||||
### 仅允许发布问题的用户
|
### 仅允许发布问题的用户
|
||||||
|
|
||||||
目前实现这一点的方法是创建/修改一个具有最大仓库创建限制为 0 的用户。
|
目前实现这一点的方法是创建/修改一个具有最大仓库创建限制为 0 的用户。
|
||||||
|
|||||||
@@ -42,13 +42,6 @@ gitea embedded list [--include-vendored] [patterns...]
|
|||||||
```sh
|
```sh
|
||||||
$ gitea embedded list '**openid**'
|
$ gitea embedded list '**openid**'
|
||||||
public/assets/img/auth/openid_connect.svg
|
public/assets/img/auth/openid_connect.svg
|
||||||
public/assets/img/openid-16x16.png
|
|
||||||
templates/user/auth/finalize_openid.tmpl
|
|
||||||
templates/user/auth/signin_openid.tmpl
|
|
||||||
templates/user/auth/signup_openid_connect.tmpl
|
|
||||||
templates/user/auth/signup_openid_navbar.tmpl
|
|
||||||
templates/user/auth/signup_openid_register.tmpl
|
|
||||||
templates/user/settings/security_openid.tmpl
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 提取資源
|
## 提取資源
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ Gitea 建立以下非唯一隊列:
|
|||||||
- `manage_ssh_keys`:使用者不能設定 SSH 密鑰。
|
- `manage_ssh_keys`:使用者不能設定 SSH 密鑰。
|
||||||
- `manage_gpg_keys`:使用者不能設定 GPG 密鑰。
|
- `manage_gpg_keys`:使用者不能設定 GPG 密鑰。
|
||||||
- `manage_mfa`:使用者不能設定 MFA 設備。
|
- `manage_mfa`:使用者不能設定 MFA 設備。
|
||||||
- `manage_credentials`:使用者不能設定郵箱、密碼或 OpenID。
|
- `manage_credentials`:使用者不能設定郵箱或密碼。
|
||||||
- `change_username`:使用者不能更改其使用者名稱。
|
- `change_username`:使用者不能更改其使用者名稱。
|
||||||
- `change_full_name`:使用者不能更改其全名。
|
- `change_full_name`:使用者不能更改其全名。
|
||||||
|
|
||||||
@@ -578,13 +578,6 @@ Gitea 建立以下非唯一隊列:
|
|||||||
- `HMAC_KEY`: **_empty_**: 為 URL 編碼提供 HMAC 密鑰,如果啟用 camo,則**必填**。
|
- `HMAC_KEY`: **_empty_**: 為 URL 編碼提供 HMAC 密鑰,如果啟用 camo,則**必填**。
|
||||||
- `ALWAYS`: **false**: 設定為 true 以在 HTTP 和 HTTPS 內容上使用 camo,否則僅代理非 HTTPS URL。`ALLWAYS` 已經過期,並且會在未來版本中刪除。
|
- `ALWAYS`: **false**: 設定為 true 以在 HTTP 和 HTTPS 內容上使用 camo,否則僅代理非 HTTPS URL。`ALLWAYS` 已經過期,並且會在未來版本中刪除。
|
||||||
|
|
||||||
## OpenID (`openid`)
|
|
||||||
|
|
||||||
- `ENABLE_OPENID_SIGNIN`: **true**: 允許透過 OpenID 進行身份驗證。
|
|
||||||
- `ENABLE_OPENID_SIGNUP`: **! DISABLE_REGISTRATION**: 允許透過 OpenID 進行註冊。
|
|
||||||
- `WHITELISTED_URIS`: **_empty_**: 如果非空,是一組匹配 OpenID URI 的 POSIX 正則表達式模式,用於允許訪問。
|
|
||||||
- `BLACKLISTED_URIS`: **_empty_**: 如果非空,是一組匹配 OpenID URI 的 POSIX 正則表達式模式,用於阻止訪問。
|
|
||||||
|
|
||||||
## OAuth2 Client (`oauth2_client`)
|
## OAuth2 Client (`oauth2_client`)
|
||||||
|
|
||||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 設定此項以啟用或禁用 OAuth2 自動註冊的電子郵件確認。(覆蓋`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`設定)
|
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 設定此項以啟用或禁用 OAuth2 自動註冊的電子郵件確認。(覆蓋`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`設定)
|
||||||
|
|||||||
@@ -145,20 +145,13 @@ Gitea 不提供內置的 Pages 伺服器。您需要一個專用的域名來提
|
|||||||
有多種方法可以組合使用來防止垃圾郵件發送者:
|
有多種方法可以組合使用來防止垃圾郵件發送者:
|
||||||
|
|
||||||
1. 通過設定電子郵件域名的白名單或黑名單。
|
1. 通過設定電子郵件域名的白名單或黑名單。
|
||||||
2. 通過設定一些域名或者 OpenID 白名單(見下文)。
|
2. 在您的`app.ini`中將`ENABLE_CAPTCHA`設定為`true`,並正確設定`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
||||||
3. 在您的`app.ini`中將`ENABLE_CAPTCHA`設定為`true`,並正確設定`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
3. 將`DISABLE_REGISTRATION`設定為`true`,並通過 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理介面建立新使用者。
|
||||||
4. 將`DISABLE_REGISTRATION`設定為`true`,並通過 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理介面建立新使用者。
|
|
||||||
|
|
||||||
### 僅允許/阻止特定的電子郵件域名
|
### 僅允許/阻止特定的電子郵件域名
|
||||||
|
|
||||||
您可以在`app.ini`中的`[service]`下的設定`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
您可以在`app.ini`中的`[service]`下的設定`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
||||||
|
|
||||||
### 僅允許/阻止特定的 OpenID 提供商
|
|
||||||
|
|
||||||
您可以在`app.ini`的`[openid]`下設定`WHITELISTED_URI`或`BLACKLISTED_URIS`。
|
|
||||||
|
|
||||||
**注意**: 白名單優先,如果白名單非空,則忽略黑名單。
|
|
||||||
|
|
||||||
### 僅允許發佈問題的使用者
|
### 僅允許發佈問題的使用者
|
||||||
|
|
||||||
目前實現這一點的方法是建立/修改一個具有最大儲存庫建立限制為 0 的使用者。
|
目前實現這一點的方法是建立/修改一個具有最大儲存庫建立限制為 0 的使用者。
|
||||||
|
|||||||
Reference in new issue
Block a user