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

ci: use GitHub app for ephemeral tokens #1541

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

v1v
Copy link
Member

@v1v v1v commented Sep 17, 2024

What does this PR do?

Use the GitHub app to generate the required ephemeral tokens with the least permissive principle.

Why

  • Finer-grained tokens with Service Machine accounts are required to rotate the secrets manually.
  • GitHub app to generate temporary tokens is the advanced approach to avoid the above
  • Document what the GH workflow requires to run in terms of access
  • GitHub Token with Permissions does not trigger GitHub builds

Implementation details

Use tibdex/github-app-token with the required permissions and the repository scope
Remove the permissions configuration in the GH workflow.
Configure git checkout with the ephemeral token
Configure the GH_TOKEN with the ephemeral token

@v1v v1v requested review from a team September 17, 2024 11:17
@v1v v1v self-assigned this Sep 17, 2024
reakaleek
reakaleek previously approved these changes Sep 17, 2024
@v1v v1v dismissed stale reviews from vigneshshanmugam and reakaleek via 824b2b9 September 18, 2024 19:03
@v1v v1v requested a review from reakaleek September 18, 2024 19:15
@v1v v1v merged commit 155dc9d into elastic:main Sep 19, 2024
17 checks passed
@v1v v1v deleted the feature/release-automation-1 branch September 19, 2024 09:57
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.

4 participants