Skip to content

Instantly share code, notes, and snippets.

@alopresto
Created May 22, 2017 22:11
Show Gist options
  • Save alopresto/dca35c3758ad09f2eb8e23f2e3204367 to your computer and use it in GitHub Desktop.
Save alopresto/dca35c3758ad09f2eb8e23f2e3204367 to your computer and use it in GitHub Desktop.
An Apache NiFi flow definition which uses a `GetHTTP` and an `InvokeHTTP` processor to verify that the `SSLPeerUnverifiedException` issue is resolved when connecting to `https://googleapis.com`.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flowController encoding-version="1.1">
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
<maxEventDrivenThreadCount>5</maxEventDrivenThreadCount>
<rootGroup>
<id>31d11ade-015c-1000-9dc6-0d21547d5a8d</id>
<name>NiFi Flow</name>
<position x="0.0" y="0.0"/>
<comment/>
<processor>
<id>31d14773-015c-1000-ca53-529cf87acf87</id>
<name>GetHTTP</name>
<position x="260.0" y="53.0"/>
<styles/>
<comment/>
<class>org.apache.nifi.processors.standard.GetHTTP</class>
<bundle>
<group>org.apache.nifi</group>
<artifact>nifi-standard-nar</artifact>
<version>1.3.0-SNAPSHOT</version>
</bundle>
<maxConcurrentTasks>1</maxConcurrentTasks>
<schedulingPeriod>3 sec</schedulingPeriod>
<penalizationPeriod>30 sec</penalizationPeriod>
<yieldPeriod>1 sec</yieldPeriod>
<bulletinLevel>WARN</bulletinLevel>
<lossTolerant>false</lossTolerant>
<scheduledState>STOPPED</scheduledState>
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
<executionNode>ALL</executionNode>
<runDurationNanos>0</runDurationNanos>
<property>
<name>URL</name>
<value>https://www.googleapis.com/youtube/v3/commentThreads?key=</value>
</property>
<property>
<name>Filename</name>
<value>${now():toNumber()}</value>
</property>
<property>
<name>SSL Context Service</name>
<value>31d40935-015c-1000-15bc-521a919c98c0</value>
</property>
<property>
<name>Username</name>
</property>
<property>
<name>Password</name>
</property>
<property>
<name>Connection Timeout</name>
<value>30 sec</value>
</property>
<property>
<name>Data Timeout</name>
<value>30 sec</value>
</property>
<property>
<name>User Agent</name>
</property>
<property>
<name>Accept Content-Type</name>
</property>
<property>
<name>Follow Redirects</name>
<value>false</value>
</property>
<property>
<name>redirect-cookie-policy</name>
<value>default</value>
</property>
<property>
<name>Proxy Host</name>
</property>
<property>
<name>Proxy Port</name>
</property>
</processor>
<processor>
<id>31d58808-015c-1000-81ce-6ac9810a047a</id>
<name>LogAttribute</name>
<position x="477.0" y="361.0"/>
<styles/>
<comment/>
<class>org.apache.nifi.processors.standard.LogAttribute</class>
<bundle>
<group>org.apache.nifi</group>
<artifact>nifi-standard-nar</artifact>
<version>1.3.0-SNAPSHOT</version>
</bundle>
<maxConcurrentTasks>1</maxConcurrentTasks>
<schedulingPeriod>0 sec</schedulingPeriod>
<penalizationPeriod>30 sec</penalizationPeriod>
<yieldPeriod>1 sec</yieldPeriod>
<bulletinLevel>WARN</bulletinLevel>
<lossTolerant>false</lossTolerant>
<scheduledState>STOPPED</scheduledState>
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
<executionNode>ALL</executionNode>
<runDurationNanos>0</runDurationNanos>
<property>
<name>Log Level</name>
<value>info</value>
</property>
<property>
<name>Log Payload</name>
<value>true</value>
</property>
<property>
<name>Attributes to Log</name>
</property>
<property>
<name>Attributes to Ignore</name>
</property>
<property>
<name>Log prefix</name>
</property>
<autoTerminatedRelationship>success</autoTerminatedRelationship>
</processor>
<processor>
<id>31d16701-015c-1000-9050-727ba9a74f0d</id>
<name>InvokeHTTP</name>
<position x="698.0" y="53.0"/>
<styles/>
<comment/>
<class>org.apache.nifi.processors.standard.InvokeHTTP</class>
<bundle>
<group>org.apache.nifi</group>
<artifact>nifi-standard-nar</artifact>
<version>1.3.0-SNAPSHOT</version>
</bundle>
<maxConcurrentTasks>1</maxConcurrentTasks>
<schedulingPeriod>3 sec</schedulingPeriod>
<penalizationPeriod>30 sec</penalizationPeriod>
<yieldPeriod>1 sec</yieldPeriod>
<bulletinLevel>WARN</bulletinLevel>
<lossTolerant>false</lossTolerant>
<scheduledState>STOPPED</scheduledState>
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
<executionNode>ALL</executionNode>
<runDurationNanos>0</runDurationNanos>
<property>
<name>HTTP Method</name>
<value>GET</value>
</property>
<property>
<name>Remote URL</name>
<value>https://www.googleapis.com/youtube/v3/commentThreads?key=</value>
</property>
<property>
<name>SSL Context Service</name>
<value>31d40935-015c-1000-15bc-521a919c98c0</value>
</property>
<property>
<name>Connection Timeout</name>
<value>5 secs</value>
</property>
<property>
<name>Read Timeout</name>
<value>15 secs</value>
</property>
<property>
<name>Include Date Header</name>
<value>True</value>
</property>
<property>
<name>Follow Redirects</name>
<value>True</value>
</property>
<property>
<name>Attributes to Send</name>
</property>
<property>
<name>Basic Authentication Username</name>
</property>
<property>
<name>Basic Authentication Password</name>
</property>
<property>
<name>Proxy Host</name>
</property>
<property>
<name>Proxy Port</name>
</property>
<property>
<name>invokehttp-proxy-user</name>
</property>
<property>
<name>invokehttp-proxy-password</name>
</property>
<property>
<name>Put Response Body In Attribute</name>
</property>
<property>
<name>Max Length To Put In Attribute</name>
<value>256</value>
</property>
<property>
<name>Digest Authentication</name>
<value>false</value>
</property>
<property>
<name>Always Output Response</name>
<value>false</value>
</property>
<property>
<name>Trusted Hostname</name>
</property>
<property>
<name>Add Response Headers to Request</name>
<value>false</value>
</property>
<property>
<name>Content-Type</name>
<value>${mime.type}</value>
</property>
<property>
<name>send-message-body</name>
<value>true</value>
</property>
<property>
<name>Use Chunked Encoding</name>
<value>false</value>
</property>
<property>
<name>Penalize on "No Retry"</name>
<value>false</value>
</property>
<autoTerminatedRelationship>Original</autoTerminatedRelationship>
<autoTerminatedRelationship>Retry</autoTerminatedRelationship>
</processor>
<connection>
<id>31d5c415-015c-1000-6e21-a892d12bd342</id>
<name/>
<bendPoints/>
<labelIndex>1</labelIndex>
<zIndex>0</zIndex>
<sourceId>31d16701-015c-1000-9050-727ba9a74f0d</sourceId>
<sourceGroupId>31d11ade-015c-1000-9dc6-0d21547d5a8d</sourceGroupId>
<sourceType>PROCESSOR</sourceType>
<destinationId>31d58808-015c-1000-81ce-6ac9810a047a</destinationId>
<destinationGroupId>31d11ade-015c-1000-9dc6-0d21547d5a8d</destinationGroupId>
<destinationType>PROCESSOR</destinationType>
<relationship>Response</relationship>
<relationship>No Retry</relationship>
<relationship>Failure</relationship>
<maxWorkQueueSize>10000</maxWorkQueueSize>
<maxWorkQueueDataSize>1 GB</maxWorkQueueDataSize>
<flowFileExpiration>0 sec</flowFileExpiration>
</connection>
<connection>
<id>31d59efa-015c-1000-20e8-ec1dd7d449cf</id>
<name/>
<bendPoints/>
<labelIndex>1</labelIndex>
<zIndex>0</zIndex>
<sourceId>31d14773-015c-1000-ca53-529cf87acf87</sourceId>
<sourceGroupId>31d11ade-015c-1000-9dc6-0d21547d5a8d</sourceGroupId>
<sourceType>PROCESSOR</sourceType>
<destinationId>31d58808-015c-1000-81ce-6ac9810a047a</destinationId>
<destinationGroupId>31d11ade-015c-1000-9dc6-0d21547d5a8d</destinationGroupId>
<destinationType>PROCESSOR</destinationType>
<relationship>success</relationship>
<maxWorkQueueSize>10000</maxWorkQueueSize>
<maxWorkQueueDataSize>1 GB</maxWorkQueueDataSize>
<flowFileExpiration>0 sec</flowFileExpiration>
</connection>
<controllerService>
<id>31d40935-015c-1000-15bc-521a919c98c0</id>
<name>StandardSSLContextService</name>
<comment/>
<class>org.apache.nifi.ssl.StandardSSLContextService</class>
<bundle>
<group>org.apache.nifi</group>
<artifact>nifi-ssl-context-service-nar</artifact>
<version>1.3.0-SNAPSHOT</version>
</bundle>
<enabled>true</enabled>
<property>
<name>Keystore Filename</name>
</property>
<property>
<name>Keystore Password</name>
</property>
<property>
<name>key-password</name>
</property>
<property>
<name>Keystore Type</name>
</property>
<property>
<name>Truststore Filename</name>
<value>/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/security/cacerts</value>
</property>
<property>
<name>Truststore Password</name>
<value>enc{F27D23C84F65973F1C23B98563DD8EE421A37489B481BE7E50C6887C89C37620}</value>
</property>
<property>
<name>Truststore Type</name>
<value>JKS</value>
</property>
<property>
<name>SSL Protocol</name>
<value>TLS</value>
</property>
</controllerService>
</rootGroup>
<controllerServices/>
<reportingTasks/>
</flowController>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment