<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>InfluxData Blog - Craig Hobbs</title>
    <description>Posts by Craig Hobbs on the InfluxData Blog</description>
    <link>https://www.influxdata.com/blog/author/craig-hobbs/</link>
    <language>en-us</language>
    <lastBuildDate>Wed, 19 Jun 2019 09:30:41 -0700</lastBuildDate>
    <pubDate>Wed, 19 Jun 2019 09:30:41 -0700</pubDate>
    <ttl>1800</ttl>
    <item>
      <title>Building a Data Stream for IoT with NiFi and InfluxDB</title>
      <description>&lt;p&gt;&lt;a href="https://nifi.apache.org/"&gt;Apache NiFi&lt;/a&gt; has been a game changer in the world of IoT, allowing you to automate the transformation and flow of data from IoT, and any edge, sensor to just about anywhere you want. In addition to supporting mission-critical data volumes with rigorous security, data provenance and compliance requirements, NiFi provides developers with a drag-and-drop UI for flow-based programming and automatic “real-time” deployment of new flows.&lt;/p&gt;

&lt;p&gt;By combining NiFi &amp;amp; InfluxDB, industries can easily make their IoT data streams securely accessible and usable. This solution enables the enterprise to have a &lt;strong&gt;single view&lt;/strong&gt; of data across all facilities providing for proactive maintenance, failure detection, and other business-based outcomes.&lt;/p&gt;

&lt;h2&gt;The IoT challenge: OPC-based data&lt;/h2&gt;

&lt;p&gt;For this example, we will look at &lt;a href="https://opcfoundation.org/about/opc-technologies/opc-ua/"&gt;OPC data&lt;/a&gt; from factory automation and process manufacturing. OPC gives production and business applications across the manufacturing enterprise access to real-time plant-floor information in a consistent manner. However, a common challenge with our enterprise clients is how to connect their facility or enterprise historians with a modern toolset and analytics pipeline while also guaranteeing continuous data flow between them.&lt;/p&gt;

&lt;p&gt;Here’s where the NiFi &amp;amp; InfluxDB platform combination can provide a powerful solution in a matter of minutes to securely collect, observe and act on your facility data.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-1.png" alt="Building data stream for IoT" width="929" height="349" /&gt;&lt;/p&gt;

&lt;h2&gt;Get started with the NiFi-OPCUA-bundle&lt;/h2&gt;

&lt;p&gt;Begin by downloading the following NiFi Service &amp;amp; Processor bundle from the &lt;a href="https://github.com/hashmapinc/nifi-opcua-bundle"&gt;Tempus IIoT framework&lt;/a&gt; for industrial data ingestion and analysis. These processors and the associated controller service allow NiFi access to &lt;a href="https://www.influxdata.com/glossary/opc-ua/"&gt;OPC UA&lt;/a&gt; servers in a read-only fashion.&lt;/p&gt;

&lt;p&gt;You will find 2 processors in the Tempus bundle, &lt;strong&gt;GetOPCNodeList&lt;/strong&gt; and &lt;strong&gt;GetOPCData&lt;/strong&gt;. GetNodeIds allows access to the tags that are currently in the OPC UA server. GetOPCData takes a list of tags and queries the OPC UA server for the values.&lt;/p&gt;

&lt;h2&gt;Configuring the GetNodeList processor&lt;/h2&gt;

&lt;p&gt;Start by adding the &lt;strong&gt;GetOPCNodeList&lt;/strong&gt; processor to the NiFi canvas:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-get-node-list-processor-2.png" alt="Get node list processor" width="1099" height="849" /&gt;&lt;/p&gt;

