Added: 
oozie/site/trunk/content/resources/docs/5.0.0/ENG_Custom_Authentication.html
URL: 
http://svn.apache.org/viewvc/oozie/site/trunk/content/resources/docs/5.0.0/ENG_Custom_Authentication.html?rev=1828722&view=auto
==============================================================================
--- 
oozie/site/trunk/content/resources/docs/5.0.0/ENG_Custom_Authentication.html 
(added)
+++ 
oozie/site/trunk/content/resources/docs/5.0.0/ENG_Custom_Authentication.html 
Mon Apr  9 14:12:36 2018
@@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at Apr 9, 2018 
+ | Rendered using Apache Maven Fluido Skin 1.4
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Oozie - </title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.4.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" 
src="./js/apache-maven-fluido-1.4.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarDisabled">
+          
+        
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="https://oozie.apache.org/"; 
id="bannerLeft">
+                                                                               
         <img src="https://oozie.apache.org/images/oozie_200x.png";  
alt="Oozie"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="../../" title="Apache">
+        Apache</a>
+                    <span class="divider">/</span>
+      </li>
+            <li class="">
+                    <a href="../../" title="Oozie">
+        Oozie</a>
+                    <span class="divider">/</span>
+      </li>
+            <li class="">
+                    <a href="../" title="docs">
+        docs</a>
+                    <span class="divider">/</span>
+      </li>
+            <li class="">
+                    <a href="./" title="5.0.0">
+        5.0.0</a>
+                    <span class="divider">/</span>
+      </li>
+        <li class="active ">Oozie - </li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right"><span 
class="divider">|</span> Last Published: 2018-04-09</li>
+              <li id="projectVersion" class="pull-right">
+                    Version: 5.0.0
+        </li>
+            
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+  </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/"; title="Built 
by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" 
src="./images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span10" >
+                                  
+            <p></p>
+<p><a href="./index.html">::Go back to Oozie Documentation Index::</a>
+</p>
+<a name="Creating_Custom_Authentication"></a>
+<div class="section"><h2> Creating Custom Authentication</h2>
+<p><ul><ul><li><a 
href="#Hadoop-Auth_Authentication_Interfaces_and_classes">Hadoop-Auth 
Authentication Interfaces and classes</a>
+</li>
+<li><a href="#Provide_Custom_Authentication_to_Oozie_Client">Provide Custom 
Authentication to Oozie Client</a>
+</li>
+<li><a href="#Provide_Custom_Authentication_to_Oozie_Server">Provide Custom 
Authentication to Oozie Server</a>
+</li>
+</ul>
+</ul>
+</p>
+<a name="Hadoop-Auth_Authentication_Interfaces_and_classes"></a>
+<div class="section"><h3>Hadoop-Auth Authentication Interfaces and classes</h3>
+<p>1. <tt>org.apache.hadoop.security.authentication.client.Authenticator:</tt>
+ Interface for client authentication mechanisms.</p>
+<p>The following authenticators are provided in hadoop-auth:</p>
+<p><ul><li>KerberosAuthenticator   : the authenticator implements the Kerberos 
SPNEGO authentication sequence.</li>
+<li>PseudoAuthenticator     : the authenticator implementation provides an 
authentication equivalent to Hadoop's Simple</li>
+</ul>
+authentication, it trusts the value of the 'user.name' Java System 
property.</p>
+<p>2. 
<tt>org.apache.hadoop.security.authentication.server.AuthenticationHandler:</tt>
+ Interface for server authentication mechanisms.</p>
+<p><ul><li>KerberosAuthenticationHandler   : the authenticator handler 
implements the Kerberos SPNEGO authentication mechanism for HTTP.</li>
+<li>PseudoAuthenticationHandler     : the authenticator handler provides a 
pseudo authentication mechanism that accepts the user</li>
+</ul>
+name specified as a query string parameter.</p>
+<p>3. 
<tt>org.apache.hadoop.security.authentication.server.AuthenticationFilter:</tt>
+ A servlet filter enables protecting web application
+resources with different authentication mechanisms provided by 
AuthenticationHandler. To enable the filter, web application
+resources file (ex. web.xml) needs to include a filter class derived from 
<tt>AuthenticationFilter</tt>
+.</p>
+<p>For more information have a look at the appropriate
+<a class="externalLink" 
href="https://hadoop.apache.org/docs/r2.7.2/hadoop-auth/index.html";>Hadoop 
documentation</a>
+.</p>
+<a name="Provide_Custom_Authentication_to_Oozie_Client"></a>
+</div>
+<div class="section"><h3>Provide Custom Authentication to Oozie Client</h3>
+<p>Apache Oozie contains a default class 
<tt>org.apache.oozie.client.AuthOozieClient</tt>
+ to support Kerberos HTTP SPNEGO authentication,
+pseudo/simple authentication and anonymous access for client connections.</p>
+<p>To provide other authentication mechanisms, an Oozie client should extend 
from <tt>AuthOozieClient</tt>
+ and provide the following
+methods should be overridden by derived classes to provide custom 
authentication:</p>
+<p><ul><li>getAuthenticator()   : return corresponding Authenticator based on 
value specified by user at <tt>auth</tt>
+ command option.</li>
+<li>createConnection()   : create a singleton class at Authenticator to allow 
client set and get key-value configuration for</li>
+</ul>
+authentication.</p>
+<a name="Provide_Custom_Authentication_to_Oozie_Server"></a>
+</div>
+<div class="section"><h3>Provide Custom Authentication to Oozie Server</h3>
+<p>To accept custom authentication in Oozie server, a filter extends from 
AuthenticationFilter must be provided. This filter
+delegates to the configured authentication handler for authentication and once 
it obtains an <tt>AuthenticationToken</tt>
+ from it, sets
+a signed HTTP cookie with the token. If HTTP cookie is provided with different 
key name, its cookie value can be retrieved by
+overriding <tt>getToken()</tt>
+ method. Please note, only when <tt>getToken()</tt>
+ return NULL, a custom authentication can be invoked and
+processed in <tt>AuthenticationFilter.doFilter()</tt>
+.</p>
+<p>The following method explains how to read it and return NULL token.
+<pre>
+protected AuthenticationToken getToken(HttpServletRequest request) throws 
IOException, AuthenticationException {
+        String tokenStr = null;
+        Cookie[] cookies = request.getCookies();        if (cookies != null) {
+            for (Cookie cookie : cookies) {
+                if (cookie.getName().equals(AuthenticatedURL.AUTH_COOKIE)) {
+                    tokenStr = cookie.getValue();
+                    LOG.info(&quot;Got 'hadoop.auth' cookie from request = 
&quot; + tokenStr);
+                    if (tokenStr != null &amp;&amp; 
!tokenStr.trim().isEmpty()) {
+                        AuthenticationToken retToken = super.getToken(request);
+                        return retToken;
+                    }
+                } else if (cookie.getName().equals(&quot;NEWAUTH&quot;)) {
+                    tokenStr = cookie.getValue();
+                    // DO NOT return the token string so request can 
authenticated.
+                }
+            }
+        }
+        return null;
+      }
+</pre>
+</p>
+<p><a href="./index.html">::Go back to Oozie Documentation Index::</a>
+</p>
+<p></p>
+</div>
+
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                                      <p >Copyright &copy;                    
2018
+                        <a href="http://www.apache.org";>Apache Software 
Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+                </div>
+
+        
+                </div>
+    </footer>
+        </body>
+</html>

