You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Valery Ciareszka <va...@gmail.com> on 2013/08/20 18:02:49 UTC

get ldap config

Hi all.

How do I get current ldap config ? I have not found proper api call - there
are only calls to set up new ldap config or remove it.

When I look into mysql database I see follolwing :

mysql> select name,value from configuration where name like '%ldap%';
+---------------------+----------------------------------------------+
| name                | value                                        |
+---------------------+----------------------------------------------+
| ldap.dn             | OLshiesGXy8tVG5mGEs/Zg9G+KqqtVuTu9Y8LXCnxqk= |
| ldap.hostname       | <somehashedvalueofhostname>             |
| ldap.passwd         | <somehashedvalueofpassword>             |
| ldap.port           | lOxYeuE8YsED2VKKq3oWpA==                     |
| ldap.queryfilter    | 1Ar5wiQfIfjIYBP6ymo/cAQsQcq/N5N6             |
| ldap.searchbase     | 0fIfg/1NJwjCMDmTBqv+BUDhHWIjSSrtVlSli+4Uyi4= |
| ldap.truststore     | NULL                                         |
| ldap.truststorepass | NULL                                         |
| ldap.usessl         | r1C1NnD4Z4oTXErfIStJtg==                     |
+---------------------+----------------------------------------------+
9 rows in set (0.00 sec)

I tried to decode this as base64 but got unreadable binary output.

Any thoughts ?

used env - CS 4.1.0

-- 
Regards,
Valery

http://protocol.by/slayer

RE: get ldap config

Posted by Suresh Sadhu <Su...@citrix.com>.
Yes you are right, this was introduced when we enabled UI for LDAP in4.2.

-----Original Message-----
From: Valery Ciareszka [mailto:valery.tereshko@gmail.com] 
Sent: 21 August 2013 13:54
To: users
Subject: Re: get ldap config

I assume that will work in 4.2.0 but it does not work for me in 4.1.0/4.1.1.
Anyway, thanks for the information.


On Tue, Aug 20, 2013 at 9:52 PM, Suresh Sadhu <Su...@citrix.com>wrote:

