-
Currently, my team uses GitOps to deploy all GitHub branches with the name pattern Furthermore, since GitHub actions runs on the current branch & development branches (i.e. not I considered the following solutions, but all of them either can't be implemented or are unsatisfactory:
Hence, I just wanted to ask if anyone has an elegant way of addressing this security issue? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Hello @ML72, First, I want to acknowledge that this is indeed an issue. Before giving you some paths for an elegant way to solve this, I would like to discuss the "security" aspect of it. To you, how is being able to create several environments present a security issue? My understanding is that you want to prevent some developers to be able to change infrastructure on env-prod branches ? Proposal The way we currently manage environments in NubesGen (
steps:
- name: Apply Terraform configuration prod
if: $GITHUB_REF == "refs/heads/env-prod
id: infrastructure-deployment
uses: microsoft/nubesgen-actions/[email protected]
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS_PROD }}
tf_storage_account: ${{ secrets.TF_STORAGE_ACCOUNT_PROD }} Let me know what you think. Happy to continue the discussion to find a workaround that works now, and to inform our future updates :). |
Beta Was this translation helpful? Give feedback.
-
Oh that's exactly what I'm starting to do on the main NubesGen branch, look at this commit from a few hours ago: 😀This indeed seems to be the best solution, but it needs more documentation. |
Beta Was this translation helpful? Give feedback.
-
Oh yes! I have now a first solution but it can definitely be improved. |
Beta Was this translation helpful? Give feedback.
Hello @ML72,
Thank you for your message, and for using NubesGen :).
First, I want to acknowledge that this is indeed an issue. Before giving you some paths for an elegant way to solve this, I would like to discuss the "security" aspect of it. To you, how is being able to create several environments present a security issue? My understanding is that you want to prevent some developers to be able to change infrastructure on env-prod branches ?
Proposal
The way we currently manage environments in NubesGen (
env-*
naming convention) is basic and does not cover such scenarios. We have this in our roadmap, yet in the meantime, here are some ways to address that need:CODEOWNERS: With GitHub, y…