ministryofjustice / cloud-platform

Documentation on the MoJ cloud platform
MIT License
84 stars 44 forks source link

Cloud Platform Concourse GH App: Token permissions #5748

Open sj-williams opened 3 weeks ago

sj-williams commented 3 weeks ago

Background

We had an issue 20/06/24 with the github_actions_secrets_token, in which the token no longer worked and any environments apply runs that invoked GitHub resources would fail on 403 resource not accessible by integration errors.

The token is created and managed within our GitHub App : Cloud Platform Concourse, which does define permissions for the token; however it is apparent that the permissions are inherited from the user who ran the token generating script. The original token was created by Poornima (who had organisation owner level permissions), thus had the ability to read/write vars and secrets in org repos. When her GH user was offboarded, the token & its permissions became invalid.

We resolved this by having the other CP team member with org owner permissions re-generate another new token.

We need to either:

jaskaransarkaria commented 2 weeks ago

note: the app also needs a permissions update to allow the labels to be added to newly created issues