&lt;p&gt;After adding, right click the &lt;strong&gt;GetOPCNodeList&lt;/strong&gt; processor and select Configure. On the PROPERTIES tab select value box for the &lt;code class="language-markup"&gt;OPC UA Service Property&lt;/code&gt; field and pick Create new service on the following dialog and to add a new instance of the &lt;strong&gt;StandardOPCUAService&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-opcua-service-property-3.png" alt="OPCUA Service Property" width="1039" height="728" /&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Next, configure the processor filter so it will only return the node-list tag items you’re interested in fetching. Use the &lt;code class="language-markup"&gt;Node Filter Property&lt;/code&gt; to define a pipe(&lt;/td&gt;
      &lt;td&gt;) delimited regular express list of nodes.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Additionally, you will want to set the &lt;code class="language-markup"&gt;Recursive Depth Property&lt;/code&gt; for how many branches “deep” the processor will browse into the OPC server’s namespace.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-configure-processor-screenshot-4.png" alt="Configure processor" width="1169" height="893" /&gt;&lt;/p&gt;

&lt;p&gt;When you are done configuring the processor, click on the edit arrow icon to the right of the controller service. This will take you to the controller service configuration window.&lt;/p&gt;

&lt;p&gt;Begin editing the &lt;strong&gt;StandardOPCUAService&lt;/strong&gt; controller by entering the endpoint information of your OPC UA server:&lt;/p&gt;

&lt;p&gt;Next, update the security settings handshake mode to match one of the available modes on your OPC-Server:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-configure-controller-service-5.png" alt="Configure controller service" width="1098" height="842" /&gt;&lt;/p&gt;

&lt;p&gt;Set the &lt;code class="language-markup"&gt;Authentication Policy Property&lt;/code&gt; to define how NiFi should authenticate with the UA server. Here, in addition to the Security Policy mode, I’ve added username/password credentials for access.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-authentication-policy-property-6.png" alt="Authentication policy property" width="1217" height="936" /&gt;&lt;/p&gt;

&lt;p&gt;You now have the information needed to access the OPC-Server. Once the configuration of the controller is complete, click apply and enable the controller.&lt;/p&gt;

&lt;h2&gt;Configuring the GetOPCData processor&lt;/h2&gt;

&lt;p&gt;Next, add the &lt;strong&gt;GetOPCData&lt;/strong&gt; OPC processor to your NiFi canvas. Right-click on the processor and select Configure from the context menu to configure the processor. Click on the PROPERTIES tab and fill out the information as below.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-get-opc-data-7.png" alt="Get OPC data" width="1164" height="889" /&gt;&lt;/p&gt;

&lt;h2&gt;Schema Registry service for record-based flow&lt;/h2&gt;

&lt;p&gt;The output data from the &lt;strong&gt;GetOPCData&lt;/strong&gt; processor essentially produces CSV style data (minus the header) in the format of tag name, time stamp, value and status.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-schema-registry-service-8.png" alt="Schema registry service" width="1138" height="570" /&gt;&lt;/p&gt;

&lt;p&gt;We’ll now add the &lt;strong&gt;AvroSchemaRegistry&lt;/strong&gt; controller service. This tells the record-based processors how to interpret the OPC Tag items.&lt;/p&gt;

&lt;p&gt;That service will be added the same way we added the &lt;strong&gt;OPCUAClientService&lt;/strong&gt;?. Click on the edit arrow icon again in the &lt;strong&gt;GetOPCData&lt;/strong&gt; processor to configure.&lt;/p&gt;

&lt;p&gt;Next, in the upper righthand corner of the NiFi Flow Configuration screen, click on the plus (+) icon to add a new Controller Service:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/Building-data-stream-for-IoT-add-new-controller-service-9.png" alt="Add new controller service" width="1088" height="844" /&gt;&lt;/p&gt;

&lt;p&gt;Add the &lt;strong&gt;AvroSchemaRegistry&lt;/strong&gt; to the Controller Services. Each property is essentially a name schema pair that the flow can then use to relate a piece of data to a schema.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-avro-schema-registry-10.png" alt="Building data stream" width="1064" height="817" /&gt;&lt;/p&gt;

&lt;p&gt;Add the property by clicking the plus icon and naming it &lt;strong&gt;opcData&lt;/strong&gt;, and then copying the avro into the value.&lt;/p&gt;

