身份验证配置¶
authentication_method¶
authentication_method (String)
默认值 'unvalidated'
- authentication_method
unvalidated:接受用户 id 和密码。不验证密码。none:不要求提供用户 id 或密码。验证为管理员。openid:用户 OpenID Connect 身份验证提供商。参见下方的其他 OpenID 设置。pam:接受用户 id 和密码。使用操作系统验证用户。ldap:接受用户 id 和密码。针对 ladp 服务器进行验证。
可在 LDAP 设置下查询其他设置。
local: 接受用户 id 和密码。针对 local_htpasswd_file 中提供的 htpasswd 文件进行验证。ibm_spectrum_conductor:使用 IBM conductor 验证 api 进行验证。tls_certificate: 通过提供 TLS 证书使用 Driverless 进行身份验证。jwt: 通过从请求元数据中获取的 JWT 进行验证。
additional_authentication_methods¶
additional_authentication_methods (List)
默认值 []
将为客户端启用的其他身份验证方法。各个方法的登录表单将在 ‘/login/’<authentication_method>’ 路径上可用。逗号分隔列表。
authentication_default_timeout_hours¶
authentication_default_timeout_hours (Float)
默认值 72.0
强制用户再次登录前的默认时间(小时)(如果 authentication_method 没有提供)。
authentication_gui_polling_prolongs_session¶
authentication_gui_polling_prolongs_session (Boolean)
默认值 False
启用后,用户会话会自动延长,即使只是观看正在运行的实验,而不与应用程序交互
auth_openid_provider_base_uri¶
auth_openid_provider_base_uri (String)
默认值 ''
- OpenID Connect 设置:
有关 OpenID 验证流工作方式的详细信息,请参阅 OpenID Connect 基础客户端实施指南 https://openid.net/specs/openid-connect-basic-1_0.html OpenID Provider 服务器的基础服务器 URI(例如:https://oidp.ourdomain.com
auth_openid_configuration_uri¶
auth_openid_configuration_uri (String)
默认值 ''
- 从中提取 OpenID 配置数据的 URI(可从此 URI 提取大部分所需的 OpenID 配置)
通常位于: /auth/realms/master/.well-known/openid-configuration
auth_openid_auth_uri¶
auth_openid_auth_uri (String)
默认值 ''
启动验证流程的 uri
auth_openid_token_uri¶
auth_openid_token_uri (String)
默认值 ''
从 OpenID 服务器收到回调后,用于请求令牌的 URI
auth_openid_userinfo_uri¶
auth_openid_userinfo_uri (String)
默认值 ''
获取 access_token 后用于获取用户信息的 URI(例如用户所属组列表将在此处提供)
auth_openid_logout_uri¶
auth_openid_logout_uri (String)
默认值 ''
登出用户的 uri
auth_openid_redirect_uri¶
auth_openid_redirect_uri (String)
默认值 ''
- OpenID provide 将用于发送 ‘authentication_code’ 的回调 uri
这是 Driverless AI 中的 OpenID 回调端点。大部分 OpenID 提供程序需要它是 HTTPs。(例如 https://driverless.ourdomin.com/openid/callback)
auth_openid_grant_type¶
auth_openid_grant_type (String)
默认值 ''
OAuth2 授予类型(对于 OpenID,通常是 authorization_code,也可以是 access_token)
auth_openid_response_type¶
auth_openid_response_type (String)
默认值 ''
OAuth2 相应类型(通常是代码)
auth_openid_client_id¶
auth_openid_client_id (String)
默认值 ''
使用 OpenID 提供程序注册的客户端 ID
auth_openid_client_secret¶
auth_openid_client_secret (String)
默认值 ''
注册客户端 ID 时由 OpenID 提供程序提供的客户端密钥
auth_openid_scope¶
auth_openid_scope (String)
默认值 ''
- 信息的作用域(通常是 openid)。可以是多个作用域的列表,用空格分隔,
可能的值列示在 https://openid.net/specs/openid-connect-basic-1_0.html#Scopes
auth_openid_userinfo_auth_key¶
auth_openid_userinfo_auth_key (String)
默认值 ''
我们应检查 user_info json 中的什么密钥来授权用户
auth_openid_userinfo_auth_value¶
auth_openid_userinfo_auth_value (String)
默认值 ''
该密钥在 user_info json 中应使用什么值,以授权用户
auth_openid_userinfo_username_key¶
auth_openid_userinfo_username_key (String)
默认值 ''
在 user_info json 中指定用户名的密钥(我们将使用此密钥的值作为 Driverless AI 中的用户名)
auth_openid_urlencode_quote_via¶
auth_openid_urlencode_quote_via (String)
默认值 'quote'
引用来自 Urllib.parse 的方法,用于在身份验证请求中对有效载荷字典进行编码。
auth_openid_access_token_expiry_key¶
auth_openid_access_token_expiry_key (String)
默认值 'expires_in'
Token Response JSON 中的密钥,包含访问令牌到期的值
auth_openid_refresh_token_expiry_key¶
auth_openid_refresh_token_expiry_key (String)
默认值 'refresh_expires_in'
Token Response JSON 中的密钥,包含访问令牌到期的值
auth_openid_token_expiration_secs¶
auth_openid_token_expiration_secs (Number)
默认值 3600
访问令牌的到期时间(秒)
auth_openid_use_objectpath_match¶
auth_openid_use_objectpath_match (Boolean)
auth_openid_use_objectpath_expression¶
auth_openid_use_objectpath_expression (String)
默认值 ''
- ObjectPath (<http://objectpath.org/>) 表达式,用于
评估是否允许用户登录 Driverless。
只要评估结果为 True,即表示允许用户登录。
示例:
简单的声明等式: $.our_claim is “our_value” 明列表包含所需值: “expected_role” in @.roles
auth_openid_token_introspection_url¶
auth_openid_token_introspection_url (String)
默认值 ''
为 OpenID Connect 身份验证设置令牌内省 URL。(需要是绝对 URL)当启用 API 令牌内省时需要此设置。设置后,用于获取令牌 TTL,且 IDP 不会在令牌端点响应中提供 expires_in 字段。
auth_openid_end_session_endpoint_url¶
auth_openid_end_session_endpoint_url (String)
默认值 ''
设置一个 URL,用户在登出后会被重定向至该 URL。(需要是绝对 URL)
auth_openid_default_scopes¶
auth_openid_default_scopes (String)
默认值 ''
如果设置了此参数,服务器在要求提供登录时的令牌时,将使用这些作用域。(空格分隔的列表)
api_token_introspection_enabled¶
api_token_introspection_enabled (Boolean)
默认值 False
启用选项,以使用 Bearer 令牌通过 RPC 端点进行身份验证。
api_token_introspection_method¶
api_token_introspection_method (String)
默认值 'OAUTH2_TOKEN_INTROSPECTION'
设置用于内省 bearer 令牌的方法。
- OAUTH2_TOKEN_INTROSPECTION:使用 OAuth 2.0 令牌内省 (RPC 7662)
用于内省 bearer 令牌的端点。当 ‘openid’ 用作身份验证方法时,此设置很有用。使用 ‘auth_openid_client_id’ 和 ‘auth_openid_client_secret’ 通过授权服务器进行验证,并使用 auth_openid_token_introspection_url 执行内省。
api_token_oauth2_scopes¶
api_token_oauth2_scopes (String)
默认值 ''
- 设置访问令牌通过内省所需的
作用域的最小值。用空格分隔。/它将被传递到内省端点,对于不强制实施作用域的服务器,也要在响应之后进行验证。将此设置留空则将关闭所有验证。
api_token_oauth2_username_field_name¶
api_token_oauth2_username_field_name (String)
默认值 'username'
令牌内省端点返回的哪个响应字段应该用作用户名。
oauth2_client_tokens_enabled¶
oauth2_client_tokens_enabled (Boolean)
默认值 False
启用此选项以从 UI 启动 PKCE 流,以获取可与 Driverless 客户端配合使用的令牌
oauth2_client_tokens_client_id¶
oauth2_client_tokens_client_id (String)
默认值 ''
设置客户端 id,它将用于 OAuth 2.0 授权代码流以获取令牌。客户端需要是公共的,并可使用带 S256 代码挑战的 PKCE。
oauth2_client_tokens_authorize_url¶
oauth2_client_tokens_authorize_url (String)
默认值 ''
设置授权端点的绝对 url。
oauth2_client_tokens_token_url¶
oauth2_client_tokens_token_url (String)
默认值 ''
设置令牌端点的绝对 url。
oauth2_client_tokens_introspection_url¶
oauth2_client_tokens_introspection_url (String)
默认值 ''
设置令牌内省端点的绝对 url。它将显示在 UI 中,使客户端可以检查令牌到期情况。
oauth2_client_tokens_redirect_url¶
oauth2_client_tokens_redirect_url (String)
默认值 ''
设置重定向 url 的绝对值,其中,Driverless 处理授权代码流的重定向部分。此 <Driverless 基础 url>/oauth2/client_token
oauth2_client_tokens_scope¶
oauth2_client_tokens_scope (String)
默认值 'openid profile ai.h2o.storage'
设置请求令牌的作用域。用空格分隔的列表。
ldap_server¶
ldap_server (String)
默认值 ''
Ldap 服务器域或 ip
ldap_port¶
ldap_port (String)
默认值 ''
Ldap 服务器端口
ldap_bind_dn¶
ldap_bind_dn (String)
默认值 ''
LDAP 绑定用户的完整可分辨名称
ldap_bind_password¶
ldap_bind_password (String)
默认值 ''
LDAP 绑定的密码
ldap_tls_file¶
ldap_tls_file (String)
默认值 ''
提供证书文件位置
ldap_use_ssl¶
ldap_use_ssl (Boolean)
默认值 False
使用 true 以使用 ssl,或使用 false
ldap_search_base¶
ldap_search_base (String)
默认值 ''
在 DIT 中开始搜索的位置
ldap_search_filter¶
ldap_search_filter (String)
默认值 ''
描述搜索对象的字符串。您可以使用 Python 替换功能来进行动态构建。(仅支持 {{DAI_USERNAME}}。)
ldap_search_attributes¶
ldap_search_attributes (String)
默认值 ''
搜索返回的 ldap 属性
ldap_user_name_attribute¶
ldap_user_name_attribute (String)
默认值 ''
指定用于查找用户名的密钥
ldap_recipe¶
ldap_recipe (String)
默认值 '0'
使用此插件时,需要设置为 “1”
ldap_user_prefix¶
ldap_user_prefix (String)
默认值 ''
已弃用,不使用
ldap_search_user_id¶
ldap_search_user_id (String)
默认值 ''
已弃用,使用 ldap_bind_dn
ldap_search_password¶
ldap_search_password (String)
默认值 ''
已弃用,ldap_bind_password
ldap_ou_dn¶
ldap_ou_dn (String)
默认值 ''
已弃用,改为使用 ldap_search_base
ldap_dc¶
ldap_dc (String)
默认值 ''
已弃用,使用 ldap_base_dn
ldap_base_dn¶
ldap_base_dn (String)
默认值 ''
已弃用,使用 ldap_search_base
ldap_base_filter¶
ldap_base_filter (String)
默认值 ''
已弃用,使用 ldap_search_filter
auth_tls_crl_file¶
auth_tls_crl_file (String)
默认值 ''
将用于验证客户端证书的 CRL 文件的路径。
auth_tls_subject_field¶
auth_tls_subject_field (String)
默认值 'CN'
主题的哪个字段将用作用户名或用于进一步验证的其他值的源。
auth_tls_field_parse_regexp¶
auth_tls_field_parse_regexp (String)
默认值 '(?P<username>.*)'
正则表达式,用于解析主题字段以获取用于进一步验证的用户名或其他值。
auth_tls_user_lookup¶
auth_tls_user_lookup (String)
默认值 'REGEXP_ONLY'
- 设置获取用户身份的方法
- REGEXP_ONLY:将使用 ‘auth_tls_subject_field’ 和 ‘auth_tls_field_parse_regexp’
从客户端证书中提取用户名。
- LDAP_LOOKUP:将使用 LDAP 服务器查找用户名。
‘auth_tls_ldap_server’、 ‘auth_tls_ldap_port’、 ‘auth_tls_ldap_use_ssl’、 ‘auth_tls_ldap_tls_file’、 ‘auth_tls_ldap_bind_dn’、 ‘auth_tls_ldap_bind_password’ 选项用于建立与 LDAP 服务器的连接。 ‘auth_tls_subject_field’ 和 ‘auth_tls_field_parse_regexp’ 选项用于解析证书。 ‘auth_tls_ldap_search_base’、 ‘auth_tls_ldap_search_filter’ 和 ‘auth_tls_ldap_username_attribute’ 选项用于执行查找。
auth_tls_ldap_server¶
auth_tls_ldap_server (String)
默认值 ''
使用 ‘tls_certificate’ 验证方法和 LDAP_LOOKUP 的 LDAP 服务器的主机名或 IP 地址。
auth_tls_ldap_port¶
auth_tls_ldap_port (String)
默认值 ''
使用 ‘tls_certificate’ 验证方法和 LDAP_LOOKUP 的 LDAP 服务器的端口。
auth_tls_ldap_use_ssl¶
auth_tls_ldap_use_ssl (Boolean)
默认值 False
连接到使用 ‘tls_certificate’ 验证方法和 LDAP_LOOKUP 的 LDAP 服务器时是否使用 SSL。
auth_tls_ldap_tls_file¶
auth_tls_ldap_tls_file (String)
默认值 ''
使用 ‘tls_certificate’ 验证方法和 LDAP_LOOKUP 的 SSL 证书的路径。
auth_tls_ldap_bind_dn¶
auth_tls_ldap_bind_dn (String)
默认值 ''
使用 ‘tls_certificate’ 验证方法和 LDAP_LOOKUP 的 LDAP 绑定用户的完整可分辨名称。
auth_tls_ldap_bind_password¶
auth_tls_ldap_bind_password (String)
默认值 ''
使用 ‘tls_certificate’ 验证方法和 LDAP_LOOKUP 的 LDAP 绑定的密码。
auth_tls_ldap_search_base¶
auth_tls_ldap_search_base (String)
默认值 ''
DIT 中开始搜索的位置,通过 ‘tls_certificate’ 身份验证方法与 LDAP_LOOKUP 配合使用。
auth_tls_ldap_search_filter¶
auth_tls_ldap_search_filter (String)
默认值 ''
- 将用于通过 ‘tls_certificate’ 身份验证方法和
LDAP_LOOKUP 查找用户的 LDAP 过滤器。
可以使用来自 ‘auth_tls_field_parse_regexp’ 的指定捕获组作为替代进行动态构建。
- 示例:
auth_tls_field_parse_regexp = “w+ (?P<id>d+)” auth_tls_ldap_search_filter = “(&(objectClass=person)(id={{id}}))”
auth_tls_ldap_username_attribute¶
auth_tls_ldap_username_attribute (String)
默认值 ''
指定使用 ‘tls_certificate’ 身份验证方法和 LDAP_LOOKUP 指定将用做用户名的 LDAP 记录属性。
auth_tls_ldap_authorization_lookup_filter¶
auth_tls_ldap_authorization_lookup_filter (String)
默认值 ''
- 设置可选的附加查找过滤器,
此过滤器在找到用户后执行。例如,这可用于检查用户是否是特定组的成员。可以根据查找返回的属性动态构建过滤器。若搜索未返回任何条目,则授权失败。若返回一个或多个条目,则授权成功。示例:
auth_tls_field_parse_regexp = “w+ (?P<id>d+)” ldap_search_filter = “(&(objectClass=person)(id={{id}}))” auth_tls_ldap_authorization_lookup_filter = “(&(objectClass=group)(member=uid={{uid}},dc=example,dc=com))”
如果此选项为空,则不执行任何其他查找,一次成功的用户查找足以授权该用户。
auth_tls_ldap_authorization_search_base¶
auth_tls_ldap_authorization_search_base (String)
默认值 ''
在其中启动授权查找的基础可分辨名称。当设置了 ‘auth_tls_ldap_authorization_lookup_filter’ 时,使用此选项。
auth_jwt_token_source¶
auth_jwt_token_source (String)
默认值 'HEADER'
- 设置将从请求中选取令牌的方式
- COOKIE:将使用通过 ‘auth_jwt_source_parse_regexp’ 解析的 ‘auth_jwt_cookie_name’ cookie 内容
来获取令牌内容。
- HEADER: 将使用通过
auth_jwt_cookie_name解析的 来获取令牌内容。
‘auth_jwt_header_name’ 标头值¶
auth_jwt_cookie_name (String)
默认值 ''
指定将用于获取 JWT 的 cookie 的名称。
auth_jwt_header_name¶
auth_jwt_header_name (String)
默认值 ''
指定将用于获取 JWT 的 http 标头名称
auth_jwt_source_parse_regexp¶
auth_jwt_source_parse_regexp (String)
默认值 '(?P<token>.*)'
将用于解析 JWT 源的正则表达式。表达式采用 Python 语法,必须包含带捕获的令牌值的指定组 ‘token’。
auth_jwt_username_claim_name¶
auth_jwt_username_claim_name (String)
默认值 'sub'
哪个 JWT 声明将用作 Driverless 的用户名。
auth_jwt_verify¶
auth_jwt_verify (Boolean)
默认值 True
是否验证 JWT 的签名。
auth_jwt_algorithm¶
auth_jwt_algorithm (String)
默认值 'HS256'
将根据 RFC 7518 用于验证签名的签名算法。
auth_jwt_secret¶
auth_jwt_secret (String)
默认值 ''
指定 HMAC 的密钥内容或 RSA 和 DSA 签名算法的公共密钥。
auth_jwt_exp_leeway_seconds¶
auth_jwt_exp_leeway_seconds (Number)
默认值 0
JWT 过期后仍可被接受的秒数
auth_jwt_required_audience¶
auth_jwt_required_audience (List)
默认值 []
JWT 的已接受 ‘aud’ 声明列表。若为空,则接受所有受众
auth_jwt_required_issuer¶
auth_jwt_required_issuer (String)
默认值 ''
为了被接受,JWT 需要拥有的 ‘iss’ 声明值。
local_htpasswd_file¶
local_htpasswd_file (String)
默认值 ''
生成 htpasswd 文件的本地密码文件:参阅下面的语法 htpasswd -B ‘<location_to_place_htpasswd_file>’ ‘<username>’ 注意:-B 强制使用 brcypt(一种安全加密法)
authorization_service¶
Authorization service name (String)
Default value 'local'
Authorization service name: * local: Authorization is based on config.toml settings such as local_administrator_list
local_administrator_list¶
List of usernames with admin rights (List)
默认值 []