Create "Protected" Feature Flag strategies

Problem to solve

As a manager of production, I don't want developers to turn on/off feature flags in production. However, as a developer, I want to be able to turn on/off my feature during development (not on production)

Intended users

User experience goal

The user should be able to safeguard the feature flag enablement or disablement from specific high-risk environments such as production.

Proposal

  • Only users who have permissions to protected environments can add protected environments to their feature flag.
  • A strategy will be considered protected if it includes a protected environment.
  • If a protected environment is included in a strategy, there will be an indication on the strategy that this is a protected strategy
  • If a user who does not have permission to deploy to a protected environment attempts to add this environment, they will get a warning that they are not permitted to do so (similar to the MR widget when merging an MR to production).
    • Copy: You don’t have permission to add this environment scope. Ask someone with deployment permissions to add this environment to the flag

image

image

For the MVC:

  • Protected strategies are derived from the inclusion of a protected environment
  • Only user mentioned as allowed to deploy in the environment shall be allowed to toggle on/off this flag
  • Only user mentioned as allowed to deploy in the environment shall be allowed to edit this flag
  • Only user mentioned as allowed to deploy can add this environment

Possible workarounds:

  • Unprotect the environment (not recommended)
  • Duplicate the feature flag and create separate flags per environment

We will only start enforcing this behavior on new flags. Old flags that were created before this logic was added do not need to change.

In the next iteration, if there is a protected strategy in a feature flag - the entire flag will be considered protected and there will be a dedicated indication in the feature flag list
image

Further details

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Dimitrie Hoekstra