Added: oozie/site/trunk/content/resources/docs/5.0.0/ENG_MiniOozie.html
URL: 
http://svn.apache.org/viewvc/oozie/site/trunk/content/resources/docs/5.0.0/ENG_MiniOozie.html?rev=1828722&view=auto
==============================================================================
--- oozie/site/trunk/content/resources/docs/5.0.0/ENG_MiniOozie.html (added)
+++ oozie/site/trunk/content/resources/docs/5.0.0/ENG_MiniOozie.html Mon Apr  9 
14:12:36 2018
@@ -0,0 +1,207 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at Apr 9, 2018 
+ | Rendered using Apache Maven Fluido Skin 1.4
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Oozie - </title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.4.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" 
src="./js/apache-maven-fluido-1.4.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarDisabled">
+          
+        
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="https://oozie.apache.org/"; 
id="bannerLeft">
+                                                                               
         <img src="https://oozie.apache.org/images/oozie_200x.png";  
alt="Oozie"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="../../" title="Apache">
+        Apache</a>
+                    <span class="divider">/</span>
+      </li>
+            <li class="">
+                    <a href="../../" title="Oozie">
+        Oozie</a>
+                    <span class="divider">/</span>
+      </li>
+            <li class="">
+                    <a href="../" title="docs">
+        docs</a>
+                    <span class="divider">/</span>
+      </li>
+            <li class="">
+                    <a href="./" title="5.0.0">
+        5.0.0</a>
+                    <span class="divider">/</span>
+      </li>
+        <li class="active ">Oozie - </li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right"><span 
class="divider">|</span> Last Published: 2018-04-09</li>
+              <li id="projectVersion" class="pull-right">
+                    Version: 5.0.0
+        </li>
+            
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+  </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/"; title="Built 
by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" 
src="./images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span10" >
+                                  
+            <p></p>
+<p><a href="./index.html">::Go back to Oozie Documentation Index::</a>
+</p>
+<a name="Running_MiniOozie_Tests"></a>
+<div class="section"><h2> Running MiniOozie Tests</h2>
+<p><ul><ul><li><a href="#System_Requirements">System Requirements</a>
+</li>
+<li><a href="#Installing_Oozie_Jars_To_Maven_Cache">Installing Oozie Jars To 
Maven Cache</a>
+</li>
+<li><a href="#Create_Tests_Using_MiniOozie">Create Tests Using MiniOozie</a>
+</li>
+<li><a href="#IDE_Setup">IDE Setup</a>
+</li>
+</ul>
+</ul>
+</p>
+<a name="System_Requirements"></a>
+<div class="section"><h3>System Requirements</h3>
+<p><ul><li>Unix box (tested on Mac OS X and Linux)</li>
+<li>Java JDK 1.8+</li>
+<li>Eclipse (tested on 3.5 and 3.6)</li>
+<li><a class="externalLink" href="http://maven.apache.org/";>Maven 3.0.1+</a>
+</li>
+</ul>
+</p>
+<p>The Maven command (mvn) must be in the command path.</p>
+<a name="Installing_Oozie_Jars_To_Maven_Cache"></a>
+</div>
+<div class="section"><h3>Installing Oozie Jars To Maven Cache</h3>
+<p>Oozie source tree is at Apache SVN or Apache GIT. MiniOozie sample project 
is under Oozie source tree.</p>
+<p>The following command downloads Oozie trunk to local:</p>
+<p><pre>
+$ svn co https://svn.apache.org/repos/asf/incubator/oozie/trunk
+</pre></p>
+<p>OR</p>
+<p><pre>
+$ git clone git://github.com/apache/oozie.git
+</pre></p>
+<p>To run MiniOozie tests, the required jars like oozie-core, oozie-client, 
oozie-core-tests need to be
+available in remote maven repositories or local maven repository. The local 
maven cache for the above
+jars can be created and installed using the command:</p>
+<p><pre>
+$ mvn clean install -DskipTests -DtestJarSimple
+</pre></p>
+<p>The following properties should be specified to install correct jars for 
MiniOozie:</p>
+<p><ul><li>-DskipTests       : ignore executing Oozie unittests</li>
+<li>-DtestJarSimple=  : build only required test classes to 
oozie-core-tests</li>
+</ul>
+</p>
+<p>MiniOozie is a folder named 'minitest' under Oozie source tree. Two sample 
tests are included in the project.
+The following command to execute tests under MiniOozie:</p>
+<p><pre>
+$ cd minitest
+$ mvn clean test
+</pre></p>
+<a name="Create_Tests_Using_MiniOozie"></a>
+</div>
+<div class="section"><h3>Create Tests Using MiniOozie</h3>
+<p>MiniOozie is a JUnit test class to test Oozie applications such as workflow 
and coordinator. The test case
+needs to extend from MiniOozieTestCase and does the same as the example class 
'WorkflowTest.java' to create Oozie
+workflow application properties and workflow XML. The example file is under 
Oozie source tree:</p>
+<p><ul><li><tt>minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java</tt>
+</li>
+</ul>
+</p>
+<a name="IDE_Setup"></a>
+</div>
+<div class="section"><h3>IDE Setup</h3>
+<p>Eclipse and IntelliJ can use directly MiniOozie Maven project files. 
MiniOozie project can be imported to
+Eclipse and IntelliJ as independent project.</p>
+<p>The test directories under MiniOozie are:</p>
+<p><ul><li><tt>minitest/src/test/java</tt>
+ : as test-source directory</li>
+<li><tt>minitest/src/test/resources</tt>
+ : as test-resource directory</li>
+</ul>
+</p>
+<p>Also asynchronous actions like FS action can be used / tested using 
<tt>LocalOozie</tt>
+ / <tt>OozieClient</tt>
+ API.
+Please see <tt>fs-decision.xml</tt>
+ workflow example.</p>
+<p><a href="./index.html">::Go back to Oozie Documentation Index::</a>
+</p>
+<p></p>
+</div>
+
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                                      <p >Copyright &copy;                    
2018
+                        <a href="http://www.apache.org";>Apache Software 
Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+                </div>
+
+        
+                </div>
+    </footer>
+        </body>
+</html>


Reply via email to