Skip to content

Commit 19eed8b

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@6bedc95 Signed-off-by: Jonas Brand (i538859) <j.brand@sap.com>
1 parent 7542495 commit 19eed8b

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

.github/workflows/oci-images.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ jobs:
1414
prepare:
1515
uses: gardener/cc-utils/.github/workflows/prepare.yaml@master
1616
permissions:
17-
contents: read
18-
packages: write
1917
id-token: write
20-
pull-requests: write
2118
with:
2219
mode: ${{ inputs.mode }}
2320

@@ -28,7 +25,6 @@ jobs:
2825
contents: read
2926
packages: write
3027
id-token: write
31-
pull-requests: write
3228
uses: gardener/cc-utils/.github/workflows/oci-ocm.yaml@master
3329
secrets: inherit
3430
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313

1414
publish-oci:
1515
uses: ./.github/workflows/oci-images.yaml
16+
secrets: inherit
1617
permissions:
1718
contents: read
1819
packages: write
1920
id-token: write
20-
pull-requests: write
2121
needs:
2222
- test
2323
with:
@@ -29,11 +29,8 @@ jobs:
2929
contents: write
3030
packages: write
3131
id-token: write
32-
pull-requests: write
3332
needs:
3433
- publish-oci
35-
secrets:
36-
github-app-secret-key: ${{ secrets.GARDENER_GITHUB_ACTIONS_PRIVATE_KEY }}
3734
with:
3835
release-commit-target: branch
3936
next-version: bump-patch

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040
publish-oci:
4141
if: github.event_name == 'push' && github.repository == 'gardener/inventory'
4242
uses: ./.github/workflows/oci-images.yaml
43+
secrets: inherit
4344
permissions:
4445
contents: read
4546
packages: write
4647
id-token: write
47-
pull-requests: write
4848
needs:
4949
- test
5050
with:

0 commit comments

Comments
 (0)