cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8596) [LDAP] Nested groups, ability of recursively querying nested groups
Date Thu, 23 Jul 2015 06:13:05 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638232#comment-14638232
] 

ASF GitHub Bot commented on CLOUDSTACK-8596:
--------------------------------------------

Github user koushik-das commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/609#discussion_r35292477
  
    --- Diff: plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/ADLdapUserManagerImpl.java
---
    @@ -0,0 +1,81 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.cloudstack.ldap;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +import javax.naming.NamingEnumeration;
    +import javax.naming.NamingException;
    +import javax.naming.directory.SearchControls;
    +import javax.naming.directory.SearchResult;
    +import javax.naming.ldap.LdapContext;
    +
    +import org.apache.commons.lang.StringUtils;
    +import org.apache.log4j.Logger;
    +
    +public class ADLdapUserManagerImpl extends OpenLdapUserManagerImpl implements LdapUserManager
{
    +    public static final Logger s_logger = Logger.getLogger(ADLdapUserManagerImpl.class.getName());
    +
    +    @Override
    +    public List<LdapUser> getUsersInGroup(String groupName, LdapContext context)
throws NamingException {
    +        final SearchControls searchControls = new SearchControls();
    +        searchControls.setSearchScope(_ldapConfiguration.getScope());
    +        searchControls.setReturningAttributes(_ldapConfiguration.getReturnAttributes());
    +
    +        String basedn = _ldapConfiguration.getBaseDn();
    +        if (StringUtils.isBlank(basedn)) {
    +            throw new IllegalArgumentException("ldap basedn is not configured");
    +        }
    +
    +        if (StringUtils.isBlank(groupName)) {
    --- End diff --
    
    This should be at the beginning.


> [LDAP] Nested groups, ability of recursively querying nested groups
> -------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8596
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8596
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Rajani Karuturi
>            Assignee: Rajani Karuturi
>
> Nested group imports



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message