You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Zhang Ruiqiang <zh...@163.com> on 2016/01/21 18:12:29 UTC

How to get the password of admin in service's scripts

Hi all:
      In service's scripts, I want to do something through the Rest API. The username and password are the necessary parameters to call the API, at present, I set the fixed value for the parameters, but if the password changed, the call of API will be failure.
       So, is there a soultion for this situation?
       By the way, as I know,  the agent communicates with server through Rest API too, does agent need the password too?


Thanks!

Re: How to get the password of admin in service's scripts

Posted by Dmitry Sen <ds...@hortonworks.com>.
?Agent communicates through a separate REST API, and agent agents are authenticated by certificates.


You can fully disable api authentication which is not secure by adding "api.authenticate?=false" to ambari.properties or create an additional ambari user with RO permissions and somehow deliver login/password to your scripts, which is insecure as well.




________________________________
From: Zhang Ruiqiang <zh...@163.com>
Sent: Thursday, January 21, 2016 7:12 PM
To: user@ambari.apache.org
Subject: How to get the password of admin in service's scripts

Hi all:
      In service's scripts, I want to do something through the Rest API. The username and password are the necessary parameters to call the API, at present, I set the fixed value for the parameters, but if the password changed, the call of API will be failure.
       So, is there a soultion for this situation?
       By the way, as I know,  the agent communicates with server through Rest API too, does agent need the password too?

Thanks!