Users and teams autodiscovery
The Red Hat Developer Hub catalog can be set up to ingest organizational data — users and groups — directly from GitLab. The result is a hierarchy of User and Group entities that mirrors your org setup.
Once we have integrated GitLab with Red Hat Developer Hub, we need to enable the autodiscovery
capabilities of users and groups. That requires to enable the backstage-plugin-catalog-backend-module-gitlab-org-dynamic
dynamic plugin provided by Red Hat Developer Hub.
Run:
oc apply -f ./content/modules/ROOT/examples/exercises/dynamic-plugins-4.yaml -n rhdh-gitlab
Add this to the ConfigMap:
catalog:
providers:
gitlab:
myGitLab:
host: gitlab.${BASEDOMAIN}
# ... previous GitLab configuration
orgEnabled: true
#group: org/teams # Required for gitlab.com when `orgEnabled: true`. Optional for self managed. Must not end with slash. Accepts only groups under the provided path (which will be stripped)
allowInherited: true # Allow groups to be ingested even if there are no direct members.
groupPattern: '[\s\S]*'
restrictUsersToGroup: false
Disable the dangerouslyAllowSignInWithoutUserInCatalog property to load only valid users.
Or run:
oc apply -f ./content/modules/ROOT/examples/exercises/rhdh-app-configmap-4.yaml -n rhdh-gitlab
Verify that users and teams are discovered.
| A similar message is registered in the Red Hat Developer Hub pod to confirm the number of users and groups scanned: |
{"class":"GitlabOrgDiscoveryEntityProvider","level":"\u001b[32minfo\u001b[39m","message":"Scanned 3 users and processed 3 users","plugin":"catalog","service":"backstage","span_id":"2dcb52e328c672ad","target":"GitlabOrgDiscoveryEntityProvider:myGitLab","taskId":"GitlabOrgDiscoveryEntityProvider:myGitLab:refresh","taskInstanceId":"03798434-b9e9-45f0-8be6-330f0229e07a","timestamp":"2025-03-05 10:08:57","trace_flags":"01","trace_id":"f6b7b7e7a96250eeca0e1f2b355c00ac"}
{"class":"GitlabOrgDiscoveryEntityProvider","level":"\u001b[32minfo\u001b[39m","message":"Scanned 2 groups and processed 2 groups","plugin":"catalog","service":"backstage","span_id":"2dcb52e328c672ad","target":"GitlabOrgDiscoveryEntityProvider:myGitLab","taskId":"GitlabOrgDiscoveryEntityProvider:myGitLab:refresh","taskInstanceId":"03798434-b9e9-45f0-8be6-330f0229e07a","timestamp":"2025-03-05 10:08:57","trace_flags":"01","trace_id":"f6b7b7e7a96250eeca0e1f2b355c00ac"}
Catalog shows User and Group entities matching GitLab users (user1, user2) and groups (team-a, team-b).