Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask for SSH password using getpass #263

Merged
merged 2 commits into from
Feb 7, 2024
Merged

Ask for SSH password using getpass #263

merged 2 commits into from
Feb 7, 2024

Conversation

jan-janssen
Copy link
Member

No description provided.

@jan-janssen jan-janssen added the format_black reformat the code using the black standard label Feb 5, 2024
@niklassiemer
Copy link
Member

Code changes seem to enable the getpass functionality, however, how often is one asked to provide the passwords? I really think it is a major security flaw to have the ssh password directly stored as plain text...

@jan-janssen
Copy link
Member Author

Code changes seem to enable the getpass functionality, however, how often is one asked to provide the passwords? I really think it is a major security flaw to have the ssh password directly stored as plain text...

The password is only required when the connection is opened, so when the first job submitted the password is required but afterwards in the same notebook other jobs use the same connection.

@niklassiemer
Copy link
Member

So, if someone is developing something, it might out to be really annoying due to multiple kernel restarts... However, they could also use a control master outside of pyiron to hold up the connection and just use that all the time.

Would you agree to remove the possibility to store the plain text password in the config file altogether? Storing it this way most certainly violates the terms of usage for every HPC system...

I will try this setup once with my control master in the .ssh/config - it might be that the second attempt runs without any problem.

@jan-janssen
Copy link
Member Author

So, if someone is developing something, it might out to be really annoying due to multiple kernel restarts... However, they could also use a control master outside of pyiron to hold up the connection and just use that all the time.

Control master is not yet officially supported by paramiko: paramiko/paramiko#852

Would you agree to remove the possibility to store the plain text password in the config file altogether? Storing it this way most certainly violates the terms of usage for every HPC system...

I do not think that pysqa should introduce this restriction, as there are still use cases where a fully automated authentication is required. Still I agree that pysqa should provide the user with options to also their password manually when this is required by the security policies of the computing center. This functionality is introduced with this pull request. That is why I would like to merge it soon and release a new pysqa version.

I will try this setup once with my control master in the .ssh/config - it might be that the second attempt runs without any problem.

Copy link
Member

@niklassiemer niklassiemer left a comment

Choose a reason for hiding this comment

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

I agree, the functionality to not put a password is implemented and I am also ok, with pysqa not restricting the usage of a stored password altogether.

When we document this, I would add a disclaimer that this is a possible security risk and one should check the policies of the target system.

@jan-janssen
Copy link
Member Author

When we document this, I would add a disclaimer that this is a possible security risk and one should check the policies of the target system.

Yes, I added an issue to extend the documentation #264 - unfortunately currently the remote submission only works with pyiron_base so this needs some more generalisation for the next minor release 0.2.0.

@jan-janssen jan-janssen merged commit fe15ed8 into main Feb 7, 2024
15 of 16 checks passed
@jan-janssen jan-janssen deleted the getpass branch February 7, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feedback] Provide option to enter password just like two factor authentication
3 participants