Rename secret `key` field to `name`
What does this MR do and why?
Minor refactoring work for #470395 (closed).
The frontend was initially developed before the backend, and uses mocked data for the secrets table and the details page for the Secrets Manager. With #470384 (closed) being done, some of the initial assumptions about the data need to be corrected for consistency.
This MR simply renames all calls to secret.key with secret.name and removes secret.key entirely.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No UI changes.
How to set up and validate locally
Pipelines should pass
If you want to validate the UI:
Setting up openbao
Note: We are currently working on an easier way to setup and run openbao with gdk, but for now, we will have to run these commands manually.
- Install openbao.
brew install openbao - Add the
openbaoconfig toconfig/gitlab.yml:production: &base openbao: proxy_address: http://127.0.0.1:8100 - Create a
raft/datadirectory then follow the instructions in #470143 (comment 1984247205).- Make sure to create the
roleidandsecretidfiles before running the proxy.
- Make sure to create the
Validating the UI
- Enable the feature flags
ci_tanukey_uiandsecrets_manager. - Go to Settings > General > Visibility
- Scroll down to Secrets Manager and enable the toggle.
- Go to Settings > CI/CD > Secrets and click on a secret. Table and Secret Details should still look okay. Note that we are using mocked data and the create/update/delete actions are still a WIP and aren't be fully functional yet.