<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Henry Stamerjohann on Medium]]></title>
        <description><![CDATA[Stories by Henry Stamerjohann on Medium]]></description>
        <link>https://medium.com/@macadmin-me?source=rss-aea2f04f0fef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Henry Stamerjohann on Medium</title>
            <link>https://medium.com/@macadmin-me?source=rss-aea2f04f0fef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:47:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@macadmin-me/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Complementing Splunk SIEM with Jamf Pro inventory]]></title>
            <link>https://medium.com/zentral-pro-services/complementing-splunk-siem-with-jamf-pro-inventory-4cfa170bf39f?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cfa170bf39f</guid>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[jamf]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[mac-admin]]></category>
            <category><![CDATA[splunk]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Thu, 13 Aug 2020 11:31:54 GMT</pubDate>
            <atom:updated>2020-08-14T09:48:53.439Z</atom:updated>
            <content:encoded><![CDATA[<p>Splunk Enterprise is a self-hosted version of <a href="https://www.splunk.com/">Splunk</a> — a security information and event management (SIEM) solution that allows organizations to collect, index, report, and present data from multiple sources. Since fdew months there is a new option in Splunk to connect with <a href="https://www.jamf.com/products/jamf-pro/device-management/">Jamf Pro</a>, an Apple Device Management, MDM and Inventory solution.</p><p>Once desired data is in Splunk, it’s simple to start searching across log, event and other data. This time with Splunk, we’ll look how inventory data is pulled from Jamf Pro into Splunk Enterprise with a dedicated Splunk Add-on.</p><p>For this tutorial, we will set up a test instance of Splunk Enterprise running on Ubuntu 20.04LTS. Splunk Enterprise requires Python and will be able to install on Windows, Linux, and for test purpose will even run on macOS.</p><p>The current version of Splunk Enterprise is 8.0.5; the environment is running in Python 2.7 — note this version is EOL(end of life) — Splunk Enterprise already warns you about the future change to a Python 3.x environment. Be aware of planning for some extra maintenance shortly.</p><p>The friendly folks at Jamf have written an excellent technical paper how to integrate Splunk with Jamf Pro to pull data from an “Advanced Computer/Mobile Search” — <a href="https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Introduction.html">https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Introduction.html</a></p><p>This posting is intended to accompany that guide.</p><p><em>A note! This article assumes you’re a bit familiar with Jamf components such as advanced search, display inventory settings, add a user for Jamf Pro API access .</em></p><h3>Create a Splunk Account</h3><p>Installing Splunk Enterprise on Ubuntu is remarkably simple, to get hands-on the deb file to install, you need to register an account. Also note our Splunk Enterprise deployment runs in a limited 60-day trial time and will expire — for the procurement of a Splunk license reach out to a Splunk sales contact on their website.</p><ol><li>Go to Splunk website <a href="https://www.splunk.com/page/sign_up/en_us/getsplunk">here</a></li><li>To create your Splunk Account, provide all details.</li><li>Press the “Create Your Account Button”</li><li>Wait a moment, see your Email inbox, then validate your email address.</li><li>Log in with your credentials.</li><li>Navigate to the “Get started” section here.</li><li>Click the “Get Started With Splunk Enterprise” button.</li></ol><p>The full documentation for Splunk Enterprise is <a href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Overview/AboutSplunkEnterprise">here</a>.<br>The Jamf Pro technical paper, as mentioned earlier, is <a href="https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Introduction.html">here</a>.</p><p><em>A Note! Steps to begin with Splunk Cloud are explained at the beginning of another post on Splunk </em><a href="https://medium.com/zentral-pro-services/enable-splunk-as-backend-for-zentral-c8e573987811"><em>here</em></a><em>.</em></p><h3>Installing Splunk Enterprise in Ubuntu</h3><p>Splunk does provide base instructions to install Splunk enterprise on all supported platforms. As it’s the most simple setup, we’ll use Ubuntu 20.04 LTS in our example.</p><ol><li>Download the Linux Installation Package — download the .deb file</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nD6QVvzpcNY3HYmaKO6Iew.png" /></figure><p>2. Copy over the .deb file via ssh to the Ubuntu Server</p><p>3. Install Splunk Enterprise with dpkg from the .deb file</p><pre>sudo dpkg -i /tmp/splunk-8.0.5-a1a6394cc5ae-linux-2.6-amd64.deb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctWLidwHviPbeKtyZf_FfQ.png" /><figcaption>run dpkg to install Splunk Enterprise</figcaption></figure><p>4. Enable Splunk at boot</p><pre>sudo /opt/splunk/bin/splunk enable boot-start</pre><p>5. Agree to the license</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gtmH-HxI6CPYEQ0MoqJEpg.png" /><figcaption>Agree to the license</figcaption></figure><p>6. Create admin user to login to Splunk Enterprise</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-HuopmWG7EL_xsJypsUcQ.png" /><figcaption>Set up admin user and password, required for Splunk Enterprise web interface login</figcaption></figure><p>7. Start the Service</p><pre>sudo service splunk start</pre><h3>Sign in to Splunk Enterprise</h3><p>All following steps can be performed in the Splunk web interface.</p><ol><li>In your webbrowser go to your Splunk Enterprise instance, this is running on port 8000 <em>(i.e. splunk.example.com:8000)</em></li><li>Log in with the admin/password created in Terminal a moment ago</li></ol><h4>Install the Jamf Add-on</h4><p>The Jamf Pro add-on is pulling data at a pre-defined interval.</p><p>Here is a quick walk-thru on how to install the Jamf Pro Add-On for Splunk from the Splunk web interface.</p><ol><li>Navigate to “Find more Apps” menu</li><li>Search for “jamf”</li><li>Click the “install” button</li><li>Login with your registered Splunk Account</li><li>Install the Add-on</li><li>Restart Splunk Enterprise to complete the installation</li><li>Log in to Splunk again, see the Jamf Add on now available</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94wM_RLG87_BqqDnLG73Ww.png" /><figcaption>Add Splunk Apps as Add-on</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdkub8ouyTEg3U8o46bO1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJY8lR_ZRduEC5Rw5QtXHg.png" /><figcaption>Search for Jamf, login with Splunk account, install the “Jamf Pro Add-on for Splunk”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-OiKbPOJ7jqX6N3juR6yQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wyN0dmW8LbqrWv-ygmVbuA.png" /><figcaption>Weit until installing Add-on has finished, restart required</figcaption></figure><h3>Advanced Search in Jamf Pro</h3><p>You can quickly define which data is pulled from Jamf Pro by Splunk — for this, a new “Advanced Search” needs to be created and saved in Jamf. Splunk will retrieve all displayed inventory data from this saved search in a defined interval.</p><ol><li>Log in to Jamf Pro</li><li>Create an “Advanced Search”</li><li>In “Display” section for this saved search, enable inventory fields to be pulled by Splunk</li><li>Save the search with a unique name <em>(needed later in Splunk Add-on conf.)</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1JRrbgTrzCbSS9mXqHLBQ.png" /><figcaption>Add inventory fields you want to get pulled by Splunk</figcaption></figure><h3>Setup Jamf Pro Splunk Add-on</h3><p>Prerequisite: for the next step to work you must have created a dedicated user account in Jamf Pro <em>(auditor role)</em> that allows Splunk connect to the Jamf Pro API <em>(read more about Jamf Pro API </em><a href="https://www.jamf.com/developers/apis/jamf-pro/"><em>here</em></a><em>)</em>.</p><ol><li>Navigate to the Jamf Pro Add-On in the Splunk Enterprise web interface</li><li>Click the “Create New Input” button</li><li>Set a meaningful Name and define the interval how often Splunk will retrieve inventory data</li><li>In the Sheet provide all details requested: Jamf Pro FQDN — JSS URL, Username/Password, API Call Name <em>(Computers, Mobile Devices)</em>, Search Name <em>(corresponding to the advanced search saved in Jamf Pro)</em></li><li>Save the settings</li><li>Validate your settings</li></ol><p>After a short moment, you can start the search in Splunk Enterprise to find inventory data retrieved from Jamf Pro. From here you can explore full search and query features from Splunk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WpD4aTDUcCdlgoORejYs3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G5licceuW9klCBm1v9yklA.png" /><figcaption>Create Splunk input, validate settings</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dtjxTxbzsXWkVdVljazKBQ.png" /><figcaption>Search for aggregated data, use known field names from Jamf Inventory</figcaption></figure><h3>Summary</h3><p>This article is written complementary to the <a href="https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Installing_and_Configuring_the_Jamf_Pro_Add-on_for_Splunk.html">Jamf Technical Paper for Splunk</a> <em>(see more links below)</em>, and helps speed up testing some exciting features for those folks new to Splunk. If your Organization already use Splunk as a SIEM solution, the quick setup for macOS/iOS/iPadOS/tvOS inventory aggregation for Splunk is a welcome detail to have.</p><p>A ashort note about interval based Inventory pull from the Jamf Pro Add-on — this always will fetch full inventory. To see “differential” data about only inventory changes for proper historical change tracking will require significant extra work. Building a nice Dashboards representation for inventory in Splunk will also keep you busy for a while — it is certainly doable and worth it. An option to work with Jamf WebHooks is also a improvment to look into <a href="https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Sending_Jamf_Pro_Webhooks_to_Splunk.html">here</a>.</p><p>In the circumstances, a “differential” inventory change tracking for macOS &amp; iOS/iPadOS/tvOS is highly desired, a <a href="https://github.com/google/santa">Google Santa</a>, <a href="https://osquery.io/">Osquery</a> or other agent-based macOS endpoint event aggregation is planned out to integrate with a Splunk SIEM setup. Have a look at how to leverage <a href="https://medium.com/zentral-pro-services/enable-splunk-as-backend-for-zentral-c8e573987811">Splunk as data store with Zentral</a> — an <a href="https://github.com/zentralopensource/zentral/wiki#quick-start">open-source solution</a> for infrastructure monitoring and endpoint event stream processing.</p><p>Also, don’t hesitate to contact <a href="https://www.zentral.pro/">us</a> on further questions on all above, and discuss how an individual deployment could look like.</p><h4>For more info</h4><ul><li>Splunk Jamf Pro Add-on: <a href="https://splunkbase.splunk.com/app/4729/">https://splunkbase.splunk.com/app/4729/</a></li><li>Jamf technical paper: <a href="https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Installing_and_Configuring_the_Jamf_Pro_Add-on_for_Splunk.html">https://docs.jamf.com/technical-papers/jamf-pro/splunk/10.9.0/Installing_and_Configuring_the_Jamf_Pro_Add-on_for_Splunk.html</a></li><li>Splunk Dashboard tutorial: <a href="https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchTutorial/Aboutdashboards">https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchTutorial/Aboutdashboards</a></li><li>Article how <a href="https://medium.com/zentral-pro-services/enable-splunk-as-backend-for-zentral-c8e573987811">Enable Splunk as backend for Zentral</a></li><li>Zentral open source: <a href="https://github.com/zentralopensource/zentral">https://github.com/zentralopensource/zentral</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cfa170bf39f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zentral-pro-services/complementing-splunk-siem-with-jamf-pro-inventory-4cfa170bf39f">Complementing Splunk SIEM with Jamf Pro inventory</a> was originally published in <a href="https://medium.com/zentral-pro-services">macadmin-me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable Splunk as backend for Zentral]]></title>
            <link>https://medium.com/zentral-pro-services/enable-splunk-as-backend-for-zentral-c8e573987811?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8e573987811</guid>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[mac-admin]]></category>
            <category><![CDATA[osquery]]></category>
            <category><![CDATA[google-santa]]></category>
            <category><![CDATA[splunk]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Wed, 12 Aug 2020 08:19:09 GMT</pubDate>
            <atom:updated>2023-12-03T13:16:12.072Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>UPDATE NOTE</strong>: Parts of this blogpost are outdated, please consult our official docs <a href="https://docs.zentral.io/en/latest/">here</a> when setting up Splunk as backend for Zentral.</p><p><a href="https://www.splunk.com/">Splunk</a> is a security information and event management (SIEM) solution that allows organizations to collect, index, report, and present data from multiple sources.</p><p><a href="https://github.com/zentralopensource/zentral">Zentral</a> is centralized service that gathers event data from multiple sources and deploy configurations to multiple services. It allows for orchestration and event management with certain macOS security components such as <a href="https://osquery.io/">Osquery</a> for endpoint visibility, and the Google’s <a href="https://github.com/google/santa">Santa</a> binary authorization system<em> </em>and will link events with an inventory<em> (Jamf Pro, Munki, PuppetDB, et-al)</em>.</p><p><a href="https://github.com/zentralopensource/zentral/wiki">Zentral</a> is built on top of the popular <a href="https://www.elastic.co/elastic-stack">Elastic Stack</a>, by default, ElasticSearch is the primary data store when search for historical events. But Zentral does allow to leverage other event stores as well, as such you can send event data from supported agents via Zentral to Splunk, Azure Event Log, and more<em>..</em>.</p><p>Setting up a different event store is actively applied in certain custom deployments where aim is to forward endpoint events <em>(specifically macOS endpoint events)</em> from Zentral towards a SIEM system, already in place <em>(see also this talk at MacSysAdmin 2019 </em><a href="http://docs.macsysadmin.se/2019/video/Day1Session7.mp4"><em>here</em></a><em> —brief demo of event shipping to Azure Sentinel SIEM)</em>.</p><p>To illustrate this topic to follow along in a practical approach, we’ll walk thru a base scenario how to quickly activate and set up a Splunk backend integration with Zentral in just a few minutes.</p><p>In our custom example, a fleet of endpoints with open-source agents<em> </em>installed <em>(Santa, Osquery, FileBeat) </em>does already stream event and log data to Zentral. The different kind of events are aggregated, normalized and processed, then with some extra steps all event data is automatically forwarded to Splunk as the SIEM solution got enabled as additional data store in Zentral. Now, the tasks of event search, investigation and correlation can all happen in Splunk.</p><blockquote>TL;DR — Zentral can forward all events to Splunk used as a data store.</blockquote><h3>Get started — setup a Splunk Cloud instance</h3><p>To get data into Splunk there are multiple ways — we’re going to use the HTTP Event Collector (<strong>HEC</strong>) in our setup to forward all endpoint event data from Zentral directly to Splunk and use this as a data store. <br>You’ll find some more details on Splunk HTTP Event Collector <a href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Data/UsetheHTTPEventCollector">here</a>.</p><p>In our example customer scenario Zentral continues to deliver it’s essential core features — orchestrate open-source security agents<em> (Santa, Osquery, FileBeat, etc)</em> across a fleet of endpoints. The different kind of events get aggregated, normalized and processed, then all data forward to Splunk Cloud as additional data store. The main tasks for event search and correlation is performed in Splunk.</p><p>First you’ll need to have a Splunk instance with proper TLS— the fastest way here is to start a trial version of Splunk Cloud.</p><ol><li>Go to the Splunk website, start a “Cloud Trial” <a href="https://www.splunk.com/page/sign_up/en_us/getsplunk/cloud_trial">here</a></li><li>Create an Account, provide all details</li><li>Validate your email address</li><li>Click “Start Trial” button</li><li>Wait for the “Welcome to Splunk Cloud!” Email which provides your individual Splunk Cloud access credentials</li><li>Make a note of your Splunk Cloud instance URL</li></ol><p>The next action is to enable data input….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DOsROs67qHAg84nB9DuCRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FjUckDfvNL6fRcWMK0hdiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iEfYapPFWNf35LainehZWQ.png" /><figcaption>Provide credentials, validate Email, Log-in</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SffcxgYGnSaD7YbW3u2eDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YEhPyRhcxZ97tVye5e7NQA.png" /><figcaption>Start the Splunk Cloud Trial</figcaption></figure><h3>Setup Splunk HTTP Event Collector</h3><p>Data input to Splunk is quite straightforward, we setup the HTTP Event Collector (HEC) for this purpose.</p><ol><li>Login to your Splunk Cloud instance</li><li>Go to Settings &gt; Data &gt; Data Inputs</li><li>From Local inputs &gt; HTTP Event Collector &gt; click the “Add new” button</li><li>Provide a Name and Description</li><li>For input setting go to “select” and choose “log2metrics_json”</li><li>Review the setup</li><li>Copy the Token value <em>(you’ll need this along with the URL later)</em></li></ol><p>With Splunk prepared, our next activity is to configure Zentral. For this, a short splunk.py file <em>(just 26 lines of code)</em> and adding some data fields to the base.json config file is necessary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ha9uvKiIrtod8DmJkVAZLA.png" /><figcaption>Data Inputs</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N1pBVEbLieC3JrRMHUQ54w.png" /><figcaption>Add new Local inputs — HTTP Event Collector</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJfSkvIeB8rFMLA_VVGqZg.png" /><figcaption>Provide Name and Description</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dT_KvPtqqu4d2RABaWYKDg.png" /><figcaption>Source type, choose: log2metrics_json</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfGxy9vOW2Z62oHA_dgV0w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XtCBV65B0f21IhaCpJFPfA.png" /><figcaption>Review and copy token value</figcaption></figure><h3>Setup and enable Splunk data store in Zentral</h3><p>We’re almost there to see first events in Splunk — in next steps you have to ssh into your Zentral instance <em>(i.e. </em><a href="https://github.com/zentralopensource/zentral/wiki#quick-start"><em>Zentral-all-in-one</em></a><em>)</em>, and ensure the splunk.py backend file is present.</p><p>If not present copy the code for <a href="https://github.com/zentralopensource/zentral/blob/master/zentral/core/stores/backends/splunk.py">plunk.py</a> from GitHub manually <a href="https://github.com/zentralopensource/zentral/blob/master/zentral/core/stores/backends/splunk.py">here</a>, save that as a file to your instance namedsplunk.py <em>(saved into path below)</em>.</p><pre>/home/zentral/app/releases/current/zentral/core/stores/backends/</pre><p>Alternatively you could also run a full code update and deploy latest master branch from GitHub repository as described <a href="https://github.com/zentralopensource/zentral/wiki/ZAIO-setup#extra-tools">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A6f-rUQepDIxblyvuNYjAQ.png" /><figcaption>splunk.py file to connect datastore with Splunk</figcaption></figure><p>To activate the new data store you’ll need add some config details to the Zentralbase.json config file. Remember before doing any edits in base.json ensure you create a safety copy first.</p><ol><li>Ensure the <strong>splunk.py</strong> file is present</li></ol><pre>ls -l /home/zentral/app/releases/current/zentral/core/stores/backends/</pre><p>2. Edit the base.json file in a text editor <em>(nano or vim).</em></p><pre>sudo nano /home/zentral/conf/base.json</pre><p>3. Multiple value statements in JSON are separated by a comma sign. In base.json file scroll to the “Stores” section. Insert a new JSON dict for “splunk” following existing “elasticsearch” as shown below. In your newly created “splunk” JSON dict replace the base_url value with your own Splunk instance URL. Ensure you’ll correctly append the port :8080 followed by /services/collector/raw — just as presented in the example dict below. Next insert your Splunk HEC access token as vcalue for the api_token .</p><pre>&quot;splunk&quot;: {<br>      &quot;frontend&quot;: false,<br>      &quot;backend&quot;: &quot;zentral.core.stores.backends.splunk&quot;,<br>      &quot;base_url&quot;: &quot;<a href="https://prd-p-xxxxx.splunkcloud.com:8088/services/collector/raw">https://prd-p-xxxx.splunkcloud.com:8088/services/collector/raw</a>&quot;,<br>      &quot;api_token&quot;: &quot;c1l9beef-41bf-4d88-8838-00c64c3e36c3&quot;,<br>      &quot;verify_tls&quot;: false<br>    }</pre><p>See the example below how an end result would look like :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eHh8J-UOWgsCuQY2JmsAtw.png" /><figcaption>Add config to Stores with Splunk details</figcaption></figure><p>4. Validae your new addition did not malform the JSON file. Check for errors with this command, correct formatting if needed.</p><pre>python3 -m json.tool /home/zentral/conf/base.json</pre><p>5. When config is free from errors. next stop and then start the Zentral Workers again. Now events start shipping to the new data store.</p><pre>sudo systemctl stop zentral_workers</pre><pre>sudo systemctl start zentral_workers</pre><p>With a proper setup as shown above you should immediately see new events forwarded from Zentral to Splunk Cloud. With endpoints sending Santa or Osquery events you can start search for them in Splunk.</p><h3>Search Events in Splunk</h3><p>In Splunk Cloud you need to navigate to the App &gt; <strong>Search &amp; Reporting</strong> section. In this view you can search for historic events, save queries, build reports, and do much more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ppqr2Yz_SOlIJ9sCfmV4rA.png" /><figcaption>Search &amp; Reporting</figcaption></figure><ul><li>Try start with some basic search terms first.</li><li>Try out more complex ones — i.e. look for known file hashes <em>(works if Santa log/event is collected in Zentral).</em></li><li>Refine some searches with Splunk drill-in capabilities<em> (shown below)</em></li></ul><pre>*| spath file_sha256 | search file_sha256=a0e6e7997a818d7093dbf9678d0e96fbc5420a9f9a4a9c1d3eab441404153acf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pu8ADJ1CG_EquywJmq7OTQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WryLFs520BlQRoW9jPjjxA.png" /><figcaption>Splunk Search reasults — select value, add or exclude from search</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52TiQhRypK_mOEAkAVoVyw.png" /><figcaption>a refined search query</figcaption></figure><p>In the next section you’ll see some additional examples how different endpoint events and simple queries to start with look like in Splunk.</p><ul><li>Osquery — a distributed query</li><li>Google Santa logs</li><li>Google Santa events</li><li>Jamf client side logs</li></ul><p>The current setup shows how a basic raw JSON shipping of all event data from Zentral looks like — with some extra effort the data formating can be adjusted. Also a pre-defined drop filter for some <em>(uncritical)</em> event types could help reduce the volume of data shipped to Splunk <em>(in turn save Splunk cost)</em>.</p><p>Find more details about Zentral <a href="https://github.com/zentralopensource/zentral/wiki">here</a> and <a href="https://medium.com/zentral-pro-services">here</a>.</p><h4>Osquery</h4><ul><li><a href="https://osquery.io/">Osquery</a> — Performant endpoint visibility.</li><li>Use basic SQL commands for auditing, security and compliance of endpoints.</li><li>See: <a href="https://osquery.io/schema/4.4.0/">https://osquery.io/schema/4.4.0/</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIUZBLvJ4t0v5k3q-RfueQ.png" /><figcaption>Osquery — a distributed query result</figcaption></figure><h4>Google Santa</h4><ul><li><a href="https://github.com/google/santa">Google Santa</a> — a binary authorization system for macOS</li><li>System extension on macOS<em> </em>that monitors for executions, a userland daemon that makes execution decisions.</li><li>See: <a href="https://santa.readthedocs.io/en/latest/details/events/">https://santa.readthedocs.io/en/latest/details/events/</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L3q0O9Y7zfUaSbeps6G0Sg.png" /><figcaption>Google Santa — santa_log details</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7pbSyjrq9M0y94GqdScdg.png" /><figcaption>Google Santa — santa_event details</figcaption></figure><h4>Jamf — client side logs</h4><p><a href="https://www.jamf.com/products/jamf-pro/">Jamf Pro</a></p><ul><li>jamf local log file on macOS client— /var/log/jamf.log</li><li>look into recurring events, Self Service and Policy executions</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MLXgXWb3GdALhsxVALoNbQ.png" /><figcaption>Jamf.client log (as seen locally in macOS)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0TaZ9Us6btX-8STiv2-n-Q.png" /><figcaption>/var/log/jamf.log file — aggregated, normalized, and forwarded to Splunk</figcaption></figure><h3>Wrap Up</h3><p>In this example we’ve seen how to setup additional event data store in Zentral. We enable Splunk with HEC and allow to stream events stream from Zentral into Splunk. In Splunk you can search for endpoints events from Santa, Osquery and jamf client log events.</p><p>In a future posts we will look into some more Splunk use cases — stay tuned.</p><p>For more details about Zentral look <a href="https://github.com/zentralopensource/zentral/wiki#quick-start">here</a>. For custom integration and development, professional services and consulting contact us <a href="https://zentral.pro/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8e573987811" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zentral-pro-services/enable-splunk-as-backend-for-zentral-c8e573987811">Enable Splunk as backend for Zentral</a> was originally published in <a href="https://medium.com/zentral-pro-services">macadmin-me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Notes on Munki powered by SimpleMDM (…and how this works along Zentral open-source)]]></title>
            <link>https://medium.com/zentral-pro-services/quick-notes-on-munki-powered-by-simplemdm-and-how-this-works-along-zentral-open-source-1db0caf3906b?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/1db0caf3906b</guid>
            <category><![CDATA[osquery]]></category>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[simplemdm]]></category>
            <category><![CDATA[munki]]></category>
            <category><![CDATA[mac-admin]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Tue, 16 Jun 2020 16:15:15 GMT</pubDate>
            <atom:updated>2020-06-16T18:31:04.331Z</atom:updated>
            <content:encoded><![CDATA[<p>Last week on Friday, Taylor Boyko, Founder and CEO at SimpleMDM, announced they will launch <a href="https://simplemdm.com/announcing-hosted-munki/"><strong>Munki powered by SimpleMDM</strong></a> short after the <a href="https://mdoyvr.com/">MacDevOps:YVR conference</a> <strong>.</strong></p><blockquote>Today we begin the technology preview for an exciting addition: <strong>Munki powered by SimpleMDM</strong>. Using Munki has traditionally required additional administrative effort to configure and maintain Munki clients and a repository. With this release, a tightly integrated, hosted Munki deployment is now available out-of-the-box for SimpleMDM admins.</blockquote><p>The full-length announcement can be read <a href="https://simplemdm.com/announcing-hosted-munki/">here</a></p><p>Now a just a few days later, the technology preview is already live at the customers that have requested to be included in the technology preview.</p><p>For the moment, the new feature is only available on request. To be included, simply send the support a quick mail with your request.</p><p>The support team will verify if you don’t currently have a conflicting setup (such as exiting Munki pkg used already) and then process your account to get updated. The team at SimpleMDM is extremely fast in enrolling customers with the new features.</p><p>Meanwhile, some fellow #macadmins like Erik Gomez already have their hands down with the new features. He did a a bit of a security review last night, read some insights he shared over here: <a href="https://twitter.com/Contains_ENG/status/1272673299106054145">https://twitter.com/Contains_ENG/status/1272673299106054145</a> and here <a href="https://twitter.com/Contains_ENG/status/1272673698454044672">https://twitter.com/Contains_ENG/status/1272673698454044672</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RO9VT36jkA9pOY6uI45fkw.png" /></figure><p>Earlier today, we had a chance to quickly test out the <strong>Munki powered by SimpleMDM</strong> tech preview and try to validate things play well along with our <a href="https://github.com/zentralopensource/zentral">Zentral open-source</a> server. As everything is based on Munki 5 we didn’t expect many issues and can confirm things work beautifully.</p><p>Below are some brief notes on our initial findings <em>( subject to change/get revised once we learn more). </em>We’ll further look into at next round of features to go live and update information coming from the community here in a shortlist of links:</p><ul><li><a href="https://simplemdm.com/announcing-hosted-munki/">Munki powered by SimpleMDM</a></li><li><a href="https://github.com/munki/munki/wiki/Munki-5-Information">Munki 5 release notes</a></li></ul><h3>Upload and assign Apps</h3><p>Apps get uploaded in App &amp; Media &gt; Catalog &gt; Upload macOS binary section.</p><p>On the enrolled macOS client, a SimpleMDM Agent app will automatically get intalled and launch, it will be visible as a menu bar App, and allow to open the Munki Managed Software Center (MSC) from here.</p><p>For Apps to be installed by Munki and (optionally) become visible MSC you first have to upload them to the SimpleMDM. Then you can make your assignmenst to install Apps either automatically or provide them as a Self Service item in the MSC.</p><p>The Munki configuration is pushed automatically as a Configprofile via MDM. All Munki related files are installed at the common paths for Munki, such as Applications or /Library/Managed Installs/ . The MSC installed automatically is currently version 5.2.0.4033.</p><blockquote><strong>Note:</strong> Packages must be <em>signed product archives</em> to be accepted by macOS and SimpleMDM.</blockquote><p>We briefly tested the Zentral related additions to Munki 5.0 and those work fine for us — inventory data is pushed to Zentral and there is no difference in operation to other Munki deployments here <em>(see screenshots below)</em>.</p><p>Usually, typical extra installs are performed to connect Munki with a Dashboard Service such as <a href="https://github.com/salopensource/sal">Sal</a> or <a href="https://github.com/munkireport/munkireport-php">Munki Report PHP </a>. We haven’t tested both yet in the setup with SimpleMDM but in general this should work fine too, as long as you use <em>signed product archives</em> here<em>.</em></p><h4>DMG files — simple ones work easily</h4><ul><li>You can upload simple .dmg files via drag and drop to the Catalog section</li><li>The DMG will be analyzed, the Icon gets extracted and you can assign the App</li></ul><h4>Pkg files —they need to be <em>signed product archives</em></h4><ul><li>To upload a .pkg they all need to be <em>signed product archives</em> before they will become available and actually for Munki assignments. Just an uploaded .pkg file and assignment is not enough here.</li></ul><p>As before here the use <em>signed product archives</em> is a must requirement and applies to the majority of .pkgs acquired by AutoPkg, including Vendor/Project .pkg builds from GitHub — in doubt try to (re)sign with productsig prior uploading to SimpleMDM.</p><p>Something along the command below should work to sign the pkgs — you must have a Apple Developer Account for this to work.</p><pre>/usr/bin/productsign --sign &quot;Developer ID Installer: Your Apple Account Name (**********)&quot; Zoom-5.1.27838.0614.pkg ~/Desktop/Zoom-5.1.27838.0614.pkg-signed.pkg</pre><h4>Assignment to install</h4><p>You have several groups available for App assignments either install automatically, tagged “<strong>munki managed”</strong> or present in MSC, tagged <strong>“munki self serve”</strong>.</p><p>After you have made changes in App assignments you want to Update the Catalog so the update can be applied with Munki running on the endpoint.</p><h4>macOS Endpoint Agent (quick install &amp; connect validation)</h4><p>For a quick compatibility with Munki powered by SimpleMDM and our Zentral open-source project, we did run an assignment with some beloved and popular macOS endpoint agents that all can connect to <a href="https://github.com/zentralopensource/zentral">Zentral</a>.</p><p>The following list of endpoint agents worked nicely* as expected (all .pkg uploaded as <em>signed product archive, </em>deployed with Munki powered by SimpleMDM<em>):</em></p><ul><li>osquery-4.3.0-signed.pkg</li><li>santa-1.1.3-signed.pkg</li><li>zentral_munki_enroll-signed.pkg</li><li>zentral_osquery_enroll-signed.pkg</li><li>zentral_santa_enroll-signed.pkg</li></ul><p>*Note: To run and fully operate above security agents on the macOS endpoints you must deploy accompanying configuration profiles to allow Security Extension and set TCC profiles via SimpleMDM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CpFHLfFdUzrj_YARRpCWMg.png" /><figcaption>Enrolled to Zentral — macOS client + Osquery + Santa with Munki powered by SimpleMDM</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QqPEN_Dg5_1BieRNcy6fuQ.png" /><figcaption>Managed Software Center — showcase install for common macOS Security agents (usually installed in background automatically)</figcaption></figure><p>The new features in the tech preview for Munki powered by SimpleMDM are pretty cool and a great addition to <a href="https://simplemdm.com/">SimpleMDM</a>.</p><p>Thanks to the SimpleMDM team to introduce this new feature for #macadmins.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1db0caf3906b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zentral-pro-services/quick-notes-on-munki-powered-by-simplemdm-and-how-this-works-along-zentral-open-source-1db0caf3906b">Quick Notes on Munki powered by SimpleMDM (…and how this works along Zentral open-source)</a> was originally published in <a href="https://medium.com/zentral-pro-services">macadmin-me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An inital touch base with the macos_security project]]></title>
            <link>https://medium.com/zentral-pro-services/an-inital-touch-base-with-the-macos-security-project-70e4caa4266?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/70e4caa4266</guid>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[mac-admin]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[macos]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Tue, 16 Jun 2020 01:16:00 GMT</pubDate>
            <atom:updated>2021-05-12T21:06:40.036Z</atom:updated>
            <content:encoded><![CDATA[<p>Mid of last week National Institute of Standards and Technology<br>has a released an exiting open-source Framework on GitHub: <a href="https://github.com/usnistgov/macos_security"><strong>macos_security</strong></a>.</p><blockquote>macos_security — a macOS Security Compliance Project</blockquote><p>The project helps to setup and organize security baselines, and technical security controls in a structured and formulated fashion.</p><p>The intention is to provide a unified way to define and set security controls on the macOS platform. The project is scoped mostly towards System Administrators, Security Researchers, and Vendors.</p><p>The projects’s FAQ states a great summary on it’s motives <a href="https://github.com/usnistgov/macos_security/wiki/FAQ">here:</a></p><blockquote>Every year, a new version of the macOS is released by Apple. With each new version, security professionals and administrators spend months waiting for the release of a security baseline. By creating an open source, community-based method for generating baselines to match new versions of macOS, the timeline for releasing these baselines should be reduced.</blockquote><p>The US Federal published guides that the macos_security project currently supports are:</p><ul><li><a href="https://csrc.nist.gov/publications/detail/sp/800-53/rev-4/final">NIST 800–53</a></li><li>FISMA High</li><li>FISMA Moderate</li><li>FISMA Low</li><li><a href="https://www.cnss.gov/CNSS/openDoc.cfm?lfaBhc7ZgGq1SoukjDCGnQ==">CNSSI 1253</a></li></ul><p>Alongside the above guides also prevalent in the field are the well known CIS <a href="https://www.cisecurity.org/benchmark/apple_os/">Apple OS Benchmark</a> guides by the Center for Internet Security. Many controls referenced match to the CIS guide and vice versa, so the macos_security can be used complementary to existing baseline definitions.</p><p>In a governmental use scenario for macOS that setup looks very restricted — see the SmartCard enforcement and almost every cloud services disabled <em>(think about iCloud, Siri, et-al. here)</em>, often, a more lightweight subset of the broader security controls is used in typical business or higher educational environments.</p><p>The <a href="https://github.com/usnistgov/macos_security">macos_security</a> project tries here to address such differing need, not only by organizing a well defined structure to write down definition of controls. It also provides some practical tools — that help to build a documentation or sheet <em>(.xlsx file)</em>, create an accompanying shell-script to setup/validate security settings, and also provide mobile config profiles that could be directly used to set certain controls. The use of macos_security as a Framework effectively reduces workload and time to finalize a security baseline for macOS.</p><blockquote>Rationale for this project:</blockquote><blockquote>Normalize and accelerate annual adoption of OS/Hardware by having guidance available to meet the needs of new operating systems on release</blockquote><blockquote>Reduce worldwide effort in creating annual guidance by unifying and consolidating compliance efforts into a single project</blockquote><blockquote>Develop a methodology to foster collaboration between baseline authors, reducing overhead and redundancy</blockquote><blockquote>Unify approach in setting controls</blockquote><blockquote>Provide MDM/EMM/security/audit vendors and Apple insight into customer hardening needs</blockquote><h4>The project structure</h4><p>The project <a href="https://github.com/usnistgov/macos_security/wiki">wiki</a> gives a good overview on the <a href="https://github.com/usnistgov/macos_security/wiki/Layout">layout</a> here:</p><pre>baselines/  ---&gt; Baseline profiles containing all the rules<br>build/      ---&gt; Script output directory. Contains scripts, documents, and<br>                 mobileconfig files generated by scripts<br>custom/     ---&gt; Custom baseline creation<br>includes/   ---&gt; YAML-based libraries for build scripts<br>rules/      ---&gt; Rules for securing the operating system; YAML content<br>                 with one rule per file<br>scripts/    ---&gt; Scripts to generate reports and configuration<br>sections/   ---&gt; YAML configurations for sections in generating the guides<br>templates/  ---&gt; AsciiDoc templates</pre><p>Note: All scripts require the use of Python 3, in macOS Catalina this usually is installed along with the Apple Developer Command Line Tools — more details about the transition to Python 3 in macOS Catalina can be read <a href="https://scriptingosx.com/2020/02/wrangling-pythons/">here</a>.</p><h3>Customize (in PyCharm)</h3><p>The getting started guide is very well written and straightforward— you can simply follow all along <a href="https://github.com/usnistgov/macos_security/wiki/Scripts">here</a> and use the Terminal.</p><p>As a variation to that, here we run a an activity to create a custom baseline file, then apply the scripts to the set definitions.</p><p>To work along the steps, we proceed the tasks with a rather lightweight use of <a href="https://www.jetbrains.com/pycharm/download/">PyCharm</a> (Community Edition) — a free to use IDE for Python. PyCharm here provides an example graphical editor to see/edit the rules, allow to install Python 3 dependencies, and work within the Project from a single text editor.</p><h4>Prepare the project</h4><p>First clone the project <em>(requirement: Apple Developer CLI already installed)</em></p><pre>git clone https://github.com/usnistgov/macos_security.git</pre><ol><li>Navigate to the cloned project in your filesystem, open that folder in PyCharm.</li><li>By default the Project interpreter is set to Python 2.7, this must be changed to Python 3 before you can proceed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sueRg_ZrdkQg_O2_gKY_9A.png" /><figcaption>Click the link to configure Python interpreter</figcaption></figure><ol><li>For the <a href="https://docs.python.org/3/library/venv.html">Virtualenv</a> Environment, set Base interpreter to /usr/bin/python3</li><li>Create a new file, name itRequirements.txt</li><li>Insert the Requirements pyyaml , lxml , and xlwt<em>(one per line)</em></li><li>Click the “Install requirements” link</li><li>Install the shown packages</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wMusv2NilKfWSTU3C3UDw.png" /><figcaption>1. Base interpreter for Virtual Environment set</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrA48JAtWaFpI4SXkMgzlA.png" /><figcaption>2-4. Set Requirements, click the “Install requirements” link</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9v71SKA7zMm-Q_trQfR3cw.png" /><figcaption>5. Install the shown packages</figcaption></figure><h4>Customize a baseline file</h4><p>Baseline files are used for the creation of a guide or xlsx sheet, scripts, and mobileconfig files. In the baseline one defines the associated controls which are used to meet a given security profile.</p><p>Quick steps to create and use a new custom.yaml baseline file:</p><ol><li>Create a new file, we name that custom.yaml in our example</li><li>Copy the yaml structure from an <a href="https://github.com/usnistgov/macos_security/wiki/Baselines">existing baseline</a> file into the custom.yaml</li><li>Edit the yaml structure, refine the profiles, set the <a href="https://github.com/usnistgov/macos_security/wiki/Rules">rules</a> to your liking</li><li>Run the scripts, then inspect the results.</li></ol><ul><li>Run the <a href="https://github.com/usnistgov/macos_security/wiki/Scripts#yaml-to-xlspy">yaml-to-xlsx</a> script</li><li>Run the <a href="https://github.com/usnistgov/macos_security/wiki/Scripts#script_generatorpy">script generator</a> script</li><li>Run the <a href="https://github.com/usnistgov/macos_security/wiki/Scripts#profile_generatorpy">Profile generator</a> script</li></ul><p><strong>Update(2021):</strong> With the code updates, the commands have changed recently</p><ul><li>Create XLSX: ./scripts/generate_guidance.py -x baselines/custom.yaml</li><li>Create a script:./scripts/generate_guidance.py -s baselines/custom.yaml</li><li>Create profiles:./scripts/generate_guidance.py -p baselines/custom.yaml</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQbmzHpJfEGXAzuKb-jHNQ.png" /><figcaption>Edit the custom.yaml, set rules, run the script files <em>(in PyCharm Terminal)</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-FgmWJT9rwqXhgsB45hNqA.png" /><figcaption>Result: generated script and mobileconfig files</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0eFMrJUB5uWREMRKPvYUhQ.png" /><figcaption>The xlsx table file with the defined rules</figcaption></figure><p>This was a short touch base and practice how to leverage the <a href="https://github.com/usnistgov/macos_security"><strong>macos_security</strong></a> project, quickly customize a baseline and look into the resulting files.</p><p>Next steps would be to apply and test the resulting shell-script/mobileconfig files from the build folder carefully on a test device. And later prepare them to deploy with a client managment and MDM solution.</p><p>Great thanks to Allen Golbig, Bob Gendler, Dan Brodjieski, and other core contributors. Very likely they have worked some longer to structure and build this flexible Security Compliance Project, that now onwards can help a broader audience and is easy to start with.</p><p>Pretty sure this project will see a lot more traction in the following weeks and months.</p><p>In future it would be nice to see the <a href="https://github.com/usnistgov/macos_security/wiki">macos_security</a> project getting cross referenced and/or implemented by vendors as well as with tools such as <a href="https://osquery.io/schema/">Osquery</a>, <a href="https://www.kolide.com/fleet/">Kolide Fleet</a>, and other projects in same vain.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70e4caa4266" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zentral-pro-services/an-inital-touch-base-with-the-macos-security-project-70e4caa4266">An inital touch base with the macos_security project</a> was originally published in <a href="https://medium.com/zentral-pro-services">macadmin-me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zentral up and running on AWS]]></title>
            <link>https://medium.com/zentral-pro-services/zentral-up-and-running-on-aws-95f8dcb7b63e?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/95f8dcb7b63e</guid>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[osquery]]></category>
            <category><![CDATA[elastic-stack]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Tue, 01 Oct 2019 12:24:37 GMT</pubDate>
            <atom:updated>2023-12-03T15:35:08.057Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>UPDATE NOTE</strong>: Please consult our official docs <a href="https://docs.zentral.io/en/latest/deployment/zaio-aws/">here</a> when setting up Zentral in AWS.</p><p>This is a short Step-By-Step instruction how to start a <strong>Zentral-all-in-one</strong> deployment on <a href="https://aws.amazon.com/">Amazon AWS</a>. To make it even easier for you to follow along, we’ve recorded a screencast (4:25) to complement this blogpost.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoH2kz3JOgzs%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoH2kz3JOgzs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoH2kz3JOgzs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/630705444e19c445ea1ae40f9b82b885/href">https://medium.com/media/630705444e19c445ea1ae40f9b82b885/href</a></iframe><p>For a full reference and in-depth version of the AWS / EC2 instructions go and check out the Wiki <a href="https://zentral.readthedocs.io/en/latest/deployment/zaio-aws/">here</a>.</p><h4>Deployment Prerequisites</h4><p>There are a few requirements to deploy Zentral-all-in-one <em>(ZAIO)</em> on AWS. You need to have:</p><ul><li>An active AWS account <em>(note: running on a t2.micro instance in AWS free will unfortunately not meet the system requirements of ElasticSearch)</em></li><li>AWS permissions to create an EC2 instance and setup AWS security group settings <em>(used to set Firewall settings for the inbound traffic).</em></li><li>Setup DNS A records for a domain</li></ul><h4>Prepare and Launch the Instance</h4><p>Now start the to launch, setup and configure the Zentral instance:</p><ol><li>Find the latest AWS Link from the Zentral <a href="https://github.com/zentralopensource/zentral/releases">GitHub release</a> page</li><li>Click on the URL which is closest to your AWS region. This will open a pre-build Amazon Machine Image (AMI) with the latest Zentral code on AWS.</li><li>Configure the EC2 instance. We recommend to use the following basic specifications for AWS: <br><strong>a.)</strong> Choose VM size t2.medium <em>(ElasticSearch needs RAM)</em><br><strong>b.)</strong> Increase the root volume size <em>(20–100GB for prod data) </em><br><strong>c.)</strong> Ensure you’ll enable all required ports for the inbound traffic. <br>Ports: 80(HTTP,Let&#39;s Encrypt), 443(HTTPS), 22(SSH), 5044(Logstash) <em>Note: Usually you’ll create a new AWS security group for this purpose.</em><br><strong>d.)</strong> Create a new AWS Key Pair to later access the VM via SSH<br><strong>e.)</strong> Start the EC2 instance and copy the IP address to setup DNS records</li><li>You have to configure two DNS records with the same IP. Both records need to point to the public IP address of the EC2 instance. The first DNS A record is the main FQDN you’ll connect with, the second DNS record will be used for client-certificate based authentication and the build-in SCEP server in Zentral.</li><li>Set correct file permissions, then connect via SSH to the EC2 instance by using the AWS Key Pair ssh -i &lt;keyname&gt;.pem ubuntu@&lt;FQDN&gt; the default password you need to provide is same as the username: <strong>ubuntu</strong>.</li><li>Now prepare to edit the command you need to run the setup tool. You must provide correct settings that match your FQDN, username, email for the superuser and ensure the additional FQDN_FOR_CLI_CERT_AUTH is also set correctly. Run the command in Terminal session on the instance. This will start the initial setup process of your Zentral instance.</li></ol><pre>$ sudo /home/zentral/app/utils/setup.py FQDN USER EMAIL FQDN_FOR_CLI_CERT_AUTH</pre><p><em>Note: When setup done, copy the password reset URL from the Terminal session.</em></p><h4>Post launch steps</h4><p>With the next steps you will get access the launched instance of Zentral.</p><ol><li>Once setup process has finished in Terminal, copy the reset password URL given. You have to open this URL in your browser, then set a password for the superuser.</li><li>Log in to Zentral with the user / password credentials you’ve set.</li></ol><p>Congrats, you now should have setup a full instance of Zentral-all-in-one on AWS. Next see other <a href="https://medium.com/@zentral/zentral-ressources-74864bd9c646">tutorials</a> for additional setups, i.e. secure access with 2FA or see how to<a href="https://medium.com/@zentral/setup-azure-ad-based-sso-for-zentral-e6e36b6f2720"> enable SSO</a> with an Identity Provider on your Zentral instance.</p><h4>Optional steps</h4><ol><li>Check the Let’s Encrypt TLS certificate validity.</li><li>Check the Zentral workers health status in Prometheus.</li></ol><p>The AWS deployment shown here is most the simple way to run an instance of Zentral. Stay tuned our follow up post on getting up and running and also see the <a href="https://medium.com/@zentral/zentral-ressources-74864bd9c646">other resources</a>.</p><p>Last but not least go check our latest <a href="https://github.com/zentralopensource/zentral/releases">release</a> info. For the more in-depth changes of the Project, see latest code changes on GitHub <a href="https://github.com/zentralopensource/zentral/commits/master">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95f8dcb7b63e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zentral-pro-services/zentral-up-and-running-on-aws-95f8dcb7b63e">Zentral up and running on AWS</a> was originally published in <a href="https://medium.com/zentral-pro-services">macadmin-me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Azure AD based SSO for Zentral]]></title>
            <link>https://macadmin-me.medium.com/setup-azure-ad-based-sso-for-zentral-e6e36b6f2720?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6e36b6f2720</guid>
            <category><![CDATA[azure-active-directory]]></category>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[elastic]]></category>
            <category><![CDATA[single-sign-on]]></category>
            <category><![CDATA[osquery]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Thu, 06 Jun 2019 13:46:00 GMT</pubDate>
            <atom:updated>2021-01-16T08:17:41.087Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_CK_ekAu-69yJav9Y2y4w.png" /></figure><p>In this post we’ll look how to enable the SingleSignOn (SSO) authentication for <a href="https://github.com/zentralopensource/zentral/">Zentral</a> based on <a href="https://azure.microsoft.com/en-us/services/active-directory/"><strong>AzureAD</strong></a><strong>/O365</strong>. So in case you happen to already use Azure as your SAML 2.0 provider we’ll show how quickly enable the Azure based sign-in for a Zentral instance.</p><h3>Preparations in Azure</h3><p>Before we start to activate SSO on the Zentral server side, we’ll need to setup the basics in Azure. For a common Azure based SSO setup you‘ll have to create a new Azure Enterprise App and activate it’s SAML 2.0 setting.</p><ol><li>Log into your Azure account</li><li>Locate the <strong>Azure Active Directory</strong> (AAD) service</li><li>Scroll down to <strong>Enterprise application</strong></li><li>Click on <strong>Enterprise Application</strong> and create a new <strong>Enterprise App</strong> and pick a useful name <em>(i.e. Zentral AAD)</em></li><li>Next choose the SAML Single sign-on method</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5mD5lU_V4TUtz5idMVZ_ZA.png" /><figcaption>Create new Enterprise application</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1Xe8Z4XRFF97WYPYGWWLw.png" /><figcaption>We will use SAML as SSO method</figcaption></figure><h4><strong>1. Basic SAML Configuration</strong></h4><p>This configuration step is mandatory — we need to provide matching URLs for <br><strong>Entity ID</strong>,<strong> ACS</strong> and the<strong> SignOn URL</strong>. Of course the <em>FQDN</em> used should be replaced with your own one.</p><pre><strong>Identifier (Entity ID) </strong>— (the metadata URL):<br>https://zentral.example.com/saml2/metadata/</pre><pre><strong>Reply URL (Assertion Consumer Service URL)</strong> (also known as ACS)<br>https://zentral.example.com/saml2/metadata/</pre><pre><strong>Sign on URL<br></strong>https://zentral.example.com/saml2/login/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pp6h1uJftD90KGoinlfw5Q.png" /><figcaption>Setup URLs with your own FQDN</figcaption></figure><h4>2. <strong>User Attributes &amp; Claims</strong></h4><p>Next in the <strong>user claims</strong> we need to change only a single attribute. look out for the <strong>Unique User Identifier </strong>.</p><ol><li>For editing you can click on the “nameidentifier”entry <em>(highlighted in the screenshot)</em></li><li>The default Source attribute assignment here is set to <strong>user.userprincipalname</strong>, we want to change this to <strong>user.mail</strong> <br><em>(scroll down the Source attributes)</em></li><li>Now apply the change, click the <strong>Save</strong> button</li></ol><p>With other settings we’ll stick to the defaults provided by Azure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mf181rP-mfbJd3xh-vC2ow.png" /><figcaption>Change Unique User Identifier value</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zfm3_Y9LV26o2OUy5njfNg.png" /><figcaption>Manage and change the user claim</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOxHwv89lS7_XROKMddrpg.png" /><figcaption>should look like this after change</figcaption></figure><h4>3. SAML Signing Certificate</h4><p>Here we’ll need to download a Metadata file and ensure we’ll copy it over to the Zentral server.</p><ol><li>Click on the <strong>Federation Metadata XML </strong>download link</li><li>Keep the downloaded <em>.xml</em> file around for later <br><em>(you‘ll need to copy/paste the content soon)</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89KzCISj85ESrrmhCfC1zg.png" /></figure><h4>4. Users and groups</h4><p>Users from Microsoft AzureAD (AAD) must be enabled for SSO in an Enterprise App, so next you’ll have to add the <strong>Users</strong><em> (or Groups)</em> you’ll want to approve for login to Zentral via AzureAD.</p><ol><li>Click the <strong>Users and Groups </strong>section</li><li>Add your user(s)</li><li>Save your setting</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HkvGigg0t-O4jaMTHra1aw.png" /></figure><h3>Setup in Zentral</h3><p>The final steps need to happen on the Zentral server side to SSO with Azure. For this we’ll have to copy the content of the downloaded Azure <strong>Federation Metadata XML </strong>file over to Zentral server, add it’s file path and a label to a systemd service and then restart a service afterwords.</p><blockquote>2020 update — see the Realms tutorial for improved setup: <a href="https://youtu.be/04sIlLgryv0">https://youtu.be/04sIlLgryv0</a></blockquote><p><strong>Create your Metadata.xml</strong></p><ol><li>Connect via Terminal to your Zentral instance<em> <br>(via ssh or tools like awscli, gcloud etc.)</em></li><li>Copy the content of the local Federation Metadata <em>.xml</em> file into your pasteboard <em>(yes this is one previously downloaded from Azure)</em></li><li>Next create a new file on the Zentral server, paste in the content copied from <em>.xml</em> file and then save the new file</li></ol><pre>sudo vim /home/zentral/conf/AzureAD_zentral.example.com.xml</pre><p><strong>Edit the systemd service</strong></p><p>We must make Zentral aware of the new IDP Metadata.xml file next. For that we’ll add two new <a href="https://en.wikipedia.org/wiki/Env">ENV</a> entries into the zentral_web_app <a href="https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux">systemd service</a> file:</p><ul><li>Environment=ZENTRAL_SAML2_IDP_NAME</li><li>Environment=ZENTRAL_SAML2_IDP_METADATA_FILE</li></ul><pre>sudo vim /etc/systemd/system/zentral_web_app.service</pre><p>Add two extra ENV variables into the zentral_web_app.service file <em>(see the final edit in the screenshot below)</em>:</p><pre>Environment=ZENTRAL_SAML2_IDP_NAME=Azure-AD</pre><pre>Environment=ZENTRAL_SAML2_IDP_METADATA_FILE=/home/zentral/conf/AzureAD_zentral.example.com.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gaycqoC9PnmAGlqsBHz1iw.png" /><figcaption>After the edit it should look like this</figcaption></figure><p><em>Note: Any if you want to set a name with spaces make use of quotation marks as shown here:</em><em>&quot;Environment=&quot;ZENTRAL_SAML2_IDP_NAME=Azure AD&quot;</em></p><p><strong>Restart the services</strong> <br>Once the edits to the <strong>zentral_web_app.service</strong> file are saved, we need to reload the systemctl daemon:</p><pre>sudo systemctl daemon-reload</pre><p>The finally step is to restart the service “zentral_web_app” as well, so the new SSO button is shown in your browser.</p><pre>sudo systemctl restart zentral_web_app</pre><p>Voilà, just a few seconds later we’ll see a new SSO button appear in the Zentral login window and now can run <a href="https://en.wikipedia.org/wiki/Single_sign-on">SingleSignOn</a> with <a href="https://azure.microsoft.com/en-us/services/active-directory/">AzureAD</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVSbP0z-Gc47fnj_Wx1nSQ.png" /></figure><p>Back in Azure you will see an overview of sign-in events in an and could peek into details more from there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rztKkTPaGv87pKlTtcOr6A.png" /></figure><h4>Wrap up</h4><p>We hope this guide is useful in case you’re using Azure and look out to run AzureAD for SAML 2.0. We’ve previously demonstrate similar instructions for an Okta based SSO setup — you can find the details <a href="https://medium.com/p/28b1f3c1563/edit">here</a>. <br>The setup is pretty much a standard and can be quickly adapted for most SingleSignOn providers <em>(in fact we did use GSuite for SSO long before we’ve recently switched over to Azure).</em></p><p>Thanks and stay tuned for a next round of features to see in <a href="https://github.com/zentralopensource/zentral/commits/master">Zentral</a> over next few weeks. You can reach out to us via <a href="https://macadmins.herokuapp.com/">Macadmins Slack</a> or use the contact section on our Zentral Pro Services company <a href="https://zentral.pro/">site</a> <em>(yes, still german only site;)</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6e36b6f2720" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring updates for Zentral]]></title>
            <link>https://medium.com/zentral-pro-services/spring-updates-for-zentral-32f793376fd2?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/32f793376fd2</guid>
            <category><![CDATA[munki]]></category>
            <category><![CDATA[osquery]]></category>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[jamf]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Fri, 29 Mar 2019 22:16:00 GMT</pubDate>
            <atom:updated>2023-12-03T15:36:35.932Z</atom:updated>
            <content:encoded><![CDATA[<p>UPDATE NOTE: Please consult our official docs <a href="https://docs.zentral.io/en/latest/">here</a> for up to date info on Zentral.</p><p>We continuously update the Zentral codebase, recently we’ve merged our latest dev branch into master. Why worth mention with a full blogpost ? — Well we’ve build-in some nice new updates into Zentral and so you’ll probably want to check these out in more detail. Let’s start a quick overview on latest enhancements and dive a bit into our reorganized inventory view and a new introduced “drilldown” functionality.</p><h3>Ok, so what’s new ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpTiQhjA0vEu462V9UpZWQ.png" /><figcaption>Inventory quick drilldown</figcaption></figure><h4>Functionality and Code updates</h4><p>This is a list of noteworthy additions that we’d like to emphasis for our spring release of Zentral:</p><ul><li>A reorganized inventory view with a new <strong>drilldown</strong> user-interface (UI)</li><li>Based on drilldown you’ll now find a <strong>inventory_export </strong>file .xlsx option</li><li>SAML 2.0 enhancements address minor issues seen with <strong>AzureAD</strong> and SingleSignOn(SSO) setup</li><li>The current <strong>zentral-all-in-one</strong> builds now all include latest versions of ElasticStack 6.7 and Prometheus 2.8</li><li><strong>Kibana 6.7</strong> — automatically sets index pattern ‘zentral-events’ as default</li><li>Upgrade to <strong>Django v2.1</strong></li></ul><p>The latest code can be pulled from GitHub for existing Zentral setups. If you’re running a <strong>zentral-all-in-one</strong> deployment use the build-in update tool <em>(ensure you have Python 3.5 installed as Django 2.1 requirement)</em>. If you happen to start over with a deployment from scratch, follow the guides to create a new instance on AWS or GCP. For both platforms we’ve build new images with packer and all components embedded <em>(see notes below on build timestamps )</em>.</p><h4>New Drilldown Inventory</h4><p>The most obvious change is our reorganized Inventory view now that provides enhanced search and drilldown capability. As before<em> Inventory &gt; Machines </em>is a representation of all machines<em> (aka devices or endpoints) </em>that Zentral aggregates from inventory sources. Our smart filtering is now at hand for much faster inventory searches. With just few clicks one can drilldown to match a filter criteria and in turn a list of machines quickly reduce and shows only those correlate to the applied filtering. In our prod environment this works astonishingly fast with hundreds of machine entries in our inventory<em>.</em></p><blockquote>Ok sounds nice, but what’s inventory sources again ?</blockquote><h4>Recap Inventory Sources</h4><p>As before in <em>Inventory &gt; Machine</em> view you’ll see all machines <em>(devices or endpoints)</em> here that are linked to one or many inventory sources. Zentral can simultaneously connect and aggregate inventory information from many sources in parallel. This could be few Jamf Pro Servers <em>(on-prem testing, on-prem production, JamfCloud instance, etc.) </em>and/or FileWave along with <a href="https://osquery.io/">Osquery</a>, <a href="https://github.com/munki/munki">Munki</a>, <a href="https://www.watchmanmonitoring.com/">Watchman Monitoring</a> and <a href="https://github.com/google/santa">Google Santa</a>. A single machine can happen to be a member of more than one inventory source and now with drilldown you’ll much quicker navigate across and also precisely locate machines thru filtering from the overall centralized inventory.</p><h4>Drilldown — Inventory filtering</h4><p>The drilldown in new <em>Inventory &gt; Machine</em> view works with a simple click to add or remove a filter and reduce into specific areas. Probably a <em>gif </em>is worth a thousand words here— you can see a short inventory drilldown demo below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4gY7y0JLLVtUVpWuIR2fA.gif" /><figcaption>Drilldown to specific OS version, see all related machines</figcaption></figure><h4>Drilldown — Application filter</h4><p>Now what about some currently hidden details from your inventory? It would be great to have a similar filter capability to separate specific macOS application versions, display count per version and drill into what is installed where across the fleet. Yes for just this purpose we provide a neat option to “Add a drill down filter” — you can add a filtering on App information the default <em>Inventory &gt; Machines</em> view is extended for that. The a majority of inventory sources <em>(Osquery, Munki, FileWave, etc.) </em>you go and insert a valid BundleID<em> (i.e. org.mozilla.Firefox)</em>, for Jamf Pro the inventory for apps is reported a bit differently. With Jamf App info you’ll must provide a valid <em>AppName.app</em> to apply same filtering. Of course the drill down works for both in identical way. This application filtering and drill down becomes pretty useful for our inventory_export and reporting functionality explained later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAt3D_k_v0mM_eFa9zfZ7g.png" /><figcaption>Use a valid <strong>BundleID</strong> to create a filter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g4JXoGNoN2gdkUsU1PQoXQ.png" /><figcaption>Use a valid <strong>App Name.app</strong> (for Jamf App) to create a filter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6EYYwqV32UAiMFnDU96Rw.png" /><figcaption>Above created the App Filter results — ready for drilldown…</figcaption></figure><p>Here’s a <em>gif </em>to see this in action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RW0pUIz6b90pV36snjUI4w.gif" /></figure><h4>Drilldown — edit the filter view</h4><p>Ok so you can add items but to remove the ones you don’t want to see for the moment? In a inventory view you can remove a filter item very quickly. <br>Again a <em>gif to </em>see this in action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2eA5emA6ErMLwwImtCtkiQ.gif" /></figure><h4>Restore custom views</h4><p>Ok so how to store a custom build view? For this we’ve setup a link scheme as the option to store and return to a custom view. The core idea here is everyone knows how to store a link and/or create a bookmark in a browser. Now with a simple link scheme you can quickly re-creates a custom view and use drilldown anytime, it just requires a bookmark. Otherwise the default view is quickly editable anytime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89iiA4wO9bOUv70_WnAtKQ.png" /><figcaption>The drill down filter options</figcaption></figure><p>The resulting link scheme with an URL to store looks similar to this:</p><pre>https://&lt;fqdn&gt;/inventory/<strong>?sf=mbu?</strong><br>https://&lt;fqdn&gt;/inventory/<strong>?sf=hm-pf-osv-t<br></strong>https://&lt;fqdn&gt;/inventory/<strong>?sf=t-hm-pf-osv-a.i.com.mozilla.firefox</strong></pre><h4>WYSIWYG Reporting and Export</h4><p>What you see is what you get and this apply inventory reporting and exporting data. This is nice feature becomes quickly versatile in case you need to run ad hoc or even a recurring inventory report from the inventory sources. With the custom filtering options you can run a <strong>inventory_export</strong> anytime just with click on the XLSX button. Next moment you’ll see a report file that downloads a file with name and timestamp similar to this one: <em>inventory_export_2019–03–27_10–51–16.xlsx</em></p><p>Combined with the extra filtering <em>(i.e. apps )</em> you perform a simple sequence and generate detailed inventory reports when needed. The exported data is ready to process further and can visualized the inventory report with other tools <em>(such as Excel, Numbers, Tableau, MS PowerBI, Google DataStudio, etc. ).</em></p><ol><li>Store a link with your current inventory view and filter set</li><li>Open the link in another browser window <em>(to validate)</em></li><li>Press the XLSX download button</li><li>You’ll see a report file with a name and timestamp like <em>inventory_export_2019–03–27_10–51–16.xlsx</em></li><li>Repeat steps 2–4 next time to fetch a new <strong>inventory_export</strong></li></ol><p>In the <em>gif</em> you’ll see an <strong>inventory_export</strong> assembled from a WYSIWYG view downloaded as a <strong><em>.xlsx</em></strong> file with a timestamp. Of course such file is ready for post processing, stay tuned for more on that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ao-pelRS53SNvF95QSKZuw.gif" /><figcaption>A report for external processing is downloaded as XLSX file</figcaption></figure><p>We will catch up on this topic for more “report and processing” on inventory in one of our future blogposts.</p><h4>Elastic Stack 6.7</h4><p>You can read all the buzz here:</p><p><a href="https://www.elastic.co/blog/elastic-stack-6-7-0-released">Elastic Stack 6.7.0 released</a></p><p>We have build ElasticStack 6.7 into the core of Zentral and while Kibana 6.7 needs some RAM to breath <em>(hint: not fun in a EC2 t2.micro)</em> it’s fun to work with all new features in Kibana.</p><p>Of course all <strong>zentral-all-in-one</strong> images that we’ve pre-build for cloud deployment start up with ElasticStack 6.7 out of the box.</p><h3>Wrap up</h3><p>Let’s wrap up with valuable information in case you start run a new deployment of <strong>zentral-all-in-one</strong> on AWS or GCP. Below you see a summary with updated information and reference for a deployment hick-up seen with GCP.</p><h4>New AWS AMI images <em>(available for deployment)</em></h4><p>The new zentral-all-in-one AMIs have been created and are available — the following AMI IDs are our latest ones (per region):</p><ul><li><strong>eu-central-1: ami-0b5857da66e223509</strong></li><li><strong>us-east-1: ami-0a5c429add7cf8d16</strong></li><li><strong>us-west-2: ami-0d12d51a844d1632e</strong></li></ul><p>Detailed steps and procedure for a AWS deployment have not changed.</p><h4>New GCP Image (available for deployment)</h4><p>We also created a new image for Google Cloud Platform (GCP) as well. But when you’re following the deployment instructions for GCP <em>(as to be found in our former blog posts </em><a href="https://medium.com/@zentral/zentral-on-gcp-tutorial-chapter1-2d872a8da1f7"><em>here</em></a><em>) </em>you’ll likely run into an API error like this:</p><pre>ERROR: (gcloud.compute.images.create) Could not fetch resource:<br> - The resource &#39;<a href="https://www.googleapis.com/storage/v1/b/zentralopensource/o/zentral-all-in-one.tar.gz&#39;">https://www.googleapis.com/storage/v1/b/zentralopensource/o/zentral-all-in-one.tar.gz&#39;</a> of type &#39;Google Cloud Storage object&#39; was not found.</pre><p>A quick fix procedure with a manual download of the artifact instead of API based has been described by a fellow Zentral user <strong>Thunderbear — </strong>you can read up the steps <a href="https://medium.com/@Torbjorn_59818/working-around-ec68e565e284">right here</a>:</p><p><a href="https://medium.com/@Torbjorn_59818/working-around-ec68e565e284">Working around:</a></p><p>We will refine our original install guide for GCP soon. For the moment we wait on another response from our GCP Support contact. The API error doesn’t throw in a GCP account that “owns” a public artifact. Since few weeks it suddenly happens if called from a separated accounts.This is related to permissions and under the hood changes on how the gcloud CLI tool connects with a public available GCP bucket with the API.</p><p><em>See below hard to figure what set of perms more than a full ‘public’ access can be set for a bucket artifact.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VsqMTdueN1E8UDS32eB0ZA.png" /><figcaption>GCP image available for public download</figcaption></figure><blockquote>¯\_(ツ)_/¯</blockquote><p>Our latest of <strong>zentral-all-in-one.tar.gz</strong> <em>(created 3/27/19, 11:10:55 PM UTC+1)</em> build for GCP can be downloaded as a public available item here: <br><a href="https://storage.googleapis.com/zentralopensource/zentral-all-in-one.tar.gz">https://storage.googleapis.com/zentralopensource/zentral-all-in-one.tar.gz</a></p><h4>There’s one more thing to share</h4><p>We’ve launched our new company Zentral Pro Services GmbH &amp; Co. KG just a few weeks back in February 2019. Under our new brand we focus to operate as a specialized professional services company. We do provide our expertise and services on open source technology and consult on common cloud and IdP solutions. We also work as Jamf Integrators and Jamf Professional Services Partner.</p><p>As before within our former company our main scope is to employ detailed expertise and help clients to manage the Apple platform and go beyond. We do research and development for a living.</p><p>Of course our continued work on <a href="https://github.com/zentralopensource/zentral/">Zentral</a> as open source is a vital element in our business — it’s a core element and great platform for our ongoing research and development <em>(R&amp;D)</em> work.</p><p>If you feel a need to reach out to get us involved with your future project, if you look for certain expertise or external R&amp;D capacity to help realize and shape workflows in your environment. We’re available to contact on the usual channels — via Email <em>(see weblink below)</em>, your trusted Jamf Buddy, or ping us directly on Macadmins Slack.</p><p>• <a href="https://zentral.pro/">https://zentral.pro/</a><em> (German)<br></em>• <a href="https://int.zentral.pro/">https://int.zentral.pro/</a><em> (English, reduced version)</em></p><p>Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32f793376fd2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zentral-pro-services/spring-updates-for-zentral-32f793376fd2">Spring updates for Zentral</a> was originally published in <a href="https://medium.com/zentral-pro-services">macadmin-me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get up and running Zentral on Google Cloud Platform — Chapter 4]]></title>
            <link>https://macadmin-me.medium.com/get-up-and-running-zentral-on-google-cloud-platform-chapter-4-28b1f3c1563?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/28b1f3c1563</guid>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[okta]]></category>
            <category><![CDATA[sso]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Sun, 25 Feb 2018 14:46:09 GMT</pubDate>
            <atom:updated>2021-01-16T08:01:45.007Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome the fourth episode to get up and running Zentral-all-in-one on Google Cloud Platform. In this chapter we are enabling a <a href="https://en.wikipedia.org/wiki/Single_sign-on">SSO</a> setup by using <a href="https://www.okta.com/">Okta</a> as our SAML provider. A similar setup will also work with Google G Suite, many other SAML 2.0 providers should work to SSO into your Zentral server as well.</p><p><em>Note: We have only tested GSuite and Okta here. Let us know of other SAML providers you’ve used.</em></p><h4>Preparation</h4><p>Log into Okta and create a new custom App. You must select SAML 2.0 protocol here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*muHInmmYYJs36CaQkUZRHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ScnDwF1vuU5Rpee3Imqjg.png" /></figure><p><em>Note: We use a Developer version of Okta (so your UI may look a bit different, but steps remain to be the same.</em></p><p>Next there’s two parameters we need to setup in Okta, of course the FQDN used must match your own.</p><ul><li>Single sign on URL (the ACS link to fill in here)</li><li>Audience URI (the Metadata link to fill in here)</li><li>other settings are optional so we ignore them in our example and stick with the defaults already set</li></ul><pre>ACS: <a href="https://zentral.apfelwerk.net/saml2/acs/">https://zentral.apfelwerk.net/saml2/acs/</a> </pre><pre>Metadata: <a href="https://zentral.apfelwerk.net/saml2/metadata/">https://zentral.apfelwerk.net/saml2/metadata/</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcCfTELP0in9SWJJLlvDbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CqgGRLWCUC3yNvfgWw-W9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wZ5U87e85jS6cG662zu_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_tFjK3Bp_E1v4j7tNi6Utg.png" /></figure><h4>Zentral edits</h4><blockquote>2020 — see the updated tutorial: <a href="https://youtu.be/04sIlLgryv0">https://youtu.be/04sIlLgryv0</a></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F04sIlLgryv0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D04sIlLgryv0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F04sIlLgryv0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/02ab02b32b5178c2173206886ea8959f/href">https://medium.com/media/02ab02b32b5178c2173206886ea8959f/href</a></iframe><p>Now we proceed our basic setup steps in Okta, and next need to instruct Zentral server to use the data as login option. For this we must copy the IDP Metadata we’ve see in Okta to create a Metadata file be present on the Zentral server.</p><p>For this we open Terminal or ssh into the Zentral instance, create a new file, and insert the IDP Metadata info <em>(see screenshots)</em>:</p><pre>sudo vim /home/zentral/conf/OKTA_IDP_METADATA.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4em7Z3Gtm9KH3sKiEECdDg.png" /></figure><p>We insert all IDP Metadata here, and save the file as .xml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntjFn5ray_NsiWJBOogMKg.png" /></figure><p>Next to make Zentral aware of the IDP Metadata we need to add an entry to the zentral systemd service file:</p><pre>sudo vim /etc/systemd/system/zentral_web_app.service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBIaUaIm0TzIn1Wi1Tqk2w.png" /></figure><p>We add in two extra ENV variables inside the zentral_web_app.service file <em>(see the screenshots)</em>:</p><ul><li>Environment=ZENTRAL_SAML2_IDP_NAME</li><li>Environment=ZENTRAL_SAML2_IDP_METADATA_FILE</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ka6I9GUilVymH8Y4w_qelg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQBpHFC9BVx7FCdTHErbsA.png" /></figure><p>The Environment=ZENTRAL_SAML2_IDP_NAME variable provide the name to be reference in Zentral login window. In our example here simply use <strong>“Okta”</strong></p><p>The Environment=ZENTRAL_SAML2_IDP_METADATA_FILE is the full path reference to the IDP Metadata.xml we’ve previously created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKsxfXfRjnm17XdvGVXJXA.png" /></figure><p>Now we save the file and must reload the systemctl deamons:</p><pre>sudo systemctl daemon-reload</pre><p>We also need to restart the service “zentral_web_app”, as a result we see a new button in the Zentral login window.</p><pre>sudo systemctl restart zentral_web_app</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c4oxhvmpwBn8HZ3q6yOqsQ.png" /></figure><h4>Enable users/groups</h4><p>Last action required for this SSO setup remains in the Okta &gt; People section. Here we need to assign / enable a user or group of users for accessing the App with SSO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y_oxSETtRwEJ5Orin8bZ7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NjKMsT8gyYMO45s23CIwow.png" /></figure><p>Finally when at the Zentral login window we can click the “Sign in with Okta” button. We should see a transfer to the regular Okta user login process and should log-in successfully with aOkta user account into Zentral. <br>From now on we can enjoy simple this SSO for daily use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wb94iGoN-Jt0q2OP5FY8g.png" /></figure><h4>Wrap up</h4><p>We’ve reached the end of this chapter. We have a production reday SSO setup for Zentral. Based on GCP in a free tier, we now can lean towards the client facing features in Zentral. You could review our <a href="https://medium.com/@zentral/zentral-ressources-74864bd9c646">initial resources</a> posting, and stay tuned for future tutorials.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28b1f3c1563" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get up and running Zentral on Google Cloud Platform — Chapter 3]]></title>
            <link>https://macadmin-me.medium.com/zentral-on-gcp-tutorial-chapter3-1e224e830140?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e224e830140</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[systemd]]></category>
            <category><![CDATA[journalctl]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Sun, 25 Feb 2018 13:36:54 GMT</pubDate>
            <atom:updated>2018-07-06T16:46:18.324Z</atom:updated>
            <content:encoded><![CDATA[<h4>Intoduction</h4><p>Welcome back to our third tutorial in a series on <a href="https://github.com/zentralopensource/zentral/wiki">Zentral</a>. In this chapter we peek into internal settings, run few linux <a href="https://www.digitalocean.com/community/tutorials/systemd-essentials-working-with-services-units-and-the-journal">systemd</a> commands and go inspect server side processes and workers on command line as well as in the <a href="https://prometheus.io/blog/2017/11/08/announcing-prometheus-2-0">Prometheus 2.0</a> interface.</p><blockquote>When I call Extra-Links-&gt;Kibana, I just get a HTTP 502. It looks like the service didn’t start correctly.</blockquote><p>From previous chapter we do already know, in case we see a <a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes">HTTP 502 status code</a> instead of a Kibana 6 interface, a systemct command below will help restart the service for us:</p><pre>systemctl restart elasticsearch <br>systemctl restart kibana</pre><h3>Prometheus 2.0</h3><p>But pretty sure we don’t want to go and restart such services just blindly. For general purpose of health check on internal workers status we’ve include <a href="https://prometheus.io/blog/2017/11/08/announcing-prometheus-2-0/">Prometheus 2.0</a> into “Zentral-all-in-one”.</p><p>So let’s go and inspect Prometheus right now. You just need to go to the Extra links section in Zentral, then select Prometheus here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MjNYyj5W1zZSNmp5_YPefQ.png" /></figure><p>Next in Prometheus navigate to Prometheus &gt; Status &gt; Targets section. Here you can see the quickly the health status of the build in running services. Please keep note of the <em>Inventory worker dummy (1/1 up)</em> entry here.We will work on that service next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*feAIB8ny66HdYixxSRVhBA.png" /></figure><h3>Let’s edit out the showroom dummies</h3><p>The main configuration for Zentral is read from the base.json file, to be found inside /home/zentral/conf directory. By default in Zentral there’s entries for “dummy” devices and also a <em>Inventory worker dummy</em> process is running in Zentral. The <em>Inventory worker dummy</em> will generate recurring events, these are <em>“inventory heartbeat” </em>events written into ElasticSearch. For our productive use scenario we don’t need the dummy entries any more. So as our exercise here, we will edit out the dummies<em>.</em> This is a good lesson how to adjust and edit the Zentral base.json configuration.</p><p>For this task you either open up the GCP Terminal window or you log with ssh to the Zentral instance running <em>(see Episode#2 for details).</em></p><h4>Begin editing base.json</h4><p>Just in case you’ll happen to make any errors on editing the base.json file, let’s be safe by default and create a backup first:</p><pre>sudo cp /home/zentral/conf/base.json /home/zentral/conf/base.json.bk</pre><p>Next we edit the base.json config file with <a href="https://vim.rtorr.com/">vim text editor</a> <em>(basic edit skills in vim required). </em>Our goal is<em> </em>to disable the <em>Inventory worker dummy </em>entry<em>.</em></p><pre>sudo vim /home/zentral/conf/base.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R95wsLS2495RuE1VAyMa-A.png" /></figure><p>Just in case you don’t like vim, feel free to use nano instead:</p><pre>sudo nano /home/zentral/conf/base.json</pre><p>The <em>Inventory dummy worker </em>is to be found in the base.json config file under <em>zentral.contrib.inventory &gt;clients &gt;</em> <em>zentral.contrib.inventory.clients.dummy</em> object. So once removed from the base.json the <em>inventory.clients.dummy </em>worker will also be removed from the runtime, as soon all Zentral workers are re-started.</p><p>It is critical, we don’t mess up the<a href="https://www.tutorialspoint.com/json/json_syntax.htm"> json formatting</a> here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ausOAht3eTxEf6FrMdWuUg.png" /></figure><p>Take your time, edit out the json <em>zentral.contrib.inventory.clients.dummy </em>object, you need include surrounding curly brackets. As result of our editing we see an empty &quot;clients&quot;:[] array remaining in the base.json file. Now save (overwrite) the edited file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W9nLNOgHSc9A7fuPMDSFRQ.png" /></figure><p>Next can validate the json formatting is not messed up by use of the <em>python -m json.tool , </em>run the following command:</p><pre>python -m json.tool /home/zentral/conf/base.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1nsyyuk46vUO7wINqHIKZg.png" /></figure><p>We should see a successful json format validation result, then we can restart some services. If validation throws an error, we must correct them <em>(remember we can consult our original backup file)</em> until we’ve fixed the edit to be correct.</p><p>Next ew restart the workers with just this command:</p><pre>sudo systemctl restart zentral_workers</pre><p>As a successful result of the base.json edit &amp; restarting zentral_workers , we can discover the <em>inventory dummies worker</em> is no more running an also no more present in the Prometheus 2.0 targets section. This is expected behaviour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIPFbkZHC7y1-01b-jTBIw.png" /></figure><h4>Restarting services</h4><p>A service restart usually just take few seconds. Including service restart commands, here is an additional reference on command options. For systemctl the common start, stop, restart commands will apply.</p><p>To restart installed software components:</p><pre>sudo systemctl restart elasticsearch <br>sudo systemctl restart kibana</pre><p>To restart zentral workers:</p><pre>sudo systemctl restart zentral_workers</pre><p>To restart the Zentral web app (Nginx reverse proxy:</p><pre>sudo systemctl restart zentral_web_app</pre><p>Finally inside /home/zentral/app/utils we provide a tool to run general restart for all services:</p><pre>sudo /home/zentral/app/utils/reload_restart.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_KVn8z3utjUq3NxtrrntA.png" /></figure><h4>Run a status check</h4><p>We can validate the services status check with Ubuntu <a href="https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units">systemd</a> via the systemctl command. We could make use of a wildcard as well, i.e. we see all services with “zentral” prefix:</p><pre>systemctl status zentral*</pre><p>Here we see our example output, with all services running well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNs6krj-Oxr1nnXZ_87NDg.png" /></figure><h4>Inspect an error</h4><p>Let’s see another Example below, this time we look into a minor error message in the zentral_web_app:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jS1viS6Hm2EAS93ky-603g.png" /></figure><p>The error from systemctl status:</p><blockquote>exception ERROR Invalid HTTP_HOST header</blockquote><p>This indicate Gunicorn process started, but refers to a previous IP, that was set for the VM. An error like this could happen in case you’ve stopped an instance for a while. Unless you reserved the IP permanently, a later restart will assign a new external IP <em>(an external IP can be</em><a href="https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address"><em> reserved in GCP</em></a><em>)</em>.</p><p>From the log we see this minor error happen in the zentral_web_app service. Keep in mind we don’t need to restart the full VM, we can just restart a single service:</p><pre>systemctl restart zentral_web_app</pre><h4>Restarting services</h4><p>There are several options to restart services in Zentral on the unix level. A service restart usually just take few seconds.</p><p>As a short reference — here is a list of service commands to use. The common start, stop, restart command variations will apply:</p><p>To restart installed software :</p><pre>sudo systemctl restart elasticsearch <br>sudo systemctl restart kibana</pre><p>To restart workers:</p><pre>sudo systemctl restart zentral_workers</pre><p>To restart the Zentral web app:</p><pre>sudo systemctl restart zentral_web_app</pre><p>Finally in /home/zentral/app/utils we provide a tool to run combined restart of many services:</p><pre>sudo /home/zentral/app/utils/reload_restart.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_KVn8z3utjUq3NxtrrntA.png" /></figure><h4>Basic Log Viewing with journalsctl</h4><p>So next it’s nice to see the some system logs, for this we can reach out for <a href="https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs">journalctl</a> tool on Ubuntu / systemd</p><p>Inspect zentral_web.service:</p><pre>journalctl -u zentral_web.service</pre><p>or Nginx (optionally use some extra flags)</p><pre>journalctl -u nginx</pre><pre>journalctl -u nginx.service --since today</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Fs-tXj2EKLdHvERx8BJhQ.png" /></figure><pre>journalctl -u prometheus</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dhtQG-lzDnEGJ7aAeuR1sQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIPFbkZHC7y1-01b-jTBIw.png" /></figure><p>We see the inventory worker for dummies is no longer present in Prometheus 2.0 status page</p><h3>To archive devices in the Zentral</h3><p>We still see the dummy device entries. You can go and archive them by simply clicking “Archive” button. See the animation below for the simple steps to “archive” a device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7MLe06q4zqtKp-WSZeiGg.gif" /></figure><p><em>Note: OK, you may ask why do the dummies devices exist at all? Yes, we do see this require an extra hops to get rid off . Reasoning is we build open source code for Zentral with </em><a href="https://github.com/zentralopensource/zentral/tree/master/tests"><em>tests</em></a><em>. For this it’s just good to have initial device entry present, and the dummy heartbeats can help to test the workers code doesn’t get broken…and… </em>¯\_(ツ)_/¯</p><p>Now let’s back-check the heartbeats appearance in Kibana UI and now we can see the stream from “dummies” heartbeats has stopped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-wTHM_p_xJCDpjCscQDhQ.png" /></figure><h4>Wrap up</h4><p>This is the end of our third chapter. We have learned some backround of server side monitoring and basic systemd and journalctl tasks. Knowing of these in some detail help to inspect for server side errors. As next move we can read in Chapter 4 <em>(link provided soon)</em> how to enable a SingleSignOn configuration for Zentral.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e224e830140" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get up and running Zentral on Google Cloud Platform — Chapter 2]]></title>
            <link>https://macadmin-me.medium.com/zentral-on-gcp-tutorial-chapter2-f630e3c42709?source=rss-aea2f04f0fef------2</link>
            <guid isPermaLink="false">https://medium.com/p/f630e3c42709</guid>
            <category><![CDATA[zentral]]></category>
            <category><![CDATA[mac-admin]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Henry Stamerjohann]]></dc:creator>
            <pubDate>Wed, 14 Feb 2018 12:54:10 GMT</pubDate>
            <atom:updated>2018-02-25T13:37:55.639Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back to a tutorial series to run and explore <a href="https://github.com/zentralopensource/zentral/wiki">Zentral</a> in more detail. In this chapter we launch our “Zentral-all-in-one” instance. We setup our Let’s encrypt TLS certificate, create a admin user to login to Zentral web-interface, and prepare Kibana to show events from the zentral-events index.</p><p>The previous chapters and an overview on Zentral can be found for a review here:</p><ul><li><a href="https://medium.com/@zentral/zentral-ressources-74864bd9c646">Overview and Zentral ressources</a></li><li>Chapter 1 — <a href="https://medium.com/@zentral/zentral-on-gcp-tutorial-chapter1-2d872a8da1f7">Get up and running Zentral on Google Cloud Platform</a></li></ul><p>Now let’s start!</p><h3>Stage 3 — Startup the Zentral server</h3><p>We use the GCP admin web interface to open up a terminal session in the browser window, of course in long term to access your instance it’s useful to add a <a href="https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys">ssh-key </a>and access the server directly from Terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Cwu56Gw_hcBR34noQcRTQ.png" /></figure><p>We start a terminal session here to access via ssh — in our example we use a GCP feature to open up a terminal session right in the browser.</p><p><em>Note: Alternatively if you like to follow along on the command line, you can connect via SSH to the instance with </em><em>gcloud compute ssh [INSTANCE_NAME] . Read up the </em><a href="https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys"><em>GCP documentation</em></a><em> and our </em><a href="https://github.com/zentralopensource/zentral/wiki/deployment-gcp#google-cloud--gcloud-setup"><em>wiki</em></a><em> for the CLI based steps.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFqy8WNbPpp-JJv8naecuw.png" /></figure><p>Once logged in we see there are updates available for Ubuntu and the pre-installed software. Please do so, goand update now! It’s good practice to apply updates whenavailable. We run the classic <a href="https://www.debian.org/derivatives/">Debian</a> based sudo apt-get update and sudo apt-get upgrade commands here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVs2T1NN78hWNqkzd1Z9Eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TPm0Q1QXaeFIKArT8yCWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqQBvTSlUQBUYQP0cL-fVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_fWNXsRi-y72dbTrt2cmVw.png" /></figure><p>When asked we should agree and continue to install new versions. Be aware these are likely to include latest updates for <a href="https://www.elastic.co/products">ElasticStack</a> components. The update process will usually stop, and ask if you want to keep the “current version”. As default you’ll type “N” to keep the existing configuration file. Stick with the default, follow as we do here, be safe and not break things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZfiek4S8vodUZQQQSugVQ.png" /><figcaption>apt-get upgrades..</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2C7HtH1k_N6amqFxVPGFw.png" /><figcaption>in progress…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJ3pJEqhX5WJ4cUBmpDElQ.png" /><figcaption>apt install asks for specific update Kibana here</figcaption></figure><p>We do manually perform the general (linux)sysadmin tasks here. And yes we do agree<em>, </em>outside of a tutorial<em> </em>there’s valid reason to use a config management tool like <a href="https://puppet.com/">Puppet</a>, <a href="https://www.chef.io/chef/">Chef</a>, <a href="https://saltstack.com/">Salt</a> or <a href="https://www.ansible.com/">Ansible</a> for extensive server administrations. However to introduce such here as well is just beyond our scope for obvious reasons<em> (our posts are already extensive).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxGQmdxSg0r645KIxUN_Ig.png" /><figcaption>now an ElasticSearch update…</figcaption></figure><p>Keep attention as we likely have installed new versions from the <a href="https://www.elastic.co/guide/en/elastic-stack/current/elastic-stack.html">elastic stack</a>. It’s good practice to make sure these have restarted after an update applied. For this purpose we best go to run a <a href="https://www.digitalocean.com/community/tutorials/systemd-essentials-working-with-services-units-and-the-journal"><em>sytemctl</em></a> command <em>(we‘ll cover some more that in upcoming chapter 3).</em></p><pre>sudo systemctl restart elasticsearch <br>sudo systemctl restart kibana</pre><p>Now finally we’re almost ready to start the Zentral with the <em>setup.py</em> tool — the tool can be found in the<em>/home/zentral/app/utils</em> directory. This tool will help create your custom TLS setup for <a href="https://nginx.org/">Nginx</a>, it automatically acquires a certificate from <a href="https://letsencrypt.org/how-it-works/">Let’s Encrypt</a>. Furthermore you’ll get a temporary link to set the (super) user password after at the end of successful run.</p><p>For a proper setup to work well, you must adjust the command below and match your FQDN (i.e. <em>zentral.example.org</em>) , pick your username and email.</p><pre>sudo /home/zentral/app/utils/setup.py zentral.example.org henry henry@example.org</pre><p><em>Note: Depending on your browser language setting, you might run into problems typing @ for the email address. The gearwheel allow to change your terminal settings or copy/paste @ symbol from elsewhere is your friend;-)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j04sAPmSSSl0-Xx0oTWD_g.png" /></figure><p>The process should finish in about 30–40 seconds. Follow the command progress as displayed in screenshots below.</p><p><em>Note: In case you’ll in need of a self-signed TLS option , go inspect the extra arguments in </em><em>/home/zentral/app/utils/setup.py for </em><em>--self-signed-cert .</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kkFICMF0YU0Hao3kSkiJWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkeNCiLVILPVc9rDFsfHzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lng4uJNYGbZBrfaRrGIsGQ.png" /></figure><p>Next copy/paste the Password reset link from terminal to your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIugsehCso0IHzj138b6-A.png" /></figure><p>In the web interface set a password, then sign in<em> (again see the screenshots for the steps).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sz2ycHgurfto4Q-a9Lz_GQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rdjkz4nHrU5mvmsJ_qQsA.png" /></figure><p>Congratulations Zentral is up and running! Go validate your TLS certificate…it will work well for use with <a href="https://osquery.io/">OSQuery</a>, <a href="https://github.com/google/santa">Google Santa</a>.</p><blockquote>Yay, we have a trusted certificate already. Thanks again to <a href="https://letsencrypt.org/">Let’s Encrypt</a> for making this service available for free!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rftX6NeRomT-3-aWXbl6iw.png" /></figure><h3>Stage 4— Setup Kibana read from “zentral-events” ElasticSearch index</h3><p>We want to see and discover all the events Zentral stores into a ElasticSearch index. Right now this step has to be performed manually — as time of this writing we don’t know ElasticSearch/Kibana APIs to allow to run automated.</p><p>We navigate to “Extra links” section in the Zentral UI and click “Kibana” entry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hRXsA706ZGVpWk5O1UEug.png" /></figure><p>In Kibana we now have to create the index pattern used for visualisation. The index name is: <strong>zentral-events</strong> , for the setup steps see the screenshots below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VaWWETl6gSJlIc1D2CCiUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8OtM2Uiv9x9EDXBpXEwYA.png" /><figcaption>Kibana index pattern setup</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nK1LX2fly-0j_CUG3lhm6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pq1avC_r8kQlu8OKdxJ4g.png" /><figcaption>Kibana time filtered field setup</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRrICr9mhxPZ0D8gp9_Ygw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FpqIyyC5mf0IubsA_1oN7w.png" /><figcaption>Create index pattern</figcaption></figure><p>Now in Kibana we see events are already in the index, we see should see some heartbeat events to be updated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oSQokUoeyCkNaqNwwoAMmA.png" /></figure><h3>Stage 5— Enable second factor for login</h3><p>In case you like to limit the access to Zentral with two factor authentication‎ we provide some options. Out of the box you can use a second factor for authentication:</p><ul><li>Time-based One-Time Password (<a href="https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm">TOTP</a>)</li><li>use a <a href="https://www.yubico.com/start/">YubiKey</a>.</li></ul><h4>Setup Time-based One-Time Password</h4><p>In the user setting go to “verification devices”. Note you can setup multiple methods here for a single user account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmIwIsTmauruETBiti3XdA.png" /></figure><p>For TOTP to work you must use a mobile app like <a href="https://itunes.apple.com/de/app/google-authenticator/id388497605?mt=8">Google Authenticator</a>, or Duo Labs <a href="https://duo.com/product/trusted-users/two-factor-authentication/duo-mobile">Duo Mobile</a> , alternatively <a href="https://blog.agilebits.com/2015/01/26/totp-for-1password-users/">1Password</a> (running on iOS, Android or macOS) can help to setup the the <a href="https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm">TOTP</a> feature in less than a minute.</p><ol><li>Select the Verification device type.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ld-dp2c5MBd676FGbTWVrw.png" /></figure><p>2. Set a name for the device</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LeZruF4oEhzqN2eIboMV0w.png" /></figure><p>3. Scan the QR code with the app</p><p>4. Enter the verification code and save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGGy-s7Cb-K8_toZSOCQeA.png" /></figure><p>From now on you can login only with a second factor.</p><h4>YubiKey setup</h4><p>Alternatively you can use a <a href="https://www.yubico.com/start/">YubiKey</a> as U2F device. But this will only work well in supported browsers (so no Safari supported).<br>Right now supported browsers are Chrome 63.x or later &amp; Firefox 57.x or later</p><p>Setup again is a very simple 1,2,3... like procedure.</p><p>With your YubiKey attached to the computer, logged into Zentral with a compatible browser:</p><ol><li>Set a device name</li><li>Touch the YubiKey</li><li>Now you should see already your entry. Zentral 2FA now works with your YubiKey :-)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E4PqIzOpuacr7TJHJalOMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9k08f1Z9MxnAvM6Fl0DXtw.png" /><figcaption>YubiKey setup</figcaption></figure><h4>Wrap up</h4><p>This is the end of our second chapter. We have managed to get Zentral up and running on GCP <em>(or AWS)</em>. We’ve setup Kibana index and see how simple 2FA can work with Zentral. As next move we can dive into <a href="https://medium.com/@zentral/zentral-on-gcp-tutorial-chapter3-1e224e830140">Chapter 3</a> to learn more about process inspection, Prometheus 2.0 and the base.yml configuration in Zentral.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f630e3c42709" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>