Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with LDAP Group DN Validation in User Group Creation #157

Open
mahbub570 opened this issue Aug 6, 2024 · 0 comments
Open

Issue with LDAP Group DN Validation in User Group Creation #157

mahbub570 opened this issue Aug 6, 2024 · 0 comments

Comments

@mahbub570
Copy link

mahbub570 commented Aug 6, 2024

Working on issue usergroup #94

When creating a user group of type LDAP (group type 1) it always give me error. I can successfully create group type 2 for HTTP, 3 for OIDC.

bad request: {
  "errors": [
    {
      "code": "BAD_REQUEST",
      "message": "LDAP Group DN is not found: DN:cn:admin,ou=users,dc=example,dc=com"
    }
  ]
}

I tried :

func CreateUserGroup(groupName string, groupType int64, ldapGroupDn string) error {
    ctx, client, err := utils.ContextWithClient()
    if err != nil {
        return fmt.Errorf("failed to create client: %v", err)
    }

    userGroup := &models.UserGroup{
        GroupName: groupName,
        GroupType: groupType,
    }

    if groupType == 1 {
        userGroup.LdapGroupDn = ldapGroupDn
    }

    _, err = client.Usergroup.CreateUserGroup(ctx, &usergroup.CreateUserGroupParams{
        Usergroup: userGroup,
    })

how can i solve this issue ? @Vad1mo , @OrlinVasilev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant