你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az containerapp auth

注意

此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 详细了解扩展。

管理 containerapp 身份验证和授权。

命令

名称 说明 类型 状态
az containerapp auth apple

管理 Apple 标识提供者的 containerapp 身份验证和授权。

核心 GA
az containerapp auth apple show

显示 Apple 标识提供者的身份验证设置。

核心 GA
az containerapp auth apple update

更新 Apple 标识提供者的客户端 ID 和客户端密码。

核心 GA
az containerapp auth facebook

管理 Facebook 标识提供者的容器应用身份验证和授权。

核心 GA
az containerapp auth facebook show

显示 Facebook 标识提供者的身份验证设置。

核心 GA
az containerapp auth facebook update

更新 Facebook 标识提供者的应用 ID 和应用机密。

核心 GA
az containerapp auth github

管理 GitHub 标识提供者的容器应用身份验证和授权。

核心 GA
az containerapp auth github show

显示 GitHub 标识提供者的身份验证设置。

核心 GA
az containerapp auth github update

更新 GitHub 标识提供者的客户端 ID 和客户端密码。

核心 GA
az containerapp auth google

管理 Google 标识提供者的 containerapp 身份验证和授权。

核心 GA
az containerapp auth google show

显示 Google 标识提供者的身份验证设置。

核心 GA
az containerapp auth google update

更新 Google 标识提供者的客户端 ID 和客户端密码。

核心 GA
az containerapp auth microsoft

管理 Microsoft 标识提供者的 containerapp 身份验证和授权。

核心 GA
az containerapp auth microsoft show

显示 Azure Active Directory 标识提供者的身份验证设置。

核心 GA
az containerapp auth microsoft update

更新 Azure Active Directory 标识提供者的客户端 ID 和客户端密码。

核心 GA
az containerapp auth openid-connect

管理自定义 OpenID 连接标识提供者的容器应用身份验证和授权。

核心 GA
az containerapp auth openid-connect add

配置新的自定义 OpenID 连接标识提供者。

核心 GA
az containerapp auth openid-connect remove

删除现有的自定义 OpenID 连接标识提供者。

核心 GA
az containerapp auth openid-connect show

显示自定义 OpenID 连接标识提供者的身份验证设置。

核心 GA
az containerapp auth openid-connect update

更新现有自定义 OpenID 连接标识提供者的客户端 ID 和客户端密码设置名称。

核心 GA
az containerapp auth show

显示 containerapp 的身份验证设置。

核心 GA
az containerapp auth show (containerapp 扩展)

显示 containerapp 的身份验证设置。

扩展 GA
az containerapp auth twitter

管理 Twitter 标识提供者的 containerapp 身份验证和授权。

核心 GA
az containerapp auth twitter show

显示 Twitter 标识提供者的身份验证设置。

核心 GA
az containerapp auth twitter update

更新 Twitter 标识提供者的使用者密钥和使用者机密。

核心 GA
az containerapp auth update

更新容器应用的身份验证设置。

核心 GA
az containerapp auth update (containerapp 扩展)

更新容器应用的身份验证设置。

扩展 GA

az containerapp auth show

显示 containerapp 的身份验证设置。

az containerapp auth show [--ids]
                          [--name]
                          [--resource-group]
                          [--subscription]

示例

显示 containerapp 的身份验证设置。

az containerapp auth show --name my-containerapp --resource-group MyResourceGroup

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az containerapp auth show (containerapp 扩展)

显示 containerapp 的身份验证设置。

az containerapp auth show [--ids]
                          [--name]
                          [--resource-group]
                          [--subscription]

示例

显示 containerapp 的身份验证设置。

az containerapp auth show --name my-containerapp --resource-group MyResourceGroup

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az containerapp auth update

更新容器应用的身份验证设置。

az containerapp auth update [--action {AllowAnonymous, RedirectToLoginPage, Return401, Return403}]
                            [--config-file-path]
                            [--custom-host-header]
                            [--custom-proto-header]
                            [--enabled {false, true}]
                            [--excluded-paths]
                            [--ids]
                            [--name]
                            [--proxy-convention {Custom, NoProxy, Standard}]
                            [--redirect-provider]
                            [--require-https {false, true}]
                            [--resource-group]
                            [--runtime-version]
                            [--set]
                            [--subscription]

示例

更新已配置的 AAD 提供程序的客户端 ID。

az containerapp auth update -g myResourceGroup --name my-containerapp --set identityProviders.azureActiveDirectory.registration.clientId=my-client-id

通过设置配置文件路径,使用基于文件的身份验证配置应用。

az containerapp auth update -g myResourceGroup --name my-containerapp --config-file-path D:\home\site\wwwroot\auth.json

将应用配置为允许未经身份验证的请求命中应用。