&lt;p&gt;Schema will look like the avro below:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;{
  "type": "record",
  "name": "opcData",
  "fields": [
    { "name": "uri", "type": "string" },
    { "name": "ts", "type": "string" },
    { "name": "value", "type": "float" },
    { "name": "status", "type": "int" }
     ]
  }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You now have the information needed to access the OPC-Server. Once the configuration of the controller is complete, click apply and enable the controller.&lt;/p&gt;

&lt;p&gt;You now have the information needed to use the dynamic avro schema for reading the OPC-Data records. Once the configuration is complete, click apply and enable the controller.&lt;/p&gt;

&lt;h2&gt;InfluxDB record processor for Apache NiFi&lt;/h2&gt;

&lt;p&gt;Now it’s time to connect the InfluxDB processor to ingest the OPC data records. To provide the best possible ingest performance, InfluxDB has created a new processor that is based on NiFi Record Design.&lt;/p&gt;

&lt;h3&gt;Getting started:&lt;/h3&gt;

&lt;p&gt;Download and install the InfluxDB Processors. Copy the appropriate nar file into the lib directory of your NiFi installation ($NiFi_HOME/lib) and restart NiFi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/influxdata/nifi-influxdb-bundle"&gt;https://github.com/influxdata/nifi-influxdb-bundle&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Head back to the NiFi canvas and add the &lt;strong&gt;PutInfluxDatabasesRecord&lt;/strong&gt; processor. Connect it to the previous &lt;strong&gt;GetOPCData&lt;/strong&gt; processor:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-PutInfluxDatabasesRecord-11.png" alt="PutInfluxDatabasesRecord" width="1148" height="976" /&gt;&lt;/p&gt;

&lt;p&gt;Right click to configure the processor and select the PROPERTIES tab. Start with the &lt;code class="language-markup"&gt;Record Reader Property&lt;/code&gt;, and select the &lt;strong&gt;CSVReader&lt;/strong&gt; controller service.&lt;/p&gt;

&lt;p&gt;After adding, click on the edit arrow icon to configure:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-CSVReader-12.png" alt="CSVReader" width="1151" height="881" /&gt;&lt;/p&gt;

&lt;p&gt;In the controller service properties of the &lt;strong&gt;CSVReader&lt;/strong&gt;, you will set the Schema Access Strategy and Schema Name:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-schema-access-strategy-13.png" alt="Schema access strategy" width="1195" height="922" /&gt;&lt;/p&gt;

&lt;p&gt;We have previously registered our OPC-Data avro schema with the name &lt;strong&gt;opcData&lt;/strong&gt;. Click apply and enable the controller services.&lt;/p&gt;

&lt;p&gt;Return to the &lt;strong&gt;PutInfluxDatabasesRecord&lt;/strong&gt; processor and go back to the properties tab. You will want to create a new &lt;strong&gt;StandardInfluxDatabaseService&lt;/strong&gt; to the InfluxDB Controller Service property.&lt;/p&gt;

&lt;p&gt;After creating the service, click on the edit arrow icon to configure:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-StandardInfluxDatabaseService-14.png" alt="StandardInfluxDatabaseService" width="1233" height="946" /&gt;&lt;/p&gt;

&lt;p&gt;From the service configuration window, define your InfluxDB database, URL and access credentials. This will create a shareable connection service for all NiFi processors:&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-NiFi-processors-15.png" alt="NiFi processors" width="1285" height="985" /&gt;&lt;/p&gt;

&lt;p&gt;When finished, click apply and enable the &lt;strong&gt;StandardInfluxDatabaseService&lt;/strong&gt; controller.&lt;/p&gt;

&lt;p&gt;Finally, going back to the properties tab of your &lt;strong&gt;PutInfluxDatabasesRecord&lt;/strong&gt; processor, you can now set the specified properties to write the content of the Records into InfluxDB database.&lt;/p&gt;

&lt;p&gt;Since our record does not contain a field with a &lt;code class="language-markup"&gt;Measurement&lt;/code&gt; property value, we will simply set it to an arbitrary name (opc):&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-measurement-tags-fields-16.png" alt="Measurement tags fields" width="1267" height="970" /&gt;&lt;/p&gt;

&lt;p&gt;Using the name pairs from our schema, set the &lt;code class="language-markup"&gt;Tags&lt;/code&gt;, &lt;code class="language-markup"&gt;Fields&lt;/code&gt;, and &lt;code class="language-markup"&gt;Timestamp&lt;/code&gt; properties to names defined in the opcData schema.&lt;/p&gt;

&lt;h2&gt;Final processor flow and controller services&lt;/h2&gt;

&lt;p&gt;Finally, bringing all the processors and controllers enables a flow solution that intelligently collects and transmits more data to the data center over the WAN when a certain condition is met (high pump pressures are being recorded even when the downstream pumps are off). Once the controller services configuration is complete, it only takes about 5 more minutes to configure the flow.&lt;/p&gt;

&lt;h3&gt;Controller services:&lt;/h3&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-NiFi-flow-configuration-17.png" alt="NiFi flow configuration" width="1293" height="310" /&gt;&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;AvroSchemaRegistry&lt;/code&gt; - Service for registering and accessing schemas&lt;/li&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;CSVReader&lt;/code&gt; - Parses CSV-formatted data, returning each row in the file as a record&lt;/li&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;StandardInfluxDatabaseService&lt;/code&gt; - Service that provides connection to InfluxDB&lt;/li&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;StandardOPCUAService&lt;/code&gt; - Fetches a response from an OPC UA server&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Process flow:&lt;/h3&gt;
&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-OPCUA-ingestion-18.png" alt="OPCUA ingestion" width="1279" height="487" /&gt;&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;GetOPCNodeList&lt;/code&gt; - Access to tags currently in the OPC UA serve&lt;/li&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;GetOPCData&lt;/code&gt; - Fetches values from the OPC UA server&lt;/li&gt;
 	&lt;li&gt;&lt;code class="language-markup"&gt;PutInfluxDatabaseRecord&lt;/code&gt; - Write NiFi Record structured into InfluxDB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now all that’s left is to start your NiFi flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Consider the above flow sample for &lt;strong&gt;test only&lt;/strong&gt;. In a production setting, you ideally would have more error handling processors and redirect queues.&lt;/p&gt;
&lt;h2&gt;Explore your data in Chronograf&lt;/h2&gt;
&lt;p&gt;You can now easily&lt;a href="http://localhost:8888/"&gt; jump into Chronograf&lt;/a&gt; and start creating dashboards on your sensor data. Click on Data Explorer, and find other sensor fields in the &lt;strong&gt;nifi.autogen &lt;/strong&gt;database. Once you start seeing data, you can begin creating some dashboards.Note: Consider the above flow sample for test only. In a production setting, you ideally would have more error handling processors and redirect queues.&lt;/p&gt;

&lt;p&gt;&lt;img class="border-grey" src="/images/legacy-uploads/building-data-stream-iot-industrial-automation-NiFi-19.png" alt="Industrial automation NiFi" width="1284" height="696" /&gt;&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;If you’re limited by the analytics capabilities of your traditional systems and are looking to leverage your OPC-based data in a more modern toolset, NiFi + InfluxDB make for a powerful combination that you can deploy quickly and securely.&lt;/p&gt;

&lt;p&gt;Using this combination, administrators can easily and quickly integrate into enterprise-wide automation and business systems. System integrators can removing legacy barriers between traditionally proprietary factory floor devices and other manufacturing software.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/legacy-uploads/building-data-stream-iot-enterprise-autoation-systems.gif" alt="Enterprise automation systems" width="552" height="306" /&gt;&lt;/p&gt;
</description>
      <pubDate>Wed, 19 Jun 2019 09:30:41 -0700</pubDate>
      <link>https://www.influxdata.com/blog/building-a-data-stream-for-iot-with-nifi-and-influxdb/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/building-a-data-stream-for-iot-with-nifi-and-influxdb/</guid>
      <category>Product</category>
      <category>Use Cases</category>
      <category>Developer</category>
      <author>Craig Hobbs (InfluxData)</author>
    </item>
    <item>
      <title>Securing Chronograf with OAuth 2.0 in Microsoft Azure Active Directory</title>
      <description>&lt;p&gt;While we typically receive questions on how to secure access to the backend datastore, in some cases it’s more practical to place the security on the front door application.&lt;/p&gt;

