-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add support for ssh_private_key #257
Conversation
louisruch
commented
Aug 26, 2022
- Update latest deps
- Add support ssh_private_key credential
- Add support for Vault library credential_type
description = "My first ssh private key credential!" | ||
credential_store_id = boundary_credential_store_static.example.id | ||
username = "my-username" | ||
private_key = "my-private-key" # change to valid SSH Private Key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always struggle with how to input private key literals, so I think it would be great if we could have a real example here. Do I need to escape newlines? Can I load from a file? These are the sort of questions I'd love an example to answer for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to show the how it would work with file
which is the recommended way, to answer your question if you want to include it as a string I do believe you need to escape newlines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can alternatively put in in an EOT
so something like:
private_key = <<-EOT
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABCDScc/85
T+BWUXGTm7e1P9AAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAINLEDJVqC3FRVsEh
ZbkM+FkPvwGlhzdaRYzRQ2RU3ZuVAAAAsGhjh0SV2PY6F/su5OGvpI/ou/pzJY4VrESL/X
g+7JBeOK4kWBo+SQnhzN+O8DK2DTpI+3q4xE4WwwR5E0tJlmCoLSpPYsVXi6eHRAQaiynQ
cp1lXDlxEIsZKYmacOwyEF6kUUn4bHPU7zy7rU/z4QGqkPzWfl5ahe2hRx8a300oLAUCch
pQ+Cdu6kUn4Cei/tQH1GwDxHevmRP1qwQ2H/u06T0GYlxc0IkDti9H62sP
-----END OPENSSH PRIVATE KEY-----
EOT