az containerapp auth
Note
此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 了解更多关于扩展的信息。
管理 containerapp 身份验证和授权。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az containerapp auth apple |
管理 Apple 标识提供者的 containerapp 身份验证和授权。 |
Core | GA |
| az containerapp auth apple show |
显示 Apple 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth apple update |
更新 Apple 标识提供者的客户端 ID 和客户端密码。 |
Core | GA |
| az containerapp auth facebook |
管理 Facebook 标识提供者的容器应用身份验证和授权。 |
Core | GA |
| az containerapp auth facebook show |
显示 Facebook 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth facebook update |
更新 Facebook 标识提供者的应用 ID 和应用机密。 |
Core | GA |
| az containerapp auth github |
管理 GitHub 标识提供者的容器应用身份验证和授权。 |
Core | GA |
| az containerapp auth github show |
显示 GitHub 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth github update |
更新 GitHub 标识提供者的客户端 ID 和客户端密码。 |
Core | GA |
| az containerapp auth google |
管理 Google 标识提供者的 containerapp 身份验证和授权。 |
Core | GA |
| az containerapp auth google show |
显示 Google 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth google update |
更新 Google 标识提供者的客户端 ID 和客户端密码。 |
Core | GA |
| az containerapp auth microsoft |
管理Microsoft标识提供者的 containerapp 身份验证和授权。 |
Core | GA |
| az containerapp auth microsoft show |
显示 Azure Active Directory 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth microsoft update |
更新 Azure Active Directory 标识提供者的客户端 ID 和客户端密码。 |
Core | GA |
| az containerapp auth openid-connect |
管理自定义 OpenID Connect 标识提供者的容器应用身份验证和授权。 |
Core | GA |
| az containerapp auth openid-connect add |
配置新的自定义 OpenID Connect 标识提供者。 |
Core | GA |
| az containerapp auth openid-connect remove |
删除现有的自定义 OpenID Connect 标识提供者。 |
Core | GA |
| az containerapp auth openid-connect show |
显示自定义 OpenID Connect 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth openid-connect update |
更新现有自定义 OpenID Connect 标识提供者的客户端 ID 和客户端机密设置名称。 |
Core | GA |
| az containerapp auth show |
显示 containerapp 的身份验证设置。 |
Core | GA |
| az containerapp auth show (containerapp 扩展) |
显示 containerapp 的身份验证设置。 |
Extension | GA |
| az containerapp auth twitter |
管理 Twitter 标识提供者的 containerapp 身份验证和授权。 |
Core | GA |
| az containerapp auth twitter show |
显示 Twitter 标识提供者的身份验证设置。 |
Core | GA |
| az containerapp auth twitter update |
更新 Twitter 标识提供者的使用者密钥和使用者机密。 |
Core | GA |
| az containerapp auth update |
更新容器应用的身份验证设置。 |
Core | GA |
| az containerapp auth update (containerapp 扩展) |
更新容器应用的身份验证设置。 |
Extension | 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
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
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
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp auth update
更新容器应用的身份验证设置。
az containerapp auth update [--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 {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
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
未经身份验证的客户端尝试访问应用时要执行的操作。
| 属性 | 值 |
|---|---|
| 接受的值: | AllowAnonymous, RedirectToLoginPage, Return401, Return403 |
包含身份验证设置的配置文件的路径(如果它们来自文件)。
包含请求主机的标头的名称。
包含请求方案的标头的名称。
如果为当前应用启用了身份验证/授权功能,则为 True;否则为 false。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
应从身份验证规则中排除的路径列表。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
用于确定所发出请求的 URL 的约定。
| 属性 | 值 |
|---|---|
| 接受的值: | Custom, NoProxy, Standard |
配置多个提供程序时要使用的默认身份验证提供程序。
如果不允许使用 HTTPS 方案的身份验证/授权响应,则为 False;否则为 true。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
用于当前应用的身份验证/授权功能的 RuntimeVersion。
要用于令牌存储的 Blob 存储 SAS URL。
包含要用于令牌存储的 Blob 存储 SAS URL 的机密名称。
Azure 应用服务身份验证/授权功能配置设置中特定字段的值。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指示是否为应用启用了令牌存储的布尔值。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp auth update (containerapp 扩展)
更新容器应用的身份验证设置。
az containerapp auth update [--action --unauthenticated-client-action {AllowAnonymous, RedirectToLoginPage, Return401, Return403}]
[--bci --blob-container-identity]
[--blob-container-uri]
[--config-file-path]
[--custom-host-header --proxy-custom-host-header]
[--custom-proto-header --proxy-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
使用默认系统分配的托管标识配置 Blob 存储令牌存储以进行身份验证。
az containerapp auth update -g myResourceGroup --name my-containerapp --token-store true --blob-container-uri https://storageAccount1.blob.core.windows.net/container1
使用用户分配的托管标识配置 Blob 存储令牌存储以进行身份验证。
az containerapp auth update -g myResourceGroup --name my-containerapp --token-store true --blob-container-uri https://storageAccount1.blob.core.windows.net/container1 --blob-container-identity managedIdentityResourceId
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
未经身份验证的客户端尝试访问应用时要执行的操作。
| 属性 | 值 |
|---|---|
| 接受的值: | AllowAnonymous, RedirectToLoginPage, Return401, Return403 |
默认为空,以使用系统分配的标识,或使用托管标识的资源 ID 通过 Azure Blob 存储进行身份验证。
包含令牌的 Blob 存储的 URI。 不应与sas_url_secret和sas_url_secret_name一起使用。
包含身份验证设置的配置文件的路径(如果它们来自文件)。
包含请求主机的标头的名称。
包含请求方案的标头的名称。
如果为当前应用启用了身份验证/授权功能,则为 True;否则为 false。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
应从身份验证规则中排除的路径列表。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
用于确定所发出请求的 URL 的约定。
| 属性 | 值 |
|---|---|
| 接受的值: | Custom, NoProxy, Standard |
配置多个提供程序时要使用的默认身份验证提供程序。
如果不允许使用 HTTPS 方案的身份验证/授权响应,则为 False;否则为 true。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
用于当前应用的身份验证/授权功能的 RuntimeVersion。
要用于令牌存储的 Blob 存储 SAS URL。
包含要用于令牌存储的 Blob 存储 SAS URL 的机密名称。
Azure 应用服务身份验证/授权功能配置设置中特定字段的值。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指示是否为应用启用了令牌存储的布尔值。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |