Skip to content

Conversation

@yugangw-msft
Copy link
Contributor

@yugangw-msft yugangw-msft commented Jan 17, 2018

Fix #5099. Fix #5258
@derekbekoe, I can also update related extension code. So let me know
@djyou, I can update acr code. So let me know

Moving forward, during code review, for any HTTTPS raw requests outside of Python SDK, we just ensure the new code checks the global flag

  • [will do later] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

Command Guidelines

  • [na] Each command and parameter has a meaningful description.
  • [na] Each new command has a test.

(see Authoring Command Modules)

@promptws
Copy link

View a preview at https://prompt.ws/r/Azure/azure-cli/5328
This is an experimental preview for @microsoft users.

@yugangw-msft yugangw-msft changed the title Able to skip cert check when sending out raw requests Ensure skip cert check when sending out raw requests Jan 17, 2018
@djyou
Copy link
Member

djyou commented Jan 17, 2018

Thank you @yugangw-msft Please go ahead with updating acr code.

@yugangw-msft yugangw-msft changed the title Ensure skip cert check when sending out raw requests Ensure skip cert check when sending out raw requests if related env var is configured Jan 17, 2018
@djyou
Copy link
Member

djyou commented Jan 18, 2018

acr part looks good to me. Thank you @yugangw-msft

@yugangw-msft
Copy link
Contributor Author

@derekbekoe @djyou, thanks for the review. I have tried mitmproxy on ubuntu using mitmproxy's default unsigned cert, it works now to capture traces from commands like az extension list-available and az acr repository list -n ygacr. Of course, az vm create also works.
Merging.

@yugangw-msft yugangw-msft merged commit f566a43 into Azure:dev Jan 18, 2018
@yugangw-msft yugangw-msft deleted the proxy branch January 18, 2018 23:57
Comment on lines -81 to +83
txt = urlopen(target_url).read()
dic = json.loads(txt.decode())
# under hack mode(say through proxies with unsigned cert), opt out the cert verification
response = requests.get(target_url, verify=(not should_disable_connection_verify()))
Copy link
Contributor

Choose a reason for hiding this comment

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

This is where urlopen was modified

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants