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

Lighthouse does not support Github apps natively #1609

Open
yters opened this issue May 20, 2024 · 0 comments
Open

Lighthouse does not support Github apps natively #1609

yters opened this issue May 20, 2024 · 0 comments

Comments

@yters
Copy link

yters commented May 20, 2024

TL; DR I am trying to use a Github app to run Lighthouse since my org does not allow a bot user. However, to the best of my determination, Lighthouse does not support Github apps natively. Is this correct? Lighthouse does not support Github apps natively?

The difficulty I am encountering is that the Github App must use an installation token, since we want the app to run on its own, and not on behalf of a user, and these tokens must be renewed every hour.

I see an option to enable Github App in the Helm chart. Thinking this meant native support, so I would not need to setup a token renewal system, I attempted to enable and set the username. However, there is no means in the chart to supply the Github App private key, which is necessary to generate the installation token.

Looking through the source code, I see the FindToken method scans the GITHUB_APP_SECRET_PATH directory for a file to use as the Authorization token. However, this will not work with the app secret key, and so won't generate the necessary installation token.

I also see that even before attempting to use the GITHUB_APP_SECRET_PATH the webhooks code tries to authenticate the SCMClient, and passes an empty string as the owner. This forces the function to use the oauth token instead of the contents of GITHUB_APP_SECRET_PATH, which means webhooks expects a user or installation token along with the Github app.

So, long story short, from my experiments and looking through the source code, it does not appear that Lighthouse natively supports the Github app, i.e. taking care of installation token generation and refresh automatically. Am I correct in my conclusion?

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

1 participant