turbot / steampipe-plugin-github

Use SQL to instantly query repositories, users, gists and more from GitHub. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/github
Apache License 2.0
72 stars 28 forks source link

Added support for plugin authentication using Github OAuth App. #431

Closed HikaruEgashira closed 4 months ago

HikaruEgashira commented 4 months ago

Is your feature request related to a problem? Please describe. Yes, I am currently using the gh cli for GitHub authentication, but it is difficult to authenticate because the Steampipe GitHub plugin does not support OAuth tokens (gho_xxx). https://steampipe.io/changelog/turbot-github-plugin-v0-40-0

Describe the solution you'd like I would like the GitHub plugin to support tokens (gho_xxx) generated by OAuth Apps. Specifically, this can be addressed by updating the token validation logic. https://github.com/turbot/steampipe-plugin-github/blob/main/github/utils.go#L76-L80

Describe alternatives you've considered I can use other auth methods. (GitHub App or PAT)

Additional context Authentication via OAuth has been made possible as seen here, but it is currently unusable due to the existing token validation. The relevant code can be found here. The issue can be resolved with just an update to the validation, and I am willing to participate in the implementation.

image
ParthaI commented 4 months ago

Hi @HikaruEgashira,

We have raised a PR by addressing this issue. We have added support for an OAuth access token for GitHub authentication.

It would be great if you would like to give it a try in the PR branch(issue-431) and share your feedback.

Testing Steps in the PR Branch(issue-431):

If you are running into any further issues, please feel free to let us know.

Thanks!

HikaruEgashira commented 4 months ago

Thanks! Commented your PR.