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

Add support for ssh_private_key #257

Merged
merged 5 commits into from
Aug 26, 2022
Merged

Add support for ssh_private_key #257

merged 5 commits into from
Aug 26, 2022

Conversation

louisruch
Copy link
Contributor

  • 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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@louisruch louisruch Aug 26, 2022

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

@louisruch louisruch merged commit 7f600f1 into main Aug 26, 2022
@louisruch louisruch deleted the louis-ssh branch August 26, 2022 17:30
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.

2 participants