Skip to content

Commit f5688cc

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@c2da0ca Signed-off-by: Jonas Brand (i538859) <j.brand@sap.com>
1 parent 2e935b5 commit f5688cc

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/build.yaml

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

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

.github/workflows/non-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
mode: snapshot
2323
secrets: inherit
2424
permissions:
25-
contents: write
25+
contents: read
2626
packages: write
2727
id-token: write
28+
pull-requests: write
2829

2930
component-descriptor:
3031
if: ${{ github.event_name != 'pull_request_target' || (github.event_name == 'pull_request_target' && github.event.label.name == vars.DEFAULT_LABEL_OK_TO_TEST && vars.DEFAULT_LABEL_OK_TO_TEST != '') }}
3132
uses: gardener/cc-utils/.github/workflows/post-build.yaml@master
3233
needs:
3334
- build
34-
secrets: inherit
3535
permissions:
3636
id-token: write
3737
contents: write

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

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: 'mcm-maintainers,gardener-extension-provider-openstack-maintainers'

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ 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
20+
pull-requests: write
1921
with:
2022
mode: release
2123

.github/workflows/upgrade-dependencies.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
jobs:
88
upgrade-pullrequests:
99
uses: gardener/cc-utils/.github/workflows/upgrade-dependencies.yaml@master
10-
secrets: inherit
1110
permissions:
12-
contents: write
11+
contents: read
1312
id-token: write

0 commit comments

Comments
 (0)