armory / dinghy

Pipelines as code for Spinnaker
Apache License 2.0
31 stars 11 forks source link

feat(builder): add feature flag to restrict app updates #160

Open dogonthehorizon opened 2 years ago

dogonthehorizon commented 2 years ago

Summary

Dinghy runs withs service account permissions that cannot be changed at runtime. This can create situations where permissions for a given app restrict actions in the UI that can be changed by Dinghy.

For this reason, we're introducing a new feature flag that, when enabled, will restrict application and pipeline updates to the repository that created the app/pipeline combo first. This prevents the scenario where Team A defines a pipeline for their application, and Team B copy/pastes their pipeline definition into a separate repository. If not careful, this could clobber Team A's work and cause confusion/friction in the deployment process.

This feature flag is currently only implemented for GitHub providers.

Still TODO before we can merge this PR:

andrewbackes commented 2 years ago

After talking to Jason a bit about it, pipeline 'runAs' and 'Permissions' will probably also need to be ignored after all. Otherwise, any user with access to the dinghy repo can set any permission level (service account) for the pipeline.