Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-9712

[Pre-merge]:Quay "global readonly super user" and "super user" should not have access to normal user's organizations and image repos when FEATURE_SUPERUSERS_FULL_ACCESS is set to false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • None
    • quay-v3.16.0
    • quay
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False

      Description:

      This is an issue found in Quay Global readonly super user, when disable the super user full access. found "global readonly super user" still have access to other normal user's resources, like organization, image repo, etc. Actually when set FEATURE_SUPERUSERS_FULL_ACCESS to false, "global readonly super user" should lose cross-namespace access.

      Note: The same issue is also existed for regular super user.

      Quay Opening PR: https://github.com/quay/quay/pull/4455 

      Quay Config.yaml:

      FEATURE_SUPER_USERS: true
      FEATURE_SUPERUSERS_FULL_ACCESS: false 

      Steps:

      1. Create new normal user tom001 with new org, repo and tags
      2. Use the Oauth2 token of regular super user to access the above normal user's resources(e.g "http://localhost:8080/api/v1/repository/tom001org/tom001repo1"), the expected behavior is getting 403 error code
      3. Use the Oauth2 token of global readonly super user to access the above normal user's resources(e.g "http://localhost:8080/api/v1/repository/tom001org/tom001repo1"),the expected behavior is getting 403 error code

      In the following example, use the Ouath2 token of global readonly super user "readonly" to access normal user tom001's image repo.

      curl --location 'http://localhost:8080/api/v1/repository/tom001/demo' \
      --header 'Authorization: Bearer ***' \
      {
        "namespace": "tom001",
        "name": "demo",
        "kind": "image",
        "description": "",
        "is_public": true,
        "is_organization": false,
        "is_starred": false,
        "status_token": "",
        "trust_enabled": false,
        "tag_expiration_s": 1209600,
        "is_free_account": true,
        "state": "NORMAL",
        "tags": {},
        "can_write": false,
        "can_admin": false
      } 

              doconnor@redhat.com Dave O'Connor
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: