Skip to content

Commit 0fe0995

Browse files
committed
Switch to OIDC Federation Service instead of GitHub App
Currently, the [Gardener GitHub-Actions App](https://github.com/apps/gardener-github-actions) is used to provide more privileged access than available via the default `GITHUB_TOKEN`, for example to circumvent branch protection rules (GitHub Apps can be configured as bypassers) or cross repository privileges. To prevent sharing the GitHub App secret with each and every repository/workflow which requires usage of it, the [GitHub OIDC Federation Service](https://github.com/gardener/github-oidc-federation) has been developed. In essence, it holds the credentials for a central GitHub App and creates short-lived access tokens with a configured scope based on a centrally configured OIDC configuration. See related changes which have been necessary for this repository: - gardener/.github-oidc@b803037 Signed-off-by: Jonas Brand (i538859) <j.brand@sap.com>
1 parent 2f84644 commit 0fe0995

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: gardener/cc-utils/.github/workflows/prepare.yaml@master
1717
with:
1818
mode: ${{ inputs.mode }}
19-
version-commit-callback-action-path:
2019
post-process: callback
2120
permissions:
22-
contents: read
21+
id-token: write
22+
pull-requests: write # required until https://github.com/gardener/cc-utils/pull/1529 is merged
2323

2424
oci-images:
2525
name: Build OCI-Images

.github/workflows/non-release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
mode: snapshot
2020
secrets: inherit
2121
permissions:
22-
contents: write
22+
contents: read
2323
packages: write
2424
id-token: write
2525
pull-requests: write
@@ -29,7 +29,6 @@ jobs:
2929
uses: gardener/cc-utils/.github/workflows/post-build.yaml@master
3030
needs:
3131
- build
32-
secrets: inherit
3332
permissions:
3433
id-token: write
3534
contents: write

.github/workflows/pullrequest-trust-helper.yaml.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
jobs:
1010
pullrequest-trusted-helper:
1111
permissions:
12-
pull-requests: write
13-
secrets: inherit # access to `GitHub-Actions`-App is needed to read teams
12+
id-token: write
1413
uses: gardener/cc-utils/.github/workflows/pullrequest-trust-helper.yaml@master
1514
with:
1615
trusted-teams: 'test-infra-maintainers'

.github/workflows/release.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ on:
1212
jobs:
1313
build:
1414
uses: ./.github/workflows/build.yaml
15+
secrets: inherit
1516
permissions:
16-
contents: write
17+
contents: read
1718
id-token: write
1819
packages: write
1920
pull-requests: write # required to remove labels
@@ -24,13 +25,10 @@ jobs:
2425
uses: gardener/cc-utils/.github/workflows/release.yaml@master
2526
needs:
2627
- build
27-
secrets: inherit
2828
permissions:
2929
contents: write
3030
id-token: write
3131
packages: write
3232
with:
3333
release-commit-target: branch
3434
next-version: ${{ inputs.next-version }}
35-
next-version-callback-action-path:
36-
slack-channel-id:

0 commit comments

Comments
 (0)