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.jsfile - 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
This is a follow up to - !214302 (merged)
Screenshots or screen recordings
Shows successful deprovision with toast message:
How to set up and validate locally
- Upload a Premium license (or above).
- Set up openbao on your gdk.
- Enable the
group_secrets_managerfeature flag. - Go to your Settings > General > Permissions and group features in your group and toggle the group secrets manager.
- 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:
- Upload a Premium license (or above).
- Set up openbao on your gdk.
- Enable the
secrets_managerfeature flag. - Go to your Settings > General > Visibility, project features, permissions in your project and toggle the project secrets manager.
- 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
