Add ability to disable group secret manager & small refactor

What does this MR do and why?

This MR adds the ability to disable the group secret manager, and refactors the secrets manager settings component to use a context-driven configuration approach, eliminating the need for if/else context (project vs group) checking logic throughout the component.

What it does:

  • Centralizes all context-specific data (GraphQL queries, mutations, result paths) in a single context_config.js file
  • Replaces child component defined provide/inject with explicit props for clearer data flow

Why:

  • Scalability: Adding a new context (e.g., instance-level secrets manager) now only requires updating the config and adding translated messages, so no new components or extensive modification needed
  • Maintainability: Removes conditional logic by using context as a lookup key, making the code more declarative
  • Clarity: Explicit props and centralized config make dependencies and data flow obvious to future developers

References

#577453

This is a follow up to - !214302 (merged)

Screenshots or screen recordings

Shows successful deprovision with toast message:

image

How to set up and validate locally

  1. Upload a Premium license (or above).
  2. Set up openbao on your gdk.
  3. Enable the group_secrets_manager feature flag.
  4. Go to your Settings > General > Permissions and group features in your group and toggle the group secrets manager.
  5. Once the secret manager is enabled, click the toggle again to disable it.

Also may be worth confirming project secrets manager continues to work to check for any regression from the small refactoring:

  1. Upload a Premium license (or above).
  2. Set up openbao on your gdk.
  3. Enable the secrets_manager feature flag.
  4. Go to your Settings > General > Visibility, project features, permissions in your project and toggle the project secrets manager.
  5. Once the secret manager is enabled, click the toggle again to disable it.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #577453

Edited by Ahmad Hussein

Merge request reports

Loading