[Rails] List OpenBao policies in a single query
### Why we are doing this Migrate the policies endpoint in the Secrets Manager client to use the new list endpoint that comes with OpenBao v2.5.0. This is expected to solve the timeout error that occurs when listing `Secrets Manager user permissions`. The timeout bug itself is captured by https://gitlab.com/gitlab-org/gitlab/-/work_items/562240. ### Further details We're currently experiencing an N+1 query issue when listing permissions in Secrets Manager (see issue [#562240](https://gitlab.com/gitlab-org/gitlab/-/issues/562240)). The root cause is that OpenBao lacked an endpoint to retrieve all policies with their metadata in a single request. As a workaround, GitLab fetches all policies and then loops through each one to retrieve metadata individually, resulting in the N+1 query problem. See https://gitlab.com/gitlab-org/gitlab/-/blob/056bad05e1daa3d3216b2769767cce486c6d81f8/ee/lib/secrets_management/secrets_manager_client.rb#L121 The real fix is to leverage the new list endpoint that returns policies with metadata in a single request. This was introduced in Pull Request [#1965](https://github.com/openbao/openbao/pull/1965), and is expected to ship with OpenBao v2.5.0 – as of Jan 27, 2026 this hasn't been released yet. ### Implementation plan - [ ] Update to OpenBao v2.5.0. This is covered by https://gitlab.com/gitlab-org/gitlab/-/work_items/587761. - [ ] Modify the `list_policies` method in `secrets_manager_client.rb` to use the new endpoint. - [ ] Remove the N+1 query pattern.
issue