az containerapp auth update -g myResourceGroup --name my-containerapp --unauthenticated-client-action AllowAnonymous

将应用配置为将未经身份验证的请求重定向到 Facebook 提供程序。

az containerapp auth update -g myResourceGroup --name my-containerapp --redirect-provider Facebook

将应用配置为侦听转发标头 X-FORWARDED-HOST 和 X-FORWARDED-PROTO。

az containerapp auth update -g myResourceGroup --name my-containerapp --proxy-convention Standard

可选参数

--action --unauthenticated-client-action

未经身份验证的客户端尝试访问应用时要执行的操作。

接受的值: AllowAnonymous, RedirectToLoginPage, Return401, Return403
--config-file-path

包含身份验证设置的配置文件的路径(如果它们来自文件)。

--custom-host-header --proxy-custom-host-header

包含请求主机的标头的名称。

--custom-proto-header --proxy-custom-proto-header

包含请求方案的标头的名称。

--enabled

如果为当前应用启用了身份验证/授权功能,则为 True;否则为 false。

接受的值: false, true
--excluded-paths

应从身份验证规则中排除的路径列表。

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。

--proxy-convention

用于确定所发出请求的 URL 的约定。

接受的值: Custom, NoProxy, Standard
--redirect-provider

配置多个提供程序时要使用的默认身份验证提供程序。

--require-https

如果不允许使用 HTTPS 方案的身份验证/授权响应,则为 False;否则为 true。

接受的值: false, true
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--runtime-version

用于当前应用的身份验证/授权功能的 RuntimeVersion。

--set

Azure App 服务身份验证/授权功能配置设置中特定字段的值。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az containerapp auth update (containerapp 扩展)

更新容器应用的身份验证设置。

az containerapp auth update [--action {AllowAnonymous, RedirectToLoginPage, Return401, Return403}]
                            [--config-file-path]
                            [--custom-host-header]
                            [--custom-proto-header]
                            [--enabled {false, true}]
                            [--excluded-paths]
                            [--ids]
                            [--name]
                            [--proxy-convention {Custom, NoProxy, Standard}]
                            [--redirect-provider]
                            [--require-https {false, true}]
                            [--resource-group]
                            [--runtime-version]
                            [--sas-url-secret]
                            [--sas-url-secret-name]
                            [--set]
                            [--subscription]
                            [--token-store {false, true}]
                            [--yes]

示例

更新已配置的 AAD 提供程序的客户端 ID。

az containerapp auth update -g myResourceGroup --name my-containerapp --set identityProviders.azureActiveDirectory.registration.clientId=my-client-id

通过设置配置文件路径,使用基于文件的身份验证配置应用。

az containerapp auth update -g myResourceGroup --name my-containerapp --config-file-path D:\home\site\wwwroot\auth.json

将应用配置为允许未经身份验证的请求命中应用。

az containerapp auth update -g myResourceGroup --name my-containerapp --unauthenticated-client-action AllowAnonymous

将应用配置为将未经身份验证的请求重定向到 Facebook 提供程序。

az containerapp auth update -g myResourceGroup --name my-containerapp --redirect-provider Facebook

将应用配置为侦听转发标头 X-FORWARDED-HOST 和 X-FORWARDED-PROTO。

az containerapp auth update -g myResourceGroup --name my-containerapp --proxy-convention Standard

可选参数

--action --unauthenticated-client-action

未经身份验证的客户端尝试访问应用时要执行的操作。

接受的值: AllowAnonymous, RedirectToLoginPage, Return401, Return403
--config-file-path

包含身份验证设置的配置文件的路径(如果它们来自文件)。

--custom-host-header --proxy-custom-host-header

包含请求主机的标头的名称。

--custom-proto-header --proxy-custom-proto-header

包含请求方案的标头的名称。

--enabled

如果为当前应用启用了身份验证/授权功能,则为 True;否则为 false。

接受的值: false, true
--excluded-paths

应从身份验证规则中排除的路径列表。

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。

--proxy-convention

用于确定所发出请求的 URL 的约定。

接受的值: Custom, NoProxy, Standard
--redirect-provider

配置多个提供程序时要使用的默认身份验证提供程序。

--require-https

如果不允许使用 HTTPS 方案的身份验证/授权响应,则为 False;否则为 true。

接受的值: false, true
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--runtime-version

用于当前应用的身份验证/授权功能的 RuntimeVersion。

--sas-url-secret
预览

要用于令牌存储的 Blob 存储 SAS URL。

--sas-url-secret-name
预览

包含要用于令牌存储的 Blob 存储 SAS URL 的机密名称。

--set

Azure App 服务身份验证/授权功能配置设置中特定字段的值。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--token-store
预览

指示是否为应用启用了令牌存储的布尔值。

接受的值: false, true
--yes -y

不提示确认。

默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。