•  
      request #38259 ID confusion in query for bulk check of Artifact permissions
    Infos
    #38259
    Joris MASSON (jmasson)
    2024-05-24 11:43
    2024-05-23 17:31
    39872
    Details
    ID confusion in query for bulk check of Artifact permissions

    When the feature flag feature_flag_new_tracker_permissions_check is set to 1
    and an artifact A1 exists in a tracker T and the current user does NOT have access to the tracker T (and therefore should NOT have access to artifact A1)
    and anything else has the same numeric ID as tracker T and a permission is set on said thing that allows the current user to see it (for example, another artifact A2 has the same numeric ID as tracker T and has permissions on artifact that includes the current user)
    Then the DB query that retrieves artifacts will return artifact A1 when it should not. The REST API is using this query, but it double-checks the tracker permissions, and does not return artifact A1 in this situation. Confidentiality is safeguarded.

    It requires a permission to be defined on an object with the same numeric ID AND said permission must be on a user group including the current user (for example on Project Members).

    The quickest way to reproduce is to run the DB integration tests on current master:

    make tests-db SEED=1716305341
    

    The first test should fail with an additional unexpected artifact ID found.

    Trackers
    15.8
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2024-05-24
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2024-05-24 10:43
    • Summary
      -Bulk check of Artifact permissions can give unwanted access to artifacts 
      +ID confusion in query for bulk check of Artifact permissions 
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes