<?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>topic Can't login to MDS domain in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Can-t-login-to-MDS-domain/m-p/145672#M6708</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing a problem with API on a R81.10 installed cluster, that won't allow me to log into a domain on the MDS-server.&lt;/P&gt;&lt;P&gt;We have a script that we use to deploy new CMA + VS in a new domain, when we need it. It works flawlessly on the other 3 R81.10 clusters we have running, just not on the one I need to deploy on now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command I use:&lt;/P&gt;&lt;P&gt;curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -X POST "$cp_api_url/login" -d '{ "user": "'$cp_user'","password": "'$password'", "domain": "'$CP_Domain'"}'&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"code" : "err_login_failed",&lt;BR /&gt;"message" : "Authentication to server failed."&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;If I change the variables $cp_api_url, $cp_user, $password and $CP_Domain to match a domain on another cluster, I get this output:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"uid" : "&amp;lt;censor&amp;gt;",&lt;BR /&gt;"sid" : "QbZF6nQ1ZK2erXqKEOp90zKXscZXGidHWmG8u_vJ1MQ",&lt;BR /&gt;"url" : "&lt;A href="https://mds-server:443/web_api" target="_blank" rel="noopener"&gt;https://mds-server:443/web_api&lt;/A&gt;",&lt;BR /&gt;"session-timeout" : 600,&lt;BR /&gt;"api-server-version" : "1.8",&lt;BR /&gt;"user-name" : "&amp;lt;user&amp;gt;",&lt;BR /&gt;"user-uid" : "&amp;lt;censor&amp;gt;"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;The MDS servers are both R81.10.&lt;/P&gt;&lt;P&gt;I can't find any differences in the settings and I have tried restarting the API, but it did not help.&lt;/P&gt;&lt;P&gt;Nothing is shown in the Audit log either. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is really frustrating!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 08:59:28 GMT</pubDate>
    <dc:creator>ias_gc-dk</dc:creator>
    <dc:date>2022-04-07T08:59:28Z</dc:date>
    <item>
      <title>Can't login to MDS domain</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Can-t-login-to-MDS-domain/m-p/145672#M6708</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing a problem with API on a R81.10 installed cluster, that won't allow me to log into a domain on the MDS-server.&lt;/P&gt;&lt;P&gt;We have a script that we use to deploy new CMA + VS in a new domain, when we need it. It works flawlessly on the other 3 R81.10 clusters we have running, just not on the one I need to deploy on now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command I use:&lt;/P&gt;&lt;P&gt;curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -X POST "$cp_api_url/login" -d '{ "user": "'$cp_user'","password": "'$password'", "domain": "'$CP_Domain'"}'&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"code" : "err_login_failed",&lt;BR /&gt;"message" : "Authentication to server failed."&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;If I change the variables $cp_api_url, $cp_user, $password and $CP_Domain to match a domain on another cluster, I get this output:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"uid" : "&amp;lt;censor&amp;gt;",&lt;BR /&gt;"sid" : "QbZF6nQ1ZK2erXqKEOp90zKXscZXGidHWmG8u_vJ1MQ",&lt;BR /&gt;"url" : "&lt;A href="https://mds-server:443/web_api" target="_blank" rel="noopener"&gt;https://mds-server:443/web_api&lt;/A&gt;",&lt;BR /&gt;"session-timeout" : 600,&lt;BR /&gt;"api-server-version" : "1.8",&lt;BR /&gt;"user-name" : "&amp;lt;user&amp;gt;",&lt;BR /&gt;"user-uid" : "&amp;lt;censor&amp;gt;"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;The MDS servers are both R81.10.&lt;/P&gt;&lt;P&gt;I can't find any differences in the settings and I have tried restarting the API, but it did not help.&lt;/P&gt;&lt;P&gt;Nothing is shown in the Audit log either. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is really frustrating!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 08:59:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Can-t-login-to-MDS-domain/m-p/145672#M6708</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2022-04-07T08:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can't login to MDS domain</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Can-t-login-to-MDS-domain/m-p/145701#M6711</link>
      <description>&lt;P&gt;I found a work-around:&lt;/P&gt;&lt;P&gt;Instead of logging in to MDS, creating domain and CMA, logging out of MDS, then logging into domain and then creating the VS, which is what works everywhere else, I had to do:&lt;/P&gt;&lt;P&gt;Log into MDS (and get a SID) - POST https://&amp;lt;mgmt-server&amp;gt;:&amp;lt;port&amp;gt;/web_api/login&lt;/P&gt;&lt;P&gt;Log into Domain (using SID from MDS login and get a new SID) - POST &lt;A target="_blank" rel="noopener"&gt;https://&amp;lt;mgmt-server&amp;gt;:&amp;lt;port&amp;gt;/web_api/login-to-domain&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then I could create the VS (after having made various hack-changes, because there now are 2 SID's to handle, rather than just one).&lt;/P&gt;&lt;P&gt;I still think something is broken in the API for this particular MDS-server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;</description>
      <pubDate>Thu, 07 Apr 2022 13:04:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Can-t-login-to-MDS-domain/m-p/145701#M6711</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2022-04-07T13:04:45Z</dc:date>
    </item>
  </channel>
</rss>

