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

Create Centralized GitHub Action for Managing Secrets #7109

Closed
4 tasks done
sukeshreddyg opened this issue May 28, 2024 · 7 comments
Closed
4 tasks done

Create Centralized GitHub Action for Managing Secrets #7109

sukeshreddyg opened this issue May 28, 2024 · 7 comments
Assignees
Labels
code quality enhancement New feature or request github_actions Pull requests that update Github_actions code

Comments

@sukeshreddyg
Copy link
Contributor

sukeshreddyg commented May 28, 2024

User Story

As a Modernisation Platform Engineer
I want to create a centralized GitHub Action in the github-actions repository to manage secrets
So that any updates or changes can be made in one place and easily utilized across multiple repositories.

Value / Purpose

  • Reduce the redundancy of defining secrets management workflows in each repository.
  • Simplify the process of updating the secrets management logic by centralizing it, thus ensuring all repositories use the latest version.
  • Ensure that all repositories have a consistent and secure method of handling secrets.

Useful Contacts

No response

Additional Information

  • Existing reusable workflow in the MP repo fetches secrets, encrypts them, declares them as outputs, and an action decrypts these secrets.

Reusable Workflow: https://github.com/ministryofjustice/modernisation-platform/blob/main/.github/workflows/secrets-retrieval.yml

Action to decrypt the secrets: https://github.com/ministryofjustice/modernisation-platform/blob/main/.github/actions/decrypt-secrets/action.yml

Proposal / Unknowns

  • Develop a new GitHub Action in the github-actions repository to manage secrets.
  • Deprecate the existing reusable workflow and action in the MP repo.
  • Update all repositories currently using the MP repo workflow to use the new centralized GitHub Action.

Definition of Done

  • The new GitHub Action is created in the github-actions repository. and tested with the scheduled-baseline workflow
  • Modify reusable workflow to use the new centralized action, ensuring that secrets are fetched from AWS Secrets Manager and managed in one place.
  • Validate that the new centralized action works as expected in modified workflows, including successful fetching, encrypting, declaring, and decrypting of secrets.
  • Raise a follow-up ticket to implement the new action on other workflows and across other repositories.
@SimonPPledger
Copy link
Contributor

SimonPPledger commented Jun 6, 2024

this ticket is dependent on (#7108)

Copy link
Contributor

github-actions bot commented Oct 3, 2024

This issue is stale because it has been open 90 days with no activity.

@sukeshreddyg
Copy link
Contributor Author

As we agreed, we applied this feature to a couple of our workflows. We will monitor the modified workflows and gather feedback from the team. If everything is fine, we will implement it in all other workflows across all repositories and delete the GitHub secrets. Once that's done, we will document this feature.

@sukeshreddyg
Copy link
Contributor Author

A follow-up ticket has been raised to implement the centralized secrets management action in other repositories managed by MP and update the remaining workflows in the MP repository.

@dms1981 dms1981 moved this from For Review to Done in Modernisation Platform Jan 22, 2025
@dms1981 dms1981 closed this as completed by moving to Done in Modernisation Platform Jan 22, 2025
@dms1981 dms1981 moved this from Done to For Review in Modernisation Platform Jan 22, 2025
@ASTRobinson
Copy link
Contributor

Hey @sukeshreddyg could you tick off the completed tasks in the Definition of Done for example, has the documentation been done? thanks.

@mikereiddigital
Copy link
Contributor

Leaving the review until the DoD is confirmed as completed.

@ASTRobinson
Copy link
Contributor

ASTRobinson commented Jan 28, 2025

The ticket has been reviewed according to the updated DoD, tasks have been completed and a follow-up ticket was raised to capture the rollout of the centralized GitHub action for managing secrets. moving to done.

@ASTRobinson ASTRobinson moved this from For Review to Done in Modernisation Platform Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality enhancement New feature or request github_actions Pull requests that update Github_actions code
Projects
Status: Done
Development

No branches or pull requests

6 participants