Skip to content

Enable PAT resource to use the admin PAT creation API

Sanad Liaquat requested to merge qa-shl-user-api-to-create-pat into master

What does this MR do?

Addresses first two items on the issue: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/732

  • When an admin personal access token is available, use it to create the personal access tokens for other users via the API.
  • When an admin personal access token is created for the first time, cache it and use it to create the personal access tokens for other users via the API.

This MR also removes ldap_no_tls from multiple tests that were never actually using LDAP because:

  1. LDAP tests are orchestrated (requiring and LDAP provider) and this metadata was missing from these tests.
  2. The tests were using the regular user as the ability to use the LDAP user is currently only available at login via the UI where as some of these tests were performing CLI operations.
  3. The LDAP user is not part of gitlab-qa-sandbox-group by default and some tests were creating resources in the sandbox group which proves that these tests were actually using the regular non-ldap user instead of the LDAP user.

I have created an issue to update these tests and add back the ldap_no_tls metadata: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/819

While working on this MR, a couple of other potential improvement related to how we handle personal access tokens were identified and captured in this issue: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/818

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Edited by Sanad Liaquat

Merge request reports