&lt;p&gt;If your organization uses an identity provider that includes support for OAuth2, the Chronograf application can be easily configured to add support for user authorization and authentication. In this example, we will show how to quickly configure Chronograf with the proper metadata from Microsoft Azure Active Directory (Azure AD).&lt;/p&gt;

&lt;p&gt;Azure AD is built on top of the OAuth2 protocol which defines several methods of authentication that ultimately end with users obtaining an access token for authenticating against a given resource.&lt;/p&gt;

&lt;p&gt;In this workflow, users will be redirected from the Chronograf application to their Microsoft Azure login screen. There, individuals will be prompted to enter an email and password before gaining access to the application resource.&lt;/p&gt;
&lt;h2&gt;Create Azure AD Application:&lt;/h2&gt;
&lt;p&gt;Let’s begin by creating a new application within the Azure Active Directory. You can find a detailed description outlining the process here: &lt;a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#create-an-azure-active-directory-application"&gt;Create an Azure Active Directory application&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you’ve provisioned the Chronograf app, you can assign users and groups to the application or choose to make it accessible to all users within your tenant.&lt;/p&gt;

&lt;p&gt;You will next want to note down the following metadata information: &amp;lt;&lt;code class="language-markup"&gt;APPLICATION-ID&lt;/code&gt;&amp;gt;, &amp;lt;&lt;code class="language-markup"&gt;TENANT-ID&lt;/code&gt;&amp;gt; and &amp;lt;&lt;code class="language-markup"&gt;APPLICATION-KEY&lt;/code&gt;&amp;gt;. These values will be used to define your Chronograf environment and successfully authenticate user with access.&lt;/p&gt;
&lt;h2&gt;Get Tenant ID:&lt;/h2&gt;
&lt;p&gt;&lt;img class="size-full wp-image-221572 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-1.png" alt="" width="1212" height="544" /&gt;&lt;/p&gt;
&lt;h2&gt;Get Application ID and Application KEY:&lt;/h2&gt;
&lt;p&gt;&lt;img class="size-full wp-image-221573 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-2.png" alt="" width="1194" height="648" /&gt;&lt;/p&gt;

&lt;p&gt;After saving the key, the value of the key is displayed. Copy this value because you aren’t able to retrieve the key later.&lt;/p&gt;

&lt;p&gt;&lt;img class="size-full wp-image-221574 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-3.png" alt="" width="1198" height="528" /&gt;&lt;/p&gt;
&lt;h2&gt;Register Callback URL:&lt;/h2&gt;
&lt;p&gt;Be sure to register a reply URL in your Azure application settings. This should match the calling URL from Chronograf. Otherwise, you will get an error stating no reply address is registered for the application.  For example, if Chronograf is configured with a &amp;lt;GENERIC_NAME&amp;gt; value of &lt;code class="language-markup"&gt;AzureAD&lt;/code&gt;, the reply URL would be &lt;code class="language-markup"&gt;http://localhost:8888/AzureAD/callback&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/em&gt; If you’ ve additionally configured &lt;a href="https://docs.influxdata.com/chronograf/v1.7/administration/managing-security/#configuring-tls-transport-layer-security-and-https"&gt;TLS/SSL security for Chronograf&lt;/a&gt;, you will need to modify the protocol to make sure you have https:// protocol (not http://).&lt;/p&gt;

