goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.29k stars 4.77k forks source link

API created Robot accounts not appearing in UI #20217

Closed Aransh closed 8 months ago

Aransh commented 8 months ago

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior: I am creating "robot accounts" using the (official) Harbor Terraform provider. Problem is - I cannot see/manage these robot accounts on Harbor UI... Currently I have 11 robot accounts, but Harbor UI says none (while logged in as admin) image

If I manually create one via UI, I can see it there, so seems this issue is only relevant to API (terraform) created ones.

Steps to reproduce the problem: Create a robot account using terraform, as follows:

resource "harbor_robot_account" "harbor_credentials_docker" {

  name        = var.name
  level       = "project"
  description = "Docker credentials for k8s cluster ${var.name}"

  permissions {
    access {
      action   = "pull"
      resource = "repository"
    }
    kind      = "project"
    namespace = var.registry
  }
}

The account is created, and is active, but does not appear in UI...

Versions: Please specify the versions of following systems.

manhtukhang commented 8 months ago

@Aransh The page you viewed is for system-level Robot accounts (each robot could access many projects and/or system resources). In the Terraform resource definition, you created a project-level Robot account (level=project), which means you have to view it in the project (Projects -> click the project name that you created that robot -> click Robot Accounts tab): screenshot-2024-04-03-171345

Hope this can help!

Aransh commented 8 months ago

Ahhhhh, I see, I didn't understand these are managed as separate entities. Thank you!