Skip to content

[SSH] Clean up credentials and support local user login#4065

Merged
jiasli merged 30 commits intoAzure:mainfrom
vthiebaut10:ssh-cleanup
Nov 17, 2021
Merged

[SSH] Clean up credentials and support local user login#4065
jiasli merged 30 commits intoAzure:mainfrom
vthiebaut10:ssh-cleanup

Conversation

@vthiebaut10
Copy link
Contributor

@vthiebaut10 vthiebaut10 commented Nov 3, 2021

  • Credentials Clean-up
    • az ssh vm
      • Save generated keys and certificates to a temporary folder. Once connection is established or after 2 minutes, delete all keys.
    • az ssh config
      • Save generated credentials to a default folder in the same location as the config file. For example:
        az ssh config --ip 1.2.3.4 --file /home/user/.ssh/myconfig will save credentials to the following directory /home/user/.ssh/az_ssh_config/1.2.3.4.
      • A warning to remind user to delete generated keys once they are no longer being used will be printed to the console.
      • New parameter --keys-destination-folder allow users to decide where generated keys and certs will be saved.
    • az ssh cert
      • User can no longer run command with no parameters.
      • If user only provides --file, new keys are saved in the same location as the new cert.
  • Support local user login for both ssh vm and ssh config.
    • To login to a local account instead of an AAD account. Simply provide --local-user parameter.
    • For key based authentication, provide --private-key-file/-i
    • For certificate based authentication, provide --private-key-file/-i and --certificate-file/-c.
    • For password based authentication, don't provide any credentials.

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

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
    Note: There are some style failures related to catching too general exceptions.

  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

VERSION = "1.0.0"

CLASSIFIERS = [
'Development Status :: 4 - Beta',
Copy link

Choose a reason for hiding this comment

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

I think we should change this. With GA, we no longer should say Beta

Copy link

Choose a reason for hiding this comment

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

Surprised to see the License type is MIT license instead of Microsoft public license (Ms-PL).
Is it a common norm for Az cli to use MIT license?

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 4, 2021

SSH

@vthiebaut10 vthiebaut10 changed the title [SSH] Clean up credentials [SSH] Clean up credentials and support local user login Nov 8, 2021
@bagajjal
Copy link

Hello, can someone please approve this PR. IT's been 12 days but there is no response

@jiasli jiasli merged commit 50a3e25 into Azure:main Nov 17, 2021
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.

4 participants