Skip to content

Conversation

@ChristineWanjau
Copy link
Contributor

@ChristineWanjau ChristineWanjau commented Jan 14, 2026

Related command

az appconfig

Description

This PR adds a new anonymous auth mode that is only used with http endpoints.

Testing Guide

az appconfig kv list --auth-mode anonymous --endpoint http://example.com

History Notes

[Component Name 2] az appconfig: Add anonymous auth mode


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings January 14, 2026 06:23
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jan 14, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jan 14, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️appconfig
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate appconfig feature delete cmd appconfig feature delete update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature disable cmd appconfig feature disable update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature enable cmd appconfig feature enable update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature filter add cmd appconfig feature filter add update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature filter delete cmd appconfig feature filter delete update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature filter list cmd appconfig feature filter list update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature filter show cmd appconfig feature filter show update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature filter update cmd appconfig feature filter update update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature list cmd appconfig feature list update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature lock cmd appconfig feature lock update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature set cmd appconfig feature set update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature show cmd appconfig feature show update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig feature unlock cmd appconfig feature unlock update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv delete cmd appconfig kv delete update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv export cmd appconfig kv export update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv export cmd appconfig kv export update parameter dest_auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv import cmd appconfig kv import update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv import cmd appconfig kv import update parameter src_auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv list cmd appconfig kv list update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv lock cmd appconfig kv lock update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv restore cmd appconfig kv restore update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv set cmd appconfig kv set update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv set-keyvault cmd appconfig kv set-keyvault update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv show cmd appconfig kv show update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig kv unlock cmd appconfig kv unlock update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig revision list cmd appconfig revision list update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig snapshot archive cmd appconfig snapshot archive update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig snapshot create cmd appconfig snapshot create update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig snapshot list cmd appconfig snapshot list update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig snapshot recover cmd appconfig snapshot recover update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']
⚠️ 1010 - ParaPropUpdate appconfig snapshot show cmd appconfig snapshot show update parameter auth_mode: updated property choices from ['key', 'login'] to ['anonymous', 'key', 'login']

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 14, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@ChristineWanjau ChristineWanjau changed the title [App Config] az appconfig: Adding anonymous auth mode [App Config] az appconfig: Add anonymous auth mode Jan 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.


if auth_mode == "anonymous":
try:
connection_string = "Endpoint={};Id=test-id;Secret=abcdefghijklmnopqrstuvwxyz1234567890".format(endpoint)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of faking a connection string, can we rather pass endpoint and an AzureKeyCredential with an empty secret? e.g,

azconfig_client = AzureAppConfigurationClient(credential=AzureKeyCredential(""),
                                                          base_url=endpoint,
                                                          user_agent=HttpHeaders.USER_AGENT)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Updated

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 27 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

self.cmd('appconfig kv list --auth-mode login --endpoint http://localhost:8080')

# key auth mode with http endpoint in connection string should fail
with self.assertRaisesRegex(CLIError, "HTTP endpoint is only supported when auth mode is 'anonymous'."):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no successful state we can test? I'm assuming that is hard as we might not have a way to use the emulator.

c.argument('fields', arg_type=fields_arg_type)
c.argument('endpoint', help='If auth mode is "login", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using `az configure --defaults appconfig_endpoint=<endpoint>`', configured_default='appconfig_endpoint')
c.argument('auth_mode', arg_type=get_enum_type(['login', 'key']), configured_default='appconfig_auth_mode', validator=validate_auth_mode,
c.argument('endpoint', help='If auth mode is "login" or "anonymous", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using `az configure --defaults appconfig_endpoint=<endpoint>`', configured_default='appconfig_endpoint')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is saying anonymous useful here as the simulator is also a requirement. It could mislead someone to thinking our service allows it.

Comment on lines +74 to +80
if endpoint and is_http_endpoint(endpoint):
raise CLIError("HTTP endpoint is only supported when auth mode is 'anonymous'.")

if connection_string:
conn_endpoint = get_store_endpoint_from_connection_string(connection_string)
if is_http_endpoint(conn_endpoint):
raise CLIError("HTTP endpoint is only supported when auth mode is 'anonymous'.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if endpoint and is_http_endpoint(endpoint):
raise CLIError("HTTP endpoint is only supported when auth mode is 'anonymous'.")
if connection_string:
conn_endpoint = get_store_endpoint_from_connection_string(connection_string)
if is_http_endpoint(conn_endpoint):
raise CLIError("HTTP endpoint is only supported when auth mode is 'anonymous'.")
if connection_string:
endpoint = get_store_endpoint_from_connection_string(connection_string)
if endpoint and is_http_endpoint(endpoint):
raise CLIError("HTTP endpoint is only supported when auth mode is 'anonymous'.")

I'm not sure if this works with like 83 as I'm not familiar with namespace.name but you could always add a line before to get a temp value so we don't have this twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants