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 #357

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

v1v
Copy link
Member

@v1v v1v commented Sep 17, 2024

What

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 10:13
@v1v v1v self-assigned this Sep 17, 2024
reakaleek
reakaleek previously approved these changes Sep 17, 2024
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/updateVersionBranch.yml Outdated Show resolved Hide resolved
@v1v v1v merged commit d11ac0d into elastic:main Sep 24, 2024
7 checks passed
@v1v v1v deleted the feature/release-automation-1 branch September 24, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants