You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "yuangeqingian (via GitHub)" <gi...@apache.org> on 2024/04/12 19:34:45 UTC

[I] CloudStask Add Ldap Account Empty List [cloudstack]

yuangeqingian opened a new issue, #8910:
URL: https://github.com/apache/cloudstack/issues/8910

   CloudStack Version: 4.19.0.1
   OS Version:  Ubuntu 22
    Ldap Search can work with stable output for query:
   ![image](https://github.com/apache/cloudstack/assets/9658083/4d289b34-e618-44cd-8ebd-b8628ad0c293)
   
   Global ldap setting in ACS UI:
   ![image](https://github.com/apache/cloudstack/assets/9658083/5c40ad1d-d137-4eae-82c3-1edeb9b23445)
   ![image](https://github.com/apache/cloudstack/assets/9658083/43af4936-f586-452d-9fc1-8b79806e336c)
   ![image](https://github.com/apache/cloudstack/assets/9658083/d63829a4-c2f5-4742-8660-3374c2079820)
   
   
   My Ldap Configuration:
   ![image](https://github.com/apache/cloudstack/assets/9658083/73313d7b-ec9f-40b7-a0c9-35734e350d5c)
   
   While I add account, the user list showed empty:
   ![image](https://github.com/apache/cloudstack/assets/9658083/934bd3dc-750d-4415-bd64-4381cf229b1d)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2058719333

   @yuangeqingian the manual import you are trying is not really suitable for enterprise implementations I think , but it should work. You can try the autosync method as described in the docs.
   
   You can ask question on users@cloudstack.apache.org. these are free style, so just state your problem with as much detail as possible and ask your questions. You can also ask here. In both cases you are relying on volunteers so answers may be late and not applicable to you exactly. This is open source.
   
   There are options for commercial support, when you are ready for that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2058528908

   > well, can you configure Apache Directory Studio, just in case it is a java issue? (https://directory.apache.org/studio/)
   > 
   > I usually don't use microsoftad, so can't help you there. You can try to configure an openldap installation. Or use an online service like jumpcloud.
   
   
   First: thanks for the quick response.
   Second: I'm trying to involve cloudstack to my company, I thought ACS can support enterprise level.
   But now I can't even bind my company AD server, can't pass a POC, it's will be pity if the POC just end like this.
   
   Third: Do you know where else I can ask questions about that? I don't know how to raise question on mailing list.
   
   Thanks a lot in advance!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2055935109

   @yuangeqingian , at first look, the excpetion says that the bind fails. This should mean the login is wrong.
   
   By the looks of you cofiguration you are going for the manual import of accounts option, is that right?
   
   The bind principal uses DC=DIR in capitals and the basedn uses dc=dir in lowercase. Can you check if that makes a difference?
   
   Do you see any other exceptions in your logs or any error on the ldap side?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2056996700

   > Do you have a more extensive stacktrace for this error?
   > 
   > From the given in-/output I see that on the cli you use -D "dir\Bgc_domain_join" while this is not in the bind principal nor in the binddn. Can this be the issue?
   
   No, the ldapsearch works perfectly:
   
   ![image](https://github.com/apache/cloudstack/assets/9658083/a2a33b53-b043-4d20-8c9b-7e2ec97ee043)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2059573804

   > @yuangeqingian the manual import you are trying is not really suitable for enterprise implementations I think , but it should work. You can try the autosync method as described in the docs.
   > 
   > You can ask question on [users@cloudstack.apache.org](mailto:users@cloudstack.apache.org). these are free style, so just state your problem with as much detail as possible and ask your questions. You can also ask here. In both cases you are relying on volunteers so answers may be late and not applicable to you exactly. This is open source.
   > 
   > There are options for commercial support, when you are ready for that.
   
   I did some changes and some other info came out, somehow I successfully bind the ldap to domain using cli below:
   root@kvm62:~# cloudmonkey add ldapconfiguration hostname=dir.slb.com\
                                     port=389\
                                     domainid=b4218ed3-5e69-4d3b-93db-0d440d27ffed
   {
     "LdapAddConfiguration": {
       "domainid": "b4218ed3-5e69-4d3b-93db-0d440d27ffed",
       "hostname": "dir.slb.com",
       "port": 389
     }
   }
   root@kvm62:~# cloudmonkey link domaintoldap domainid=b4218ed3-5e69-4d3b-93db-0d440d27ffed\
                                 accounttype=2\
                                 ldapdomain="ou=acount,dc=dir,dc=slb,dc=com"\
                                 type=OU
   {
     "LinkDomainToLdap": {
       "accounttype": 2,
       "domainid": "b4218ed3-5e69-4d3b-93db-0d440d27ffed",
       "ldapdomain": "ou=acount,dc=dir,dc=slb,dc=com",
       "name": "ou=acount,dc=dir,dc=slb,dc=com",
       "type": "OU"
     }
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2074311835

   > @yuangeqingian have a look at [the doc about ldap](http://docs.cloudstack.apache.org/en/4.19.0.0/adminguide/accounts.html#using-an-ldap-server-for-user-authentication) and there is also this [old upgrade note](http://docs.cloudstack.apache.org/en/4.19.0.0/upgrading/upgrade/upgrade_notes.html#active-directory-authentication-ldap), maybe it is relevant for you as well.
   > 
   > The above seems an autoimport setup. I do not know why that would remove the add ldap account button, but it means that accounts will be added to the linked domain automatically for users defined in ldap.
   
   Let me check again to see if issue was on my side and get back to you again
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStack Add Ldap Account Empty List [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #8910: CloudStack Add Ldap Account Empty List
URL: https://github.com/apache/cloudstack/issues/8910


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2056942043

   Do you have a more extensive stacktrace for this error?
   
   From the given in-/output I see that on the cli you use -D "dir\Bgc_domain_join" while this is not in the bind principal nor in the binddn. Can this be the issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2052419819

   Also, I did some test, trying to bind ldap to a domain, this error comes out:
   Request failed. (530)
   com.cloud.exception.InvalidParameterValueException: Unable to bind to the given LDAP server
   
   I checked logs in ACS management.log, this error comes out:
   
   DEBUG [o.a.c.l.LdapContextFactory] (qtp1789718525-1052:ctx-bf2f48df ctx-f171c9d9) (logid:7d7a3c5c) initializing ldap with provider url: ldap://dir.slb.com:389
   DEBUG [o.a.c.l.LdapManagerImpl] (qtp1789718525-1052:ctx-bf2f48df ctx-f171c9d9) (logid:7d7a3c5c) NamingException while doing an LDAP bind
   javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090449, comment: AcceptSecurityContext error, data 52e, v3839]
           at java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3259)
           at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3205)
           at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2991)
   
   INFO  [c.c.a.ApiServer] (qtp1789718525-1052:ctx-bf2f48df ctx-f171c9d9) (logid:7d7a3c5c) com.cloud.exception.InvalidParameterValueException: Unable to bind to the given LDAP server
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2052413615

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2059635316

   @yuangeqingian have a look at [the doc about ldap](http://docs.cloudstack.apache.org/en/4.19.0.0/adminguide/accounts.html#using-an-ldap-server-for-user-authentication)
   and there is also this [old upgrade note](http://docs.cloudstack.apache.org/en/4.19.0.0/upgrading/upgrade/upgrade_notes.html#active-directory-authentication-ldap), maybe it is relevant for you as well.
   
   The above seems an autoimport setup. I do not know why that would remove the add ldap account button, but it means that accounts will be added to the linked domain automatically for users defined in ldap.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2057006139

   > Do you have a more extensive stacktrace for this error?
   > 
   > From the given in-/output I see that on the cli you use -D "dir\Bgc_domain_join" while this is not in the bind principal nor in the binddn. Can this be the issue?
   
   Any more trouble shooting suggestions?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2052420650

   My ldapsearch CLI works ok, but in ACS, it can't list the ldap users.
   
   Could you please help this?
   
   Brs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2056809265

   > @yuangeqingian , at first look, the excpetion says that the bind fails. This should mean the login is wrong.
   > 
   > By the looks of you cofiguration you are going for the manual import of accounts option, is that right?
   > 
   > The bind principal uses DC=DIR in capitals and the basedn uses dc=dir in lowercase. Can you check if that makes a difference?
   > 
   > Do you see any other exceptions in your logs or any error on the ldap side?
   
   1: Yes, I tried to use manual login
   2: I tried all capital and all in lowercase, all didn't work
   3: the acs management log showed below:
   DEBUG [o.a.c.l.LdapContextFactory]  initializing ldap with provider url: ldap://dir.slb.com:389
   DEBUG [o.a.c.l.LdapManagerImpl]  NamingException while doing an LDAP bind
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2057198095

   well, can you configure Apache Directory Studio, just in case it is a java issue? (https://directory.apache.org/studio/)
   
   I usually don't use microsoftad, so can't help you there. You can try to configure an openldap installation. Or use an online service like jumpcloud.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

Posted by "yuangeqingian (via GitHub)" <gi...@apache.org>.
yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2059578621

   @DaanHoogland any idea how can I fix issue above?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org