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

Support the use of a personal GitHub access token #100

Open
mdb opened this issue Nov 14, 2019 · 2 comments
Open

Support the use of a personal GitHub access token #100

mdb opened this issue Nov 14, 2019 · 2 comments

Comments

@mdb
Copy link

mdb commented Nov 14, 2019

Thanks for your hard work on terraform-resource!

In current implementation, terraform-resource supports the use of a private_keyas "An SSH key used to fetch modules."

However, in many scenarios, a personal access token is arguably preferable, as it is the GitHub-recommended way to clone and does not require strict host key checking to be disabled.

Is it an option to consider supporting fetching modules with personal access tokens?

Thanks!

@ljfranklin
Copy link
Owner

@mdb thanks for bringing this up. Not verifying the host keys does open up a potential man-in-the-middle vulnerability. I'd be happy to accept a PR that allows the resource to use access tokens to authenticate against HTTPS endpoints. Alternatively, the resource could accept a list of trusted SSH host keys. Looks like Github publishes their SSH host keys. That said I think I agree with you that access tokens seem a bit more robust.

@mdb
Copy link
Author

mdb commented Nov 15, 2019

@ljfranklin Thanks for the response! Your suggestion that the resource could accept a list of trusted SSH host keys is an interesting thought. However, I don't believe that solution addresses my concern in scenarios where modules are fetched from non-github.aaakk.us.kg sources where trusted host keys are less easy to obtain, such as a GitHub enterprise instance or a non-GitHub git server.

I can try and carve out some time to create a pull request but if you or any other users are inspired to take a stab, please don't feel compelled to wait for my pull request.

Thanks again!

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

No branches or pull requests

2 participants