Skip to content

Draft: Use project level settings for Beyond Identity push check

Jerry Seto requested to merge 454372-graphql-endpoints into master

What does this MR do and why?

  • Integrations can typically be configured by admins at the instance level as well as from the project and group levels by project/group admins.
  • For Beyond Identity we want to restrict configuring the integration to instance admins only but want to be able disable it at the group or project level as well.
  • This change is to add graphql resources to facilitate a UI (#454372 (comment 1878126479)) that will enable admins to add/delete project level settings for Beyond Identity.
    • Adding arguments for group level settings will be in a future MR

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Try some of these queries locally:

mutation integrationExclusionCreate($input: IntegrationExclusionCreateInput!) {
  integrationExclusionCreate(input: $input) {
    exclusions {
      nodes {
        project {
          id
          name
        }
      }
    }
  }
}
# Variables
# {
#   "input": {
#     "projectIds": ["gid://gitlab/Project/1", "gid://gitlab/Project/2"],
#     "integrationName": "BEYOND_IDENTITY"
#   }
# }
# Example response
# {
#   "data": {
#     "integrationExclusionCreate": {
#       "exclusions": {
#         "nodes": [
#           {
#             "project": {
#               "id": "gid://gitlab/Project/2",
#               "name": "Gitlab Shell"
#             }
#           },
#           {
#             "project": {
#               "id": "gid://gitlab/Project/1",
#               "name": "Gitlab Test"
#             }
#           }
#         ]
#       }
#     }
#   }
# }
mutation integrationExclusionDelete($input: IntegrationExclusionDeleteInput!) {
  integrationExclusionDelete(input: $input) {
    exclusion {
      project {
        name
      }
    }
  }
}
# Variables
# {
#   "input": {
#     "projectId": "gid://gitlab/Project/2",
#     "integrationName": "BEYOND_IDENTITY"
#   }
# }
# Example response
# {
#   "data": {
#     "integrationExclusionDelete": {
#       "exclusion": {
#         "project": {
#           "name": "Gitlab Shell"
#         }
#       }
#     }
#   }
# }
query integrationExclusion {
  integrationExclusions(integrationName: BEYOND_IDENTITY) {
    nodes {
      project {
        name
        id
      }
    }
  }
}
# Example response
# {
#   "data": {
#     "integrationExclusions": {
#       "nodes": [
#         {
#           "project": {
#             "name": "Gitlab Test",
#             "id": "gid://gitlab/Project/1"
#           }
#         }
#       ]
#     }
#   }
# }

Related to #454372

Edited by Jerry Seto

Merge request reports