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

private key passphrase #71

Open
sdwru opened this issue Oct 4, 2021 · 4 comments
Open

private key passphrase #71

sdwru opened this issue Oct 4, 2021 · 4 comments

Comments

@sdwru
Copy link

sdwru commented Oct 4, 2021

Is there any way this wrapper could support a private key passphrase? Ansible doesn't have a command line option for that but I am sure it's possible to do it since phpseclib has that ability.

@maschmann
Copy link
Owner

Let me think about this, since a new dependency would be introduced and we'd deviate from just providing a wrapper around ansible commands. I get back to you soon :-)

@maschmann maschmann self-assigned this Oct 5, 2021
@maschmann
Copy link
Owner

@sdwru the only way I see this being done is a check for phpseclib being installed within composer as a dependency. Not sure if it's raising the "dependency bar" too high for people using this lib. Definitely a BC break.
Also this would be another inheritance layer for non-ansible commands, but it's doable.
You can prevent such things with an ssh-agent, loading the key before using ansible.
What's your concrete problem/scenario you want to solve?

@sdwru
Copy link
Author

sdwru commented Oct 24, 2021

My use case requires a separate key for each user, and the keys are not stored in files. Something like ssh-agent is definitely not an option. Phpseclib solves most of my problems, but Ansible makes more sense for some things, so php-ansible is the solution for that. However, I am forced to use keys without passphrases because of that, which is suboptimal from a security standpoint.

If you do a search there are lots of requests to have Ansible support passphrases from command line, so I think there are plenty of scenarios where this would be useful.

@maschmann
Copy link
Owner

maschmann commented Oct 24, 2021

Ok, that's totally valid and understandable - got your point there :-)
Considering all your arguments, this could be a good addition for the lib. Thanks for proposing and also clarifying this!

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

No branches or pull requests

2 participants