<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Ambari SSO setup automation in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217713#M72384</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/488/akanto.html" nodeid="488"&gt;@Attila Kanto&lt;/A&gt; , I think you can do something like that in a script:&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/expect
spawn ambari-server setup-sso&lt;BR /&gt;expect "Some question:"&lt;BR /&gt;send "answer\r"&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;expect eof&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Dec 2017 05:22:58 GMT</pubDate>
    <dc:creator>oszabo</dc:creator>
    <dc:date>2017-12-06T05:22:58Z</dc:date>
    <item>
      <title>Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217711#M72382</link>
      <description>&lt;P&gt;I would like to set up Ambari SSO in an automated way, but it seems the 'ambari-server setup-sso' does not support it. If I switch on the silent mode then I got a not supported error message, without silent mode it is quite hard to automate since it asks quite a few questions.&lt;/P&gt;&lt;PRE&gt;# Silent mode
$&amp;gt; ambari-server setup-sso --silent
Using python  /usr/bin/python
Setting up SSO authentication properties...
WARNING: setup-sso is not enabled in silent mode.
Ambari Server 'setup-sso' completed with warnings.


# Interactive mode
$&amp;gt; ambari-server setup-sso
Using python  /usr/bin/python
Setting up SSO authentication properties...
Do you want to configure SSO authentication [y/n] (y)?
Provider URL [URL] (http://example.com):https://somehost:8443/gw-os06/knoxsso/api/v1/websso
Public Certificate pem (empty) (empty line to finish input):
MIICnTCCAYWgAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdzaWdu
aW5nMB4XDTE3MTIwNTE3NDUwMloXDTI3MTIwNTE3NDUwMlowEjEQMA4GA1UEAxMH
...
60v5bHlGkAKgdziCm1DZbxmTjcjLdxZAU7NrOlhSicZl17Yym1nmT8Cq2PkSDRaZ
rA==

Do you want to configure advanced properties [y/n] (n) ?
Ambari Server 'setup-sso' completed successfully.

&lt;/PRE&gt;&lt;P&gt;Is there a simple/elegant way to automate it?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Attila&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 04:53:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217711#M72382</guid>
      <dc:creator>akanto</dc:creator>
      <dc:date>2017-12-06T04:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217712#M72383</link>
      <description>&lt;P&gt;It
appears the ambari-server script does not support setting option via the
command line when setting up SSO.&lt;/P&gt;&lt;P&gt;I
do not think that there is a &lt;EM&gt;workaround&lt;/EM&gt; for this and the interactive mode must be used to set the SSO options. &lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 05:19:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217712#M72383</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2017-12-06T05:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217713#M72384</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/488/akanto.html" nodeid="488"&gt;@Attila Kanto&lt;/A&gt; , I think you can do something like that in a script:&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/expect
spawn ambari-server setup-sso&lt;BR /&gt;expect "Some question:"&lt;BR /&gt;send "answer\r"&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;expect eof&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Dec 2017 05:22:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217713#M72384</guid>
      <dc:creator>oszabo</dc:creator>
      <dc:date>2017-12-06T05:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217714#M72385</link>
      <description>&lt;P&gt;This answer is close to &lt;A rel="user" href="https://community.cloudera.com/users/375/oszabo.html" nodeid="375"&gt;@Olivér Szabó&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Even if it not possible to pass arguments to the script, could be used notation as follow:&lt;/P&gt;&lt;PRE&gt;ambari-server setup-sso &amp;lt;&amp;lt;EOF

....each answer on new line....

EOF&lt;/PRE&gt;&lt;P&gt;Sample: &lt;/P&gt;&lt;PRE&gt;read a &amp;lt;&amp;lt;EOF
test out 
EOF

echo $a  &lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:17:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217714#M72385</guid>
      <dc:creator>dgrinenko</dc:creator>
      <dc:date>2017-12-06T07:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217715#M72386</link>
      <description>&lt;PRE&gt;$ grep authentication.jwt /etc/ambari-server/conf/ambari.properties
authentication.jwt.enabled=true
authentication.jwt.providerUrl=https://somehost:8443/gw-os06/knoxsso/api/v1/websso
authentication.jwt.publicKey=/etc/ambari-server/conf/jwt-cert.pem
$ cat /etc/ambari-server/conf/jwt-cert.pem
-----BEGIN CERTIFICATE-----
MIICnTCCAYWgAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdzaWdu
aW5nMB4XDTE3MTIwNTE3NDUwMloXDTI3MTIwNTE3NDUwMlowEjEQMA4GA1UEAxMH
...
60v5bHlGkAKgdziCm1DZbxmTjcjLdxZAU7NrOlhSicZl17Yym1nmT8Cq2PkSDRaZ
rA==
-----END CERTIFICATE----
&lt;/PRE&gt;&lt;P&gt;Adding the above to ambari.properties and creating the certificate file jwt-cert.pem has the same effect as running ambari-server setup-sso interactively.&lt;/P&gt;&lt;P&gt;For complete list of properties, including "advanced" ones, see &lt;A href="https://github.com/apache/ambari/blob/release-2.6.0/ambari-server/src/main/python/ambari_server/setupSso.py" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.6.0/ambari-server/src/main/python/ambari_server/setupSso.py&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:25:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217715#M72386</guid>
      <dc:creator>adoroszlai</dc:creator>
      <dc:date>2017-12-06T07:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217716#M72387</link>
      <description>&lt;P&gt;i would not recommend to use this hack, as the way in which feature may be configured is subject to change &lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:27:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217716#M72387</guid>
      <dc:creator>dgrinenko</dc:creator>
      <dc:date>2017-12-06T07:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari SSO setup automation</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217717#M72388</link>
      <description>&lt;P&gt;Thanks, for answers. I voted up all of them, since all of them are very useful, but I have accepted the answer of &lt;A rel="user" href="https://community.cloudera.com/users/13035/adoroszlai.html" nodeid="13035"&gt;@Doroszlai, Attila&lt;/A&gt; since that is quite simple to automate from Ansible and SaltStack since both of them are providing built-in solutions for file manipulation.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:18:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-SSO-setup-automation/m-p/217717#M72388</guid>
      <dc:creator>akanto</dc:creator>
      <dc:date>2017-12-07T17:18:56Z</dc:date>
    </item>
  </channel>
</rss>

