Skip to content

[Stream Analytics] Fix #9708: Policy isn't triggered when creating a stream analytics input#9734

Merged
necusjz merged 6 commits intoAzure:mainfrom
william051200:9708-asa-input
Mar 27, 2026
Merged

[Stream Analytics] Fix #9708: Policy isn't triggered when creating a stream analytics input#9734
necusjz merged 6 commits intoAzure:mainfrom
william051200:9708-asa-input

Conversation

@william051200
Copy link
Copy Markdown
Member

@william051200 william051200 commented Mar 27, 2026

Bug fix #9708

Added missing param authentication_mode based on this documentation.


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

Related command

az stream-analytics input create

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@william051200 william051200 requested a review from necusjz as a code owner March 27, 2026 05:18
Copilot AI review requested due to automatic review settings March 27, 2026 05:18
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 27, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

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

Hi @william051200,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 27, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

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>

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@william051200 william051200 changed the title {stream-analytics} Fix creating stream analytics input not triggering policy issue {stream-analytics} Fix creating stream analytics input not triggering policy bug Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Copy link
Copy Markdown
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

Fixes az stream-analytics input create not sending authenticationMode for Blob-based inputs, which prevented Azure Policy (deny non–Managed Identity auth) from evaluating correctly.

Changes:

  • Add authentication_mode/authenticationMode serialization mappings to vendored Stream Analytics SDK models for Blob datasource/input types.
  • Add a scenario test that validates policy denial occurs when creating a Blob input with authenticationMode=ConnectionString.
  • Update/add VCR recordings for the new test and for storage API-version drift in existing input CRUD recordings.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/stream-analytics/azext_stream_analytics/vendored_sdks/streamanalytics/models/_models_py3.py Adds authenticationMode mapping/constructor plumbing for Blob datasource and Blob input models (py3 typed models).
src/stream-analytics/azext_stream_analytics/vendored_sdks/streamanalytics/models/_models.py Adds authenticationMode mapping and stores the value in legacy (kwargs-based) models.
src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py Adds a regression scenario test for policy denial when using ConnectionString authentication mode.
src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_input_crud.yaml Updates recorded Storage RP api-version used during the scenario.
src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_input_create_policy_violation.yaml New recording capturing the policy assignment + denied input creation flow.

@necusjz necusjz changed the title {stream-analytics} Fix creating stream analytics input not triggering policy bug {stream-analytics} Fix #9708: Policy isn't triggered when creating stream analytics input Mar 27, 2026
@necusjz necusjz changed the title {stream-analytics} Fix #9708: Policy isn't triggered when creating stream analytics input [Stream Analytics] Fix #9708: Policy isn't triggered when creating a stream analytics input Mar 27, 2026
@necusjz necusjz merged commit fe729c5 into Azure:main Mar 27, 2026
24 checks passed
@william051200 william051200 deleted the 9708-asa-input branch March 27, 2026 06:28
@azclibot
Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ stream-analytics-1.0.2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=158405133&view=results

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.

Deploying Azure Stram Analytics(ASA) Input using CLI will not trigger the policy

5 participants