blob: cf49c28bae04857d37647dee5448409154d3180c [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia
| Rendered using Apache Maven Fluido Skin 1.3.1
-->
<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 name="Date-Revision-yyyymmdd" content="20170517" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache Redback &#x2013; Development</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.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.3.1.min.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-140879-5']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="topBarEnabled">
<div id="topbar" class="navbar navbar-fixed-top ">
<div class="navbar-inner">
<div class="container"><div class="nav-collapse">
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="../index.html" title="Introduction">Introduction</a>
</li>
<li> <a href="../authentication.html" title="Authentication">Authentication</a>
</li>
<li> <a href="../authorization.html" title="Authorization">Authorization</a>
</li>
<li> <a href="../user-management.html" title="User Management">User Management</a>
</li>
<li> <a href="../key-store.html" title="Key Stores">Key Stores</a>
</li>
<li> <a href="../configuration.html" title="Configuration">Configuration</a>
</li>
<li class="dropdown-submenu">
<a href="../rbac/introduction.html" title="Role Based Access Control">Role Based Access Control</a>
<ul class="dropdown-menu">
<li> <a href="../rbac/role-management.html" title="Role Management">Role Management</a>
</li>
</ul>
</li>
<li> <a href="../integration/ldap.html" title="Ldap">Ldap</a>
</li>
<li> <a href="../integration/rest.html" title="Rest">Rest</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="../development/extending-authn.html" title="Extending Redback Authentication">Extending Redback Authentication</a>
</li>
<li> <a href="../../redback/components" title="Redback Components">Redback Components</a>
</li>
<li> <a href="../../redback/core" title="Redback Core">Redback Core</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="http://www.apache.org/foundation/how-it-works.html" title="How Apache Works">How Apache Works</a>
</li>
<li> <a href="http://www.apache.org/foundation/" title="Foundation">Foundation</a>
</li>
<li> <a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsoring Apache">Sponsoring Apache</a>
</li>
<li> <a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="../project-info.html" title="Project Information">Project Information</a>
<ul class="dropdown-menu">
<li> <a href="../integration.html" title="Continuous Integration">Continuous Integration</a>
</li>
<li> <a href="../issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
</li>
<li> <a href="../mail-lists.html" title="Mailing Lists">Mailing Lists</a>
</li>
<li> <a href="../license.html" title="Project License">Project License</a>
</li>
<li> <a href="../team-list.html" title="Project Team">Project Team</a>
</li>
<li> <a href="../source-repository.html" title="Source Repository">Source Repository</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<form id="search-form" action="http://www.google.com/search" method="get" class="navbar-search pull-right" >
<input value="http://archiva.apache.org/redback" name="sitesearch" type="hidden"/>
<input class="search-query" name="q" id="query" type="text" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=search-form"></script>
<ul class="nav pull-right"><li>
<a href="https://twitter.com/archiva" class="twitter-follow-button" data-show-count="false" data-align="right" data-size="large" data-show-screen-name="true" data-lang="en">Follow archiva</a>
<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</li></ul>
</div>
</div>
</div>
</div>
<div class="container">
<div id="banner">
<div class="pull-left">
<a href="../../redback" id="bannerLeft">
<img src="../images/redback.jpg" alt="Redback"/>
</a>
</div>
<div class="pull-right"> <a href="http://www.apache.org/" id="bannerRight">
<img src="https://www.apache.org/images/asf_logo_wide_2016.png" alt="Apache Software Foundation"/>
</a>
</div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2017-05-17
<span class="divider">|</span>
</li>
<li class="">
<a href="http://www.apache.org/" class="externalLink" title="Apache">
Apache</a>
<span class="divider">/</span>
</li>
<li class="">
<a href="../" title="Apache Redback">
Apache Redback</a>
<span class="divider">/</span>
</li>
<li class="active ">Development</li>
</ul>
</div>
<div id="bodyColumn" >
<!-- Licensed to the Apache Software Foundation (ASF) under one --><!-- or more contributor license agreements. See the NOTICE file --><!-- distributed with this work for additional information --><!-- regarding copyright ownership. The ASF licenses this file --><!-- to you under the Apache License, Version 2.0 (the --><!-- "License"); you may not use this file except in compliance --><!-- with the License. You may obtain a copy of the License at --><!-- --><!-- http://www.apache.org/licenses/LICENSE-2.0 --><!-- --><!-- Unless required by applicable law or agreed to in writing, --><!-- software distributed under the License is distributed on an --><!-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY --><!-- KIND, either express or implied. See the License for the --><!-- specific language governing permissions and limitations --><!-- under the License. --><!-- NOTE: For help with the syntax of this file, see: --><!-- http://maven.apache.org/guides/mini/guide-apt-format.html --><div class="section">
<h2><a name="Extending_Redback_Authentication"></a>Extending Redback Authentication</h2>
<p>In order to accomodate the many authentication security services used in various applications, it is possible to to implement pluggable authentication providers in the Redback security system.</p>
<div class="section">
<h3><a name="Requirements"></a>Requirements</h3>
<ul>
<li><tt>redback-authentication-api</tt> must be implemented
<ul>
<li>create an authentication implementation project under <tt>redback-authentication-providers</tt></li>
<li><tt>org.apache.archiva.redback.authentication.Authenticator</tt> must be implemented</li></ul></li>
<li><tt>redback-users-api</tt> must be implemented
<ul>
<li>create a user provider implementation project under <tt>redback-users-providers</tt></li>
<li><tt>org.apache.archiva.redback.users.User</tt> must be implemented</li>
<li><tt>org.apache.archiva.redback.users.UserManager</tt> must be implemented</li></ul></li>
<li>utility and wrapper classes can be implemented under <tt>redback-common</tt>
<ul>
<li>e.g. <tt>$redback/redback-common/redback-common-ldap</tt> contains the utility class <tt>org.apache.archiva.redback.common.ldap.LdapUtils</tt>, and the wrapper class <tt>org.apache.archiva.redback.common.ldap.user.LdapUser</tt></li>
<li>other essential classes may be placed here as well, such as the <tt>org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory</tt></li></ul></li></ul></div>
<div class="section">
<h3><a name="Examples"></a>Examples</h3>
<div class="section">
<h4><a name="Implementing_OpenId_OpenId_Homepage"></a>Implementing OpenId (<a class="externalLink" href="http://wiki.openid.net/">OpenId Homepage</a>)</h4>
<p>While OpenId may be directly integrated to the authentication point of the web application, another option is to implement the redback api.</p>
<p>Here is something to get started:</p>
<ul>
<li>create the provider project <tt>redback-authentication-openid</tt>
<ul>
<li>create the authenticator class, something like <tt>OpenIdAuthenticator</tt> that implements <tt>org.apache.archiva.redback.authentication.Authenticator</tt></li></ul></li>
<li>create the provider project <tt>redback-users-openid</tt>
<ul>
<li>implement <tt>org.apache.archiva.redback.users.User</tt>, something like <tt>OpenIdUser</tt>
<ul>
<li>OpenId supports only the principal/username and password fields, so use dummy/default values for the unsupported fields (email, fullname) in this case.</li></ul></li>
<li>implement <tt>org.apache.archiva.redback.users.UserManager</tt>, something like <tt>OpenIdUserManager</tt>
<ul>
<li>OpenId is a read-only authentication service, <tt>createUser()</tt>, <tt>updateUser()</tt>, <tt>deleteUser()</tt> may not be used</li></ul></li>
<li>various utility classes may be implemented in <tt>redback-common-openid</tt>
<ul>
<li><tt>OpenIdConfiguration</tt> may be used to encapsulate the following configuration properties (properties that may be specified in the <tt>security.properties</tt> file):
<ul>
<li><tt>openid.config.provider.url</tt>, where this is a url to one openid provider (support to many providers may come later, specified or via discovery, depending on the organization's security policy)</li></ul></li>
<li><tt>OpenIdUtils</tt> class, may be implemented to normalize the User-Supplied Identifier to an Identifier that the OpenId Provider understands, e.g. redback username ('<tt>johndoe</tt>') to OpenId url-like identifier ('<tt>http://johndoe.openidprovider.com</tt>')</li>
<li><tt>OpenIdAuthenticationException</tt> that implements <tt>org.apache.archiva.redback.authentication.AuthenticationException</tt></li>
<li><tt>OpenIdProviderFactory</tt> that takes the configuration from <tt>OpenIdConfiguration</tt></li>
<li><tt>OpenIdProvider</tt> is where the <tt>OpenIdUserManager</tt> can verify a user</li></ul></li></ul></li></ul></div></div></div>
</div>
</div>
<hr/>
<footer>
<div class="container">
<div class="row">
<p >Copyright &copy; 2006&#x2013;2017
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.
</p>
</div>
<div class="row span12">Apache Redback, Redback, Apache, the Apache feather logo, and the Apache Archiva project logos are trademarks of The Apache Software Foundation.</div>
<div class="row span12">
<a href="http://archiva.apache.org/redback-site/privacy-policy.html">Privacy Policy</a>
</div>
<p id="poweredBy" class="pull-right">
<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>
</p>
<div id="ohloh" class="pull-right">
<script type="text/javascript" src="http://www.ohloh.net/p/8659/widgets/project_basic_stats.js"></script>
</div>
</div>
</footer>
</body>
</html>