Allow Update secrets permission without Create

What does this MR do and why?

Lets Owners grant the Update secrets permission without also granting Create, and shows Delete last in the permissions modal.

Stacked on !260976 (merged), which adds the UPDATE action to the backend. This MR is frontend, docs, and specs only. It replaces !269737 (closed), which carried a duplicate of the backend change.

Details
  • The Update checkbox is enabled whenever Read metadata is checked. The watcher that cleared Update when Create was unchecked is removed.
  • The Delete checkbox moves below Create and Update.
  • Docs: Secrets Manager user doc, permissions tables in doc/user/permissions.md, and the services.md and openbao_client.md developer docs.
  • Specs: modal Jest spec, and project and group UpdateService specs (an update-only grant can update an existing secret). The check that an update-only grant cannot create a secret is covered by the request specs in !260976 (merged).
  • The permissions table label and the backend specs for UPDATE come from !260976 (merged).

References

How to set up and validate locally

  1. Enable Secrets Manager for a group - additionally you can also provision in a project to test there as well.
  2. Go to:
    1. For group secrets: Settings > Secure > GitLab Secrets Manager and select Add under User permissions.
    2. For project secrets: Settings > General > Visibility, project features, permissions > GitLab Secrets Manager and select Add under User permissions.
  3. Select a Reporter user and check Read metadata. Update is enabled without Create, and Delete is the last scope.
  4. Check only Update and save. The table shows "Read metadata, Update".
  5. Check Create and Update together and save. The table shows "Create, Update"
  6. As the update-only user, update an existing secret (this succeeds), then try to create a new secret (this is denied).

Screenshots and videos

Before After

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Sayo Bittencourt

Merge request reports

Loading
Loading