&lt;p&gt;&lt;img class="alignnone size-full wp-image-221578 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-4.png" alt="" width="1196" height="476" /&gt;&lt;/p&gt;
&lt;h2&gt;Chronograf Configuration:&lt;/h2&gt;
&lt;p&gt;After completing the application provisioning within Azure AD, you can now complete the configuration with Chronograf. Using the metadata from your Azure AD instance, proceed to export the following environment variables:&lt;/p&gt;

&lt;p&gt;Exports for Chronograf (e.g. in /etc/default.chronograf):&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;GENERIC_TOKEN_URL=&lt;code class="language-markup"&gt;https://login.microsoftonline.com/&amp;lt;&amp;lt;TENANT-ID&amp;gt;&amp;gt;/oauth2/token&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;TENANT=&amp;lt;&amp;lt;&lt;code class="language-markup"&gt;TENANT-ID&lt;/code&gt;&amp;gt;&amp;gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_NAME=&lt;code class="language-markup"&gt;AzureAD&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_API_KEY=&lt;code class="language-markup"&gt;userPrincipalName&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_SCOPES=&lt;code class="language-markup"&gt;openid&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_CLIENT_ID=&amp;lt;&amp;lt;&lt;code class="language-markup"&gt;APPLICATION-ID&lt;/code&gt;&amp;gt;&amp;gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_AUTH_URL=&lt;code class="language-markup"&gt;https://login.microsoftonline.com/&amp;lt;&amp;lt;TENANT-ID&amp;gt;&amp;gt;/oauth2/authorize?resource=https://graph.windows.net&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_CLIENT_SECRET=&amp;lt;&amp;lt;&lt;code class="language-markup"&gt;APPLICATION-KEY&lt;/code&gt;&amp;gt;&amp;gt;&lt;/li&gt;
 	&lt;li&gt;TOKEN_SECRET=&lt;code class="language-markup"&gt;secret&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;GENERIC_API_URL=&lt;code class="language-markup"&gt;https://graph.windows.net/&amp;lt;&amp;lt;TENANT-ID&amp;gt;&amp;gt;/me?api-version=1.6&lt;/code&gt;&lt;/li&gt;
 	&lt;li&gt;PUBLIC_URL=&lt;code class="language-markup"&gt;http://localhost:8888&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;User Login:&lt;/h2&gt;
&lt;p&gt;Now, start Chronograf and navigate to the Web UI ( &lt;strong&gt;localhost:8888&lt;/strong&gt; ). You will be presented with a new screen that will include an option to use the newly configured authentication type.&lt;/p&gt;

&lt;p&gt;&lt;img class=" wp-image-221579 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-5.png" alt="" width="1244" height="721" /&gt;&lt;/p&gt;

&lt;p&gt;The user will be redirected to the authorization endpoint where they will enter their email and password for authentication with Azure AD.&lt;/p&gt;

&lt;p&gt;&lt;img class=" wp-image-221580 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-6.png" alt="" width="1258" height="708" /&gt;&lt;/p&gt;

&lt;p&gt;Users who login successfully will get the authorization code proving they just logged-in. The user is now authenticated and will be taken into the Chronograf Web-UI with role access maintained by their Azure AD profile or default set by the Chronograf administrator.&lt;/p&gt;

&lt;p&gt;&lt;img class="alignnone wp-image-221582 aligncenter" src="/images/legacy-uploads/securing-chronograf-with-oauth-2.0-in-microsoft-azure-activity-directory-7-1.png" alt="" width="1115" height="696" /&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion:&lt;/h2&gt;
&lt;p&gt;For those of you who just need to restrict access to the Web-UI, leveraging your Microsoft Azure Active Directory can be a quick and easy way to add a centralized layer of user security.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;
</description>
      <pubDate>Mon, 17 Dec 2018 11:35:20 -0700</pubDate>
      <link>https://www.influxdata.com/blog/securing-chronograf-with-oauth-2-0-in-microsoft-azure-active-directory/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/securing-chronograf-with-oauth-2-0-in-microsoft-azure-active-directory/</guid>
      <category>Developer</category>
      <author>Craig Hobbs (InfluxData)</author>
    </item>
  </channel>
</rss>
