<?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 Re: Show Current Gaia API Sessions? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151150#M6891</link>
    <description>&lt;P&gt;Is this for Gaia API connections or Management API?&amp;nbsp; It looks like the Management API.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 15:33:05 GMT</pubDate>
    <dc:creator>Timothy_Hall</dc:creator>
    <dc:date>2022-06-17T15:33:05Z</dc:date>
    <item>
      <title>Show Current Gaia API Sessions?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151138#M6886</link>
      <description>&lt;P&gt;To see current Management API sessions one can look under Manage &amp;amp; Settings...Sessions...View Sessions in SmartConsole.&amp;nbsp; How is this accomplished for the Gaia API?&amp;nbsp; In other words how can I see if there is an active Gaia API session at the moment?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:46:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151138#M6886</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2022-06-17T13:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Show Current Gaia API Sessions?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151143#M6889</link>
      <description>&lt;LI-CODE lang="markup"&gt;[Expert@DallasSA]# mgmt_cli -f json -r true show sessions details-level full | jq -c '.objects[]|[."user-name",.application,."read-only"]'
["WEB_API","WEB_API",false]
["BobZ","SmartConsole",false]&lt;/LI-CODE&gt;
&lt;P&gt;API sessions show the application name "WEB_API". SmartConsole sessions show "SmartConsole".&lt;/P&gt;
&lt;P&gt;A '-r true' session shows up with the username "WEB_API" as well.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 14:13:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151143#M6889</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-06-17T14:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Show Current Gaia API Sessions?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151150#M6891</link>
      <description>&lt;P&gt;Is this for Gaia API connections or Management API?&amp;nbsp; It looks like the Management API.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 15:33:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151150#M6891</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2022-06-17T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Show Current Gaia API Sessions?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151151#M6892</link>
      <description>&lt;P&gt;Yeah, just realized a few minutes ago I misunderstood the question. Can't seem to edit or delete my post, which is fun.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 15:36:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151151#M6892</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-06-17T15:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Show Current Gaia API Sessions?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151152#M6893</link>
      <description>&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html#introduction~v1.6%20" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html#introduction~v1.6%20&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;We don't have native API call for showing sessions.&lt;/P&gt;
&lt;P&gt;You can see how many sessions you have with&amp;nbsp;&lt;EM&gt;gaia_api status&lt;/EM&gt;:&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# gaia_api status

API Status:
---------------------
Build: cp991255050
Uptime: 0:07:45
Current Sessions: 0
Latest Version: 1.6&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 15:54:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151152#M6893</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2022-06-17T15:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Show Current Gaia API Sessions?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151153#M6894</link>
      <description>&lt;P&gt;From poking at this for a few minutes, I can see&amp;nbsp;&lt;SPAN class="s1"&gt;/var/log/gaia_api_server.log contains interesting data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;17/06/22 15:50:30: MainThread: infra.urlGeneratorIS: DEBUG: Handle request: &amp;lt;class 'requests.sessions.LoginRequest'&amp;gt;
17/06/22 15:50:30: MainThread: infra.urlGeneratorIS: DEBUG: Execute validators
17/06/22 15:50:30: MainThread: infra.urlGeneratorIS: DEBUG: requestData = {'user': 'admin', 'password': '1qaz!QAZ'}
17/06/22 15:50:30: MainThread: validate: DEBUG: _validate json = {'user': 'admin', 'password': '1qaz!QAZ'}
17/06/22 15:50:30: MainThread: infra.urlGeneratorIS: DEBUG: All Active type: {'user': 'non_empty_ascii', 'password': 'non_empty_ascii'}
17/06/22 15:50:30: MainThread: infra.urlGeneratorIS: DEBUG: Verify permissions
17/06/22 15:50:30: MainThread: infra.pipeline: DEBUG: Execute commit function for class &amp;lt;class 'requests.sessions.LoginRequest'&amp;gt;
17/06/22 15:50:31: MainThread: infra.pipeline: DEBUG: Handling output
17/06/22 15:50:31: MainThread: objects.sessions: INFO: Remote authentication succeed for user:admin
17/06/22 15:50:31: MainThread: app: INFO: Request for endpoint /v1.6/login [method: POST], for source 10.0.3.18, SUCCEEDED [duration 329ms]

17/06/22 15:50:46: MainThread: infra.urlGeneratorIS: DEBUG: Handle request: &amp;lt;class 'requests.sessions.LogoutRequest'&amp;gt;
17/06/22 15:50:46: MainThread: infra.urlGeneratorIS: DEBUG: Execute validators
17/06/22 15:50:46: MainThread: infra.urlGeneratorIS: DEBUG: requestData = {}
17/06/22 15:50:46: MainThread: validate: DEBUG: _validate json = {}
17/06/22 15:50:46: MainThread: infra.urlGeneratorIS: DEBUG: All Active type: {}
17/06/22 15:50:46: MainThread: infra.urlGeneratorIS: DEBUG: Verify permissions
17/06/22 15:50:46: MainThread: infra.pipeline: DEBUG: Execute commit function for class &amp;lt;class 'requests.sessions.LogoutRequest'&amp;gt;
17/06/22 15:50:46: MainThread: infra.pipeline: DEBUG: Instantiate response class
17/06/22 15:50:46: MainThread: app: INFO: Request for endpoint /v1.6/logout [method: POST], for source 10.0.3.18, SUCCEEDED [duration 10ms]&lt;/LI-CODE&gt;
&lt;P&gt;I added a newline between the login and logout. Logins record when the user authentication works, but no unique session identifier. Logouts don't record who logged out or any kind of session identifier. Passwords are recorded in cleartext (twice!), which is ... not great.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/var/log/audit/audit.log shows logins, but no session identifier and no logouts.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 16:00:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-Current-Gaia-API-Sessions/m-p/151153#M6894</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-06-17T16:00:04Z</dc:date>
    </item>
  </channel>
</rss>

