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

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

Github user karuturi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/609#discussion_r35291761
  
    --- 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");
    --- End diff --
    
    basedn comes from global config. Currently, there is no way to ensure that 
this configuration is not null when ldap is enabled. This will be handled once 
I move all the ldap configurations to the ldap_configuration table and not the 
global configuration table.


> [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)

Reply via email to