> If you pass the listall=true  then it will list the registered ldap 
> values in the cloudstack.
>
> http://10.121.1.110:8096/client/api?command=ldapConfig&listall=true
>
>
> This XML file does not appear to have any style information associated 
> with it. The document tree is shown below.
>       <ldapconfigresponse
> cloud-stack-version="4.2.0-SNAPSHOT"><count>1</count><ldapconfig><host
> name>10.121.31.11</hostname><port>389</port><ssl>false</ssl><searchbas
> e>CN=Users,DC=hyd-qa,DC=com</searchbase><queryfilter>(&(mail=%e))</que
> ryfilter><binddn>CN=test,CN=Users,DC=hyd-qa,DC=com</binddn></ldapconfi
> g></ldapconfigresponse>
>
> Here localhost is management ip(in my case 10.121.1.110)
>
>
> Regards
> sadhu
>
>
>
>
>
> -----Original Message-----
> From: Valery Ciareszka [mailto:valery.tereshko@gmail.com]
> Sent: 20 August 2013 23:37
> To: users
> Subject: Re: get ldap config
>
> Suresh,
> It does not work:
> $ curl "http://localhost:8096/client/api?command=ldapConfig&listall=true"
> <?xml version="1.0" encoding="UTF-8"?><ldapconfigresponse
>
> cloud-stack-version="4.1.1"><errorcode>431</errorcode><cserrorcode>999
> 9</cserrorcode><errortext>Unable to execute API command ldapconfig due 
> to missing parameter hostname</errortext></ldapconfigresponse>
> According to
>
> http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/ldapConfi
> g.html, this api call is not intended to show current config, you can 
> only set new one :(
>
>
> On Tue, Aug 20, 2013 at 7:45 PM, Suresh Sadhu <Suresh.Sadhu@citrix.com
> >wrote:
>
> >
> > Try this command to list your ldap config :
> > http://localhost:8096/client/api?command=ldapConfig&listall=true
> >
> > regards
> > sadhu
> >
> > -----Original Message-----
> > From: Valery Ciareszka [mailto:valery.tereshko@gmail.com]
> > Sent: 20 August 2013 21:33
> > To: users
> > Subject: get ldap config
> >
> > Hi all.
> >
> > How do I get current ldap config ? I have not found proper api call 
> > - there are only calls to set up new ldap config or remove it.
> >
> > When I look into mysql database I see follolwing :
> >
> > mysql> select name,value from configuration where name like 
> > mysql> '%ldap%';
> > +---------------------+----------------------------------------------+
> > | name                | value                                        |
> > +---------------------+----------------------------------------------+
> > | ldap.dn             | OLshiesGXy8tVG5mGEs/Zg9G+KqqtVuTu9Y8LXCnxqk= |
> > | ldap.hostname       | <somehashedvalueofhostname>             |
> > | ldap.passwd         | <somehashedvalueofpassword>             |
> > | ldap.port           | lOxYeuE8YsED2VKKq3oWpA==                     |
> > | ldap.queryfilter    | 1Ar5wiQfIfjIYBP6ymo/cAQsQcq/N5N6             |
> > | ldap.searchbase     | 0fIfg/1NJwjCMDmTBqv+BUDhHWIjSSrtVlSli+4Uyi4= |
> > | ldap.truststore     | NULL                                         |
> > | ldap.truststorepass | NULL                                         |
> > | ldap.usessl         | r1C1NnD4Z4oTXErfIStJtg==                     |
> > +---------------------+----------------------------------------------+
> > 9 rows in set (0.00 sec)
> >
> > I tried to decode this as base64 but got unreadable binary output.
> >
> > Any thoughts ?
> >
> > used env - CS 4.1.0
> >
> > --
> > Regards,
> > Valery
> >
> > http://protocol.by/slayer
> >
>
>
>
> --
> Regards,
> Valery
>
> http://protocol.by/slayer
>



--
Regards,
Valery

http://protocol.by/slayer

Re: get ldap config

Posted by Valery Ciareszka <va...@gmail.com>.
I assume that will work in 4.2.0 but it does not work for me in 4.1.0/4.1.1.
Anyway, thanks for the information.


On Tue, Aug 20, 2013 at 9:52 PM, Suresh Sadhu <Su...@citrix.com>wrote:

> If you pass the listall=true  then it will list the registered ldap values
> in the cloudstack.
>
> http://10.121.1.110:8096/client/api?command=ldapConfig&listall=true
>
>
> This XML file does not appear to have any style information associated
> with it. The document tree is shown below.
>       <ldapconfigresponse
> cloud-stack-version="4.2.0-SNAPSHOT"><count>1</count><ldapconfig><hostname>10.121.31.11</hostname><port>389</port><ssl>false</ssl><searchbase>CN=Users,DC=hyd-qa,DC=com</searchbase><queryfilter>(&(mail=%e))</queryfilter><binddn>CN=test,CN=Users,DC=hyd-qa,DC=com</binddn></ldapconfig></ldapconfigresponse>
>
> Here localhost is management ip(in my case 10.121.1.110)
>
>
> Regards
> sadhu
>
>
>
>
>
> -----Original Message-----
> From: Valery Ciareszka [mailto:valery.tereshko@gmail.com]
> Sent: 20 August 2013 23:37
> To: users
> Subject: Re: get ldap config
>
> Suresh,
> It does not work:
> $ curl "http://localhost:8096/client/api?command=ldapConfig&listall=true"
> <?xml version="1.0" encoding="UTF-8"?><ldapconfigresponse
>
> cloud-stack-version="4.1.1"><errorcode>431</errorcode><cserrorcode>9999</cserrorcode><errortext>Unable
> to execute API command ldapconfig due to missing parameter
> hostname</errortext></ldapconfigresponse>
> According to
>
> http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/ldapConfig.html, this api call is not intended to show current config, you can only set
> new one :(
>
>
> On Tue, Aug 20, 2013 at 7:45 PM, Suresh Sadhu <Suresh.Sadhu@citrix.com
> >wrote:
>
> >
> > Try this command to list your ldap config :
> > http://localhost:8096/client/api?command=ldapConfig&listall=true
> >
> > regards
> > sadhu
> >
> > -----Original Message-----
> > From: Valery Ciareszka [mailto:valery.tereshko@gmail.com]
> > Sent: 20 August 2013 21:33
> > To: users
> > Subject: get ldap config
> >
> > Hi all.
> >
> > How do I get current ldap config ? I have not found proper api call -
> > there are only calls to set up new ldap config or remove it.
> >
> > When I look into mysql database I see follolwing :
> >
> > mysql> select name,value from configuration where name like '%ldap%';
> > +---------------------+----------------------------------------------+
> > | name                | value                                        |
> > +---------------------+----------------------------------------------+
> > | ldap.dn             | OLshiesGXy8tVG5mGEs/Zg9G+KqqtVuTu9Y8LXCnxqk= |
> > | ldap.hostname       | <somehashedvalueofhostname>             |
> > | ldap.passwd         | <somehashedvalueofpassword>             |
> > | ldap.port           | lOxYeuE8YsED2VKKq3oWpA==                     |
> > | ldap.queryfilter    | 1Ar5wiQfIfjIYBP6ymo/cAQsQcq/N5N6             |
> > | ldap.searchbase     | 0fIfg/1NJwjCMDmTBqv+BUDhHWIjSSrtVlSli+4Uyi4= |
> > | ldap.truststore     | NULL                                         |
> > | ldap.truststorepass | NULL                                         |
> > | ldap.usessl         | r1C1NnD4Z4oTXErfIStJtg==                     |
> > +---------------------+----------------------------------------------+
> > 9 rows in set (0.00 sec)
> >
> > I tried to decode this as base64 but got unreadable binary output.
> >
> > Any thoughts ?
> >
> > used env - CS 4.1.0
> >
> > --
> > Regards,
> > Valery
> >
> > http://protocol.by/slayer
> >
>
>
>
> --
> Regards,
> Valery
>
> http://protocol.by/slayer
>



-- 
Regards,
Valery

http://protocol.by/slayer

RE: get ldap config

Posted by Suresh Sadhu <Su...@citrix.com>.
If you pass the listall=true  then it will list the registered ldap values in the cloudstack.

http://10.121.1.110:8096/client/api?command=ldapConfig&listall=true  


This XML file does not appear to have any style information associated with it. The document tree is shown below.
      <ldapconfigresponse cloud-stack-version="4.2.0-SNAPSHOT"><count>1</count><ldapconfig><hostname>10.121.31.11</hostname><port>389</port><ssl>false</ssl><searchbase>CN=Users,DC=hyd-qa,DC=com</searchbase><queryfilter>(&(mail=%e))</queryfilter><binddn>CN=test,CN=Users,DC=hyd-qa,DC=com</binddn></ldapconfig></ldapconfigresponse>

Here localhost is management ip(in my case 10.121.1.110)


Regards
sadhu





-----Original Message-----
From: Valery Ciareszka [mailto:valery.tereshko@gmail.com] 
Sent: 20 August 2013 23:37
To: users
Subject: Re: get ldap config

Suresh,
It does not work:
$ curl "http://localhost:8096/client/api?command=ldapConfig&listall=true"
<?xml version="1.0" encoding="UTF-8"?><ldapconfigresponse
cloud-stack-version="4.1.1"><errorcode>431</errorcode><cserrorcode>9999</cserrorcode><errortext>Unable
to execute API command ldapconfig due to missing parameter hostname</errortext></ldapconfigresponse>
According to
http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/ldapConfig.html , this api call is not intended to show current config, you can only set new one :(


On Tue, Aug 20, 2013 at 7:45 PM, Suresh Sadhu <Su...@citrix.com>wrote:

>
> Try this command to list your ldap config :
> http://localhost:8096/client/api?command=ldapConfig&listall=true
>
> regards
> sadhu
>
> -----Original Message-----
> From: Valery Ciareszka [mailto:valery.tereshko@gmail.com]
> Sent: 20 August 2013 21:33
> To: users
> Subject: get ldap config
>
> Hi all.
>
> How do I get current ldap config ? I have not found proper api call - 
> there are only calls to set up new ldap config or remove it.
>
> When I look into mysql database I see follolwing :
>
> mysql> select name,value from configuration where name like '%ldap%';
> +---------------------+----------------------------------------------+
> | name                | value                                        |
> +---------------------+----------------------------------------------+
> | ldap.dn             | OLshiesGXy8tVG5mGEs/Zg9G+KqqtVuTu9Y8LXCnxqk= |
> | ldap.hostname       | <somehashedvalueofhostname>             |
> | ldap.passwd         | <somehashedvalueofpassword>             |
> | ldap.port           | lOxYeuE8YsED2VKKq3oWpA==                     |
> | ldap.queryfilter    | 1Ar5wiQfIfjIYBP6ymo/cAQsQcq/N5N6             |
> | ldap.searchbase     | 0fIfg/1NJwjCMDmTBqv+BUDhHWIjSSrtVlSli+4Uyi4= |
> | ldap.truststore     | NULL                                         |
> | ldap.truststorepass | NULL                                         |
> | ldap.usessl         | r1C1NnD4Z4oTXErfIStJtg==                     |
> +---------------------+----------------------------------------------+
> 9 rows in set (0.00 sec)
>
> I tried to decode this as base64 but got unreadable binary output.
>
> Any thoughts ?
>
> used env - CS 4.1.0
>
> --
> Regards,
> Valery
>
> http://protocol.by/slayer
>



--
Regards,
Valery

http://protocol.by/slayer

Re: get ldap config

Posted by Valery Ciareszka <va...@gmail.com>.
Suresh,
It does not work:
$ curl "http://localhost:8096/client/api?command=ldapConfig&listall=true"
<?xml version="1.0" encoding="UTF-8"?><ldapconfigresponse
cloud-stack-version="4.1.1"><errorcode>431</errorcode><cserrorcode>9999</cserrorcode><errortext>Unable
to execute API command ldapconfig due to missing parameter
hostname</errortext></ldapconfigresponse>
According to
http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/ldapConfig.html ,
this api call is not intended to show current config, you can only set new
one :(


On Tue, Aug 20, 2013 at 7:45 PM, Suresh Sadhu <Su...@citrix.com>wrote:

>
> Try this command to list your ldap config :
> http://localhost:8096/client/api?command=ldapConfig&listall=true
>
> regards
> sadhu
>
> -----Original Message-----
> From: Valery Ciareszka [mailto:valery.tereshko@gmail.com]
> Sent: 20 August 2013 21:33
> To: users
> Subject: get ldap config
>
> Hi all.
>
> How do I get current ldap config ? I have not found proper api call -
> there are only calls to set up new ldap config or remove it.
>
> When I look into mysql database I see follolwing :
>
> mysql> select name,value from configuration where name like '%ldap%';
> +---------------------+----------------------------------------------+
> | name                | value                                        |
> +---------------------+----------------------------------------------+
> | ldap.dn             | OLshiesGXy8tVG5mGEs/Zg9G+KqqtVuTu9Y8LXCnxqk= |
> | ldap.hostname       | <somehashedvalueofhostname>             |
> | ldap.passwd         | <somehashedvalueofpassword>             |
> | ldap.port           | lOxYeuE8YsED2VKKq3oWpA==                     |
> | ldap.queryfilter    | 1Ar5wiQfIfjIYBP6ymo/cAQsQcq/N5N6             |
> | ldap.searchbase     | 0fIfg/1NJwjCMDmTBqv+BUDhHWIjSSrtVlSli+4Uyi4= |
> | ldap.truststore     | NULL                                         |
> | ldap.truststorepass | NULL                                         |
> | ldap.usessl         | r1C1NnD4Z4oTXErfIStJtg==                     |
> +---------------------+----------------------------------------------+
> 9 rows in set (0.00 sec)
>
> I tried to decode this as base64 but got unreadable binary output.
>
> Any thoughts ?
>
> used env - CS 4.1.0
>
> --
> Regards,
> Valery
>
> http://protocol.by/slayer
>



-- 
Regards,
Valery

http://protocol.by/slayer

RE: get ldap config

Posted by Suresh Sadhu <Su...@citrix.com>.
Try this command to list your ldap config :
http://localhost:8096/client/api?command=ldapConfig&listall=true

regards
sadhu

-----Original Message-----
From: Valery Ciareszka [mailto:valery.tereshko@gmail.com] 
Sent: 20 August 2013 21:33
To: users
Subject: get ldap config

Hi all.

How do I get current ldap config ? I have not found proper api call - there are only calls to set up new ldap config or remove it.

When I look into mysql database I see follolwing :

mysql> select name,value from configuration where name like '%ldap%';
+---------------------+----------------------------------------------+
| name                | value                                        |
+---------------------+----------------------------------------------+
| ldap.dn             | OLshiesGXy8tVG5mGEs/Zg9G+KqqtVuTu9Y8LXCnxqk= |
| ldap.hostname       | <somehashedvalueofhostname>             |
| ldap.passwd         | <somehashedvalueofpassword>             |
| ldap.port           | lOxYeuE8YsED2VKKq3oWpA==                     |
| ldap.queryfilter    | 1Ar5wiQfIfjIYBP6ymo/cAQsQcq/N5N6             |
| ldap.searchbase     | 0fIfg/1NJwjCMDmTBqv+BUDhHWIjSSrtVlSli+4Uyi4= |
| ldap.truststore     | NULL                                         |
| ldap.truststorepass | NULL                                         |
| ldap.usessl         | r1C1NnD4Z4oTXErfIStJtg==                     |
+---------------------+----------------------------------------------+
9 rows in set (0.00 sec)

I tried to decode this as base64 but got unreadable binary output.

Any thoughts ?

used env - CS 4.1.0

--
Regards,
Valery

http://protocol.by/slayer