Commit dff25997 authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9

parent c0e1b5b1
<property name="context">{/doc/acs-authentication {Authentication}} {Configure Batch Synchronization}</property>
<property name="doc(title)">Configure Batch Synchronization</property>
<master>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="ext-auth-ldap-install" leftLabel="Prev"
title="Installation"
rightLink="ext-auth-design" rightLabel="Next">
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="configure-batch-sync" id="configure-batch-sync"></a>Configure
Batch Synchronization</h2></div></div></div><div class="orderedlist"><ol type="1">
<li><p>Browse to the authentication administration page, <tt class="computeroutput">http://<span class="replaceable"><span class="replaceable">yourserver</span></span><a href="/acs-admin/auth/" target="_top">/acs-admin/auth/</a>
</tt> and choose an authority for
batch sync.</p></li><li><p>Set Batch sync enabled to Yes. Set GetDocument Implementation to
HTTP GET. Set ProcessDocument Implementation to IMS Enterprise 1.1.
These settings will cause OpenACS to attempt to retrieve via HTTP a
list of users in XML format from a location we will specify in a
few steps.</p></li><li><p>Click OK.</p></li><li><p>On the next page, click <tt class="computeroutput">Configure</tt> on the GetDocument Implementation
line.</p></li><li><p>Enter either or both the IncrementalURL and SnapshotURL. These
are the URLs which the external Authority will supply with XML
files in IMS Enterprise 1.1 format.</p></li><li>
<p>Configure your Authority (RADIUS server, etc) to supply XML
files to the URLs IncrementalURL and SnapshotURL. A typical set of
incremental file record looks like:</p><pre class="programlisting">
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;enterprise&gt;
&lt;properties&gt;
&lt;datasource&gt;FOO&lt;/datasource&gt;
&lt;target&gt;dotLRN&lt;/target&gt;
&lt;type&gt;DB Increment&lt;/type&gt;
&lt;datetime&gt;28-oct-2003#16:06:02&lt;/datetime&gt;
&lt;/properties&gt;
&lt;person recstatus = "1"&gt;
&lt;sourcedid&gt;
&lt;source&gt;FOO&lt;/source&gt;
&lt;id&gt;karlf&lt;/id&gt;
&lt;/sourcedid&gt;
&lt;name&gt;
&lt;n&gt;
&lt;given&gt;Karl&lt;/given&gt;
&lt;family&gt;Fritz&lt;/family&gt;
&lt;prefix&gt;&lt;/prefix&gt;
&lt;/n&gt;
&lt;/name&gt;
&lt;email&gt;karlf\@example.net&lt;/email&gt;
&lt;/person&gt;
&lt;person recstatus = "2"&gt; &lt;!--modified person--&gt;
...
&lt;/person&gt;
&lt;person recstatus = "3"&gt; &lt;!--deleted person--&gt;
&lt;sourcedid&gt;
&lt;id&gt;LL1&lt;/id&gt; &lt;!--only requires username--&gt;
&lt;/sourcedid&gt;
&lt;/person&gt;
&lt;/enterprise&gt;
</pre><p>A snapshot file is similar but doesn't have recstatus, since
it's not a delta but a list of valid records. See the larger
example in the design document for more details.</p><p>(More information: <a href="ims-sync-driver-design" title="IMS Sync driver design">the section called “IMS Sync driver
design”</a>, <a href="http://www.imsproject.org/enterprise/" target="_top">The IMS 1.1 spec</a>)</p>
</li>
</ol></div><div class="cvstag">($&zwnj;Id: configure-batch-sync.html,v 1.2
2004/02/19 14:59:42 joela Exp $)</div>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="ext-auth-ldap-install" leftLabel="Prev" leftTitle="Installing LDAP support"
rightLink="ext-auth-design" rightLabel="Next" rightTitle="Design"
homeLink="index" homeLabel="Home"
upLink="ext-auth-install" upLabel="Up">
\ No newline at end of file
<property name="context">{/doc/acs-authentication {Authentication}} {Design}</property>
<property name="doc(title)">Design</property>
<master>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="configure-batch-sync" leftLabel="Prev"
title=""
rightLink="ims-sync-driver-design" rightLabel="Next">
<div class="article" lang="en">
<div class="titlepage">
<div><div><h2 class="title">
<a name="ext-auth-design" id="ext-auth-design"></a>Design</h2></div></div><hr>
</div><div class="toc">
<p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ims-sync-driver-design">IMS
Sync driver design</a></span></dt></dl>
</div><div class="authorblurb">by <a href="mailto:joel\@aufrecht.org" target="_top">Joel Aufrecht</a> OpenACS docs are written by the
named authors, and may be edited by OpenACS documentation
staff.</div>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="configure-batch-sync" leftLabel="Prev" leftTitle="Configure Batch Synchronization"
rightLink="ims-sync-driver-design" rightLabel="Next" rightTitle="IMS Sync driver design"
homeLink="index" homeLabel="Home"
upLink="index" upLabel="Up">
\ No newline at end of file
<property name="context">{/doc/acs-authentication {Authentication}} {Installation}</property>
<property name="doc(title)">Installation</property>
<master>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="index" leftLabel="Prev"
title=""
rightLink="ext-auth-pam-install" rightLabel="Next">
<div class="article" lang="en">
<div class="titlepage">
<div><div><h2 class="title">
<a name="ext-auth-install" id="ext-auth-install"></a>Installation</h2></div></div><hr>
</div><div class="toc">
<p><b>Table of Contents</b></p><dl>
<dt><span class="sect1"><a href="ext-auth-pam-install">Using
Pluggable Authentication Modules (PAM) with OpenACS</a></span></dt><dt><span class="sect1"><a href="ext-auth-ldap-install">Using
LDAP/Active Directory with OpenACS</a></span></dt><dt><span class="sect1"><a href="configure-batch-sync">Configure Batch
Synchronization</a></span></dt>
</dl>
</div><div class="authorblurb">
<p>by <a href="http://openacs.org/shared/community-member?user_id=8561" target="_top">Joel Aufrecht</a>
</p>
OpenACS docs are written by the named authors, and may be edited by
OpenACS documentation staff.</div>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="index" leftLabel="Prev" leftTitle="External Authentication"
rightLink="ext-auth-pam-install" rightLabel="Next" rightTitle="Using Pluggable Authentication
Modules (PAM) with OpenACS"
homeLink="index" homeLabel="Home"
upLink="index" upLabel="Up">
\ No newline at end of file
<property name="context">{/doc/acs-authentication {Authentication}} {Using LDAP/Active Directory with OpenACS}</property>
<property name="doc(title)">Using LDAP/Active Directory with OpenACS</property>
<master>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="ext-auth-pam-install" leftLabel="Prev"
title="Installation"
rightLink="configure-batch-sync" rightLabel="Next">
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="ext-auth-ldap-install" id="ext-auth-ldap-install"></a>Using
LDAP/Active Directory with OpenACS</h2></div></div></div><div class="authorblurb">by <a href="http://openacs.org/shared/community-member?user_id=8551" target="_top">John Sequeira</a>, <a href="http://openacs.org/shared/community-member?user_id=8263" target="_top">Michael Steigman</a>, and <a href="http://openacs.org/shared/community-member?user_id=12805" target="_top">Carl Blesius</a>. OpenACS docs are written by the named
authors, and may be edited by OpenACS documentation staff.</div><p>
<b>ToDo: </b>Add/verify information on on-demand sync,
account registration, and batch synchronization. Add section on
ldapsearch.</p><p>
<b>Overview. </b>You do not want to make users remember yet
another password and username. If you can avoid it you do not want
to store their passwords either. This document should help you set
your system up so your users can seamlessly log in to your OpenACS
instance using the password they are accustomed to using for other
things at your institution.</p><p>
<b>Background. </b>The original OpenACS LDAP implementation
(which has been depreciated by this package) treated the LDAP
server as another data store similar to Oracle or Postgresql. It
opened a connection using a priveleged account and read or stored
an encrypted password for the user in question. This password was
independent of the user's operating system or network account, and
had to be synchronized if you wanted the same password for
OpenACS.Save their passwords? Sync passwords? Deal with forgotten
password requests? No Thanks. Using ldap bind, you can delegate
authentication completely to LDAP. This way you can let the IT
department (if you are lucky) worry about password
storage/synchronization/etc. The bind operation takes a username
and password and returns a true of false depending on whether they
match up. This document takes the 'bind' approach so that your
users LDAP/AD password (or whatever else you use) can be used to
login to OpenACS.</p><p>
<b>Note on Account Creation. </b>On the authentication
driver configure screens, you will also see lots of options for
synchronizing users between your directory and OpenACS. This
document takes the approach of provisioning users on demand instead
of ahead-of-time. This means that when they attempt to login to
OpenACS, if they have a valid Windows account, we'll create an
account for them in OpenACS and log them in.</p><div class="orderedlist"><ol type="1">
<li>
<p>
<a name="ext-auth-ldap-setup" id="ext-auth-ldap-setup"></a><b>Installing AOLserver LDAP support
(openldap and nsldap). </b>Install openldap and nsldap using
<a href="http://openacs.org/doc/current/install-ldap-radius.html" target="_top">the document Malte created</a> Next, modify your
config.tcl file as directed in the nsldap README. Here's what the
relevant additions should look like:</p><pre class="screen"><code class="computeroutput">
# LDAP authentication
ns_param nsldap ${bindir}/nsldap.so
...
ns_section "ns/ldap/pool/ldap"
ns_param user "cn=Administrator, cn=Users, dc=mydomain, dc=com"
ns_param password "password"
ns_param host "directory.mydomain.com"
ns_param connections 1
ns_param verbose On
ns_section "ns/ldap/pools"
ns_param ldap ldap
ns_section "ns/server/${server}/ldap"
ns_param pools *
ns_param defaultpool ldap
</code></pre><p>To verify that this is all working, restart Aolserver and ensure
that you see something like this in your error.log:</p><pre class="screen"><code class="computeroutput">
[10/Jan/2006:11:11:07][22553.3076437088][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsldap.so'
[10/Jan/2006:11:11:08][22553.3076437088][-main-] Debug: nsldap: allowing * -&gt; pool ldap
[10/Jan/2006:11:11:08][22553.3076437088][-main-] Debug: nsldap: adding pool ldap to the list of allowed pools
[10/Jan/2006:11:11:08][22553.3076437088][-main-] Debug: nsldap: Registering LDAPCheckPools (600)
</code></pre>
</li><li><p>
<b>auth-ldap + driver installation. </b>Next, visit the
software installation page in acs-admin and install the auth-ldap
package. Your OpenACS installation now has all the code required to
authenticate using nsldap, so now you need to configure your site's
authentication to take advantage of it. To add the authentication
driver to your OpenACS instance, go to: Main Site, Site-Wide
Administration, and then AuthenticationHere's some sample
Authentication Driver values:Name=Active Directory, Short Name=AD,
Enabled=Yes, Authentication=LDAP, Password Management=LDAPYou may
wish to push this new authority to the top of the list so it will
become the default for users on the login screen.Next, you have to
configure the authentication driver parameters by going to: Main
Site, Site-Wide Administration, Authentication, Active Directory,
and then ConfigureParameters that match our example will look
like:UsernameAttribute=sAMAccountNMame, BaseDN=
cn=Users,dc=mydomain,dc=com,
InfoAttributeMap=first_names=givenName;last_name=sn;email=mail,
PasswordHash=N/A</p></li><li>
<p>
<b>Code Tweaks for Bind. </b>Bind-style authentication is
not supported via configuration parameters, so we will have to
modify the tcl authentication routine to provide this
behavior.You'll have to modify the existing
./packages/auth-ldap/tcl/auth-ldap-procs.tcl file to support bind
authentication.First toggle ldap bind support.Change this:</p><pre class="screen"><code class="computeroutput">
# LDAP bind based authentication ?
set ldap_bind_p 0
if {$ldap_bind_p==1} {
...
</code></pre><p>to this:</p><pre class="screen"><code class="computeroutput">
# LDAP bind based authentication ?
set ldap_bind_p 1
if {$ldap_bind_p==1} {
...
</code></pre><p>Then change the bind to first do a search to resolve to account
name provided by the user to a fully qualified domain name (FQDN),
which the LDAP server uses as a primary key.Change this:</p><pre class="screen"><code class="computeroutput">
set lh [ns_ldap gethandle]
if {[ns_ldap bind $lh "cn=$cn" "$password"]} {
set result(auth_status) ok
}
</code></pre><p>to this</p><pre class="screen"><code class="computeroutput">
set lh [ns_ldap gethandle]
set fdn [lindex [lindex [ns_ldap search $lh -scope subtree $params(BaseDN) "($params(UsernameAttribute)=$username)" dn] 0] 1]
if {[ns_ldap bind $lh $fdn $password]} {
set result(auth_status) ok
}
</code></pre>
</li>
</ol></div><p>
<b>Troubleshooting. </b>If you're having trouble figuring
out some the values for the ldapm, see this useful page on <a href="http://bugzilla.glob.com.au/activedirectory/" target="_top">setting up Active Directory integration with Bugzilla</a>.
It explains how distinguished names are defined in Active
Directory, and how to test that you have the correct values for
connectivity and base DN using the OpenLDAP command-line utility
ldapsearch.John had an issue where nsldap was not loading because
AOLServer couldn't find the openldap client libraries, but he was
able to fix it by adding the openldap libraries to his
LD_LIBRARY_PATH (e.g. /usr/local/openldap/lib)</p><p>
<b>Credits. </b>Thanks to Malte Sussdorf for his help and
the <a href="http://www.lcs.mgh.harvard.edu/" target="_top">Laboratory of Computer Science at Massachusetts General
Hospital</a> for underwriting this work.</p>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="ext-auth-pam-install" leftLabel="Prev" leftTitle="Using Pluggable Authentication Modules
(PAM) with OpenACS"
rightLink="configure-batch-sync" rightLabel="Next" rightTitle="Configure Batch Synchronization"
homeLink="index" homeLabel="Home"
upLink="ext-auth-install" upLabel="Up">
\ No newline at end of file
<property name="context">{/doc/acs-authentication {Authentication}} {Using Pluggable Authentication Modules (PAM) with
OpenACS}</property>
<property name="doc(title)">Using Pluggable Authentication Modules (PAM) with
OpenACS</property>
<master>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="ext-auth-install" leftLabel="Prev"
title="Installation"
rightLink="ext-auth-ldap-install" rightLabel="Next">
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="ext-auth-pam-install" id="ext-auth-pam-install"></a>Using
Pluggable Authentication Modules (PAM) with OpenACS</h2></div></div></div><p>OpenACS supports PAM authetication via the ns_pam module in
AOLserver.</p><div class="orderedlist"><ol type="1">
<li>
<p>
<b>Add PAM support to AOLserver. </b>OpenACS supports PAM
support via the PAM AOLserver module. PAM is system of modular
support, and can provide local (unix password), RADIUS, LDAP
(<a href="http://www.tldp.org/HOWTO/LDAP-Implementation-HOWTO/pamnss.html" target="_top">more information</a>), and other forms of
authentication. Note that due to security issues, the AOLserver PAM
module cannot be used for local password authentication.</p><div class="orderedlist"><ol type="a">
<li>
<p>
<a name="install-nspam" id="install-nspam"></a><b>Compile and
install ns_pam. </b>Download the <a href="/doc/nspam-download" target="_top">tarball</a> to <code class="computeroutput">/tmp</code>.</p><p>Debian users: first do <strong class="userinput"><code>apt-get
install libpam-dev</code></strong>
</p><pre class="screen">
[root\@yourserver root]# <strong class="userinput"><code>cd /usr/local/src/aolserver</code></strong>
[root\@yourserver aolserver]# <strong class="userinput"><code>tar xzf /tmp/ns_pam-0.1.tar.gz</code></strong>
[root\@yourserver aolserver]# <strong class="userinput"><code>cd nspam</code></strong>
[root\@yourserver nspam]# <strong class="userinput"><code>make</code></strong>
gcc -I/usr/include/pam -I/usr/local/aolserver/include -D_REENTRANT=1
-DNDEBUG=1 -g -fPIC -Wall -Wno-unused -mcpu=i686 -DHAVE_CMMSG=1
-DUSE_FIONREAD=1 -DHAVE_COND_EINTR=1 -c -o nspam.o nspam.c
nspam.c: In function `PamCmd':
nspam.c:107: warning: implicit declaration of function `Tcl_SetObjResult'
nspam.c:107: warning: implicit declaration of function `Tcl_NewIntObj'
gcc -I/usr/include/pam -I/usr/local/aolserver/include -D_REENTRANT=1
-DNDEBUG=1 -g -fPIC -Wall -Wno-unused -mcpu=i686 -DHAVE_CMMSG=1
-DUSE_FIONREAD=1 -DHAVE_COND_EINTR=1 -c -o pam_support.o pam_support.c
/bin/rm -f nspam.so
gcc -shared -nostartfiles -o nspam.so nspam.o pam_support.o -lpam
[root\@yourserver nspam]# <strong class="userinput"><code>make install</code></strong>
[root\@yourserver nspam]#
<span class="action"><span class="action">cd /usr/local/src/aolserver
tar xzf /tmp/ns_pam-0.1.tar.gz
cd nspam
make
make install</span></span>
</pre>
</li><li>
<p>
<b>Set up a PAM domain. </b>A PAM domain is a set of rules
for granting privileges based on other programs. Each instance of
AOLserver uses a domain; different aolserver instances can use the
same domain but one AOLserver instance cannot use two domains. The
domain describes which intermediate programs will be used to check
permissions. You may need to install software to perform new types
of authentication.</p><div class="itemizedlist"><ul type="disc">
<li>
<p><b>RADIUS in PAM. </b></p><div class="orderedlist"><ol type="i">
<li>
<p>Untar the <a href="/doc/individual-programs" target="_top">pam_radius tarball</a> and compile and install. (<a href="http://www.freeradius.org/pam_radius_auth/" target="_top">more
information</a>)</p><pre class="screen">
[root\@yourserver root]# <strong class="userinput"><code>cd /usr/local/src/</code></strong>
[root\@yourserver src]# <strong class="userinput"><code>tar xf /tmp/pam_radius-1.3.16.tar</code></strong>
[root\@yourserver src]# <strong class="userinput"><code>cd pam_radius-1.3.16</code></strong>
[root\@yourserver pam_radius-1.3.16]# <strong class="userinput"><code>make</code></strong>
cc -Wall -fPIC -c pam_radius_auth.c -o pam_radius_auth.o
cc -Wall -fPIC -c -o md5.o md5.c
ld -Bshareable pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so
[root\@yourserver pam_radius-1.3.16]# <strong class="userinput"><code>cp pam_radius_auth.so /lib/security/pam_radius_auth.so</code></strong>
[root\@yourserver pam_radius-1.3.16]#
<span class="action"><span class="action">cd /usr/local/src/
tar xf /tmp/pam_radius-1.3.16.tar
cd pam_radius-1.3.16
make
cp pam_radius_auth.so /lib/security/pam_radius_auth.so</span></span>
</pre><p>Debian users: <strong class="userinput"><code>apt-get install
libpam-radius-auth</code></strong>
</p>
</li><li>
<p>Set up the PAM domain. Recent PAM distributions have a different
file for each domain, all in <code class="computeroutput">/etc/pam.d</code>. Previous PAM setups put all
domain configuration lines into a single file, <code class="computeroutput">/etc/pam.conf</code>. On Red Hat, create the file
<code class="computeroutput">/etc/pam.d/<span class="replaceable"><span class="replaceable">service0</span></span>
</code> with these
contents:</p><pre class="programlisting">
auth sufficient /lib/security/pam_radius_auth.so
</pre>
</li><li>
<p>Modify the AOLserver configuration file to use this PAM domain.
Edit the line</p><pre class="programlisting">
ns_param PamDomain "<span class="replaceable"><span class="replaceable">service0</span></span>"
</pre><p>So that the value of the parameter matches the name (just the
file name, not the fully pathed name) of the domain file in</p><pre class="programlisting">
/etc/pam.d/
</pre>
</li>
</ol></div>
</li><li><p>
<b>LDAP in PAM. </b><a href="http://www.tldp.org/HOWTO/LDAP-Implementation-HOWTO/pamnss.html#AEN110" target="_top">more information</a>
</p></li>
</ul></div>
</li><li>
<p><b>Modify the AOLserver configuration file to support
ns_pam. </b></p><p>In <code class="computeroutput">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">service0</span></span>/etc/config.tcl</code>, enable
the nspam module by uncommenting this line:</p><pre class="programlisting">
ns_param nspam ${bindir}/nspam.so
</pre>
</li>
</ol></div>
</li><li><p>
<b>Install auth-pam OpenACS service package. </b><a href="/acs-admin/install/" target="_top">Install</a><code class="computeroutput">auth-pam</code> and restart the server.</p></li><li>
<p>
<a name="ext-auth-create-authority" id="ext-auth-create-authority"></a><b>Create an OpenACS
authority. </b>OpenACS supports multiple authentication
authorities. The OpenACS server itself is the "Local Authority,"
used by default.</p><div class="orderedlist"><ol type="a">
<li><p>Browse to the authentication administration page, <code class="computeroutput">http://<span class="replaceable"><span class="replaceable">yourserver</span></span><a href="/acs-admin/auth/" target="_top">/acs-admin/auth/</a>
</code>. Create and name an
authority (in the sitewide admin UI)</p></li><li><p>Set Authentication to PAM.</p></li><li><p>If the PAM domain defines a <code class="computeroutput">password</code> command, you can set Password
Management to PAM. If not, the PAM module cannot change the user's
password and you should leave this option Disabled.</p></li><li><p>Leave Account Registration disabed.</p></li><li><p><a href="configure-batch-sync" title="Configure Batch Synchronization">Configure Batch
Synchronization</a></p></li>
</ol></div>
</li>
</ol></div>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="ext-auth-install" leftLabel="Prev" leftTitle="Installation"
rightLink="ext-auth-ldap-install" rightLabel="Next" rightTitle="Using LDAP/Active Directory with
OpenACS"
homeLink="index" homeLabel="Home"
upLink="ext-auth-install" upLabel="Up">
\ No newline at end of file
<property name="context">{/doc/acs-authentication {Authentication}} {IMS Sync driver design}</property>
<property name="doc(title)">IMS Sync driver design</property>
<master>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="ext-auth-design" leftLabel="Prev"
title="Design"
rightLink="" rightLabel="">
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="ims-sync-driver-design" id="ims-sync-driver-design"></a>IMS Sync
driver design</h2></div></div></div><div class="authorblurb">by <a href="mailto:lars\@collaboraid.biz" target="_top">Lars Pind</a> OpenACS docs are written by the named
authors, and may be edited by OpenACS documentation staff.</div><div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id2453048" id="id2453048"></a>TODO</h3></div></div></div><p>We need examples of how the communication would be done from our
clients.</p><p>The "GetDocument" communications service contract could be a
generic system-wide service contract.</p><p>We might need a source/ID column in the users table to identify
where they're imported from for doing updates, particularly if
importing from multiple sources (or when some users are local.)</p>
</div><div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id2453074" id="id2453074"></a>Execution
Story</h3></div></div></div><div class="orderedlist"><ol type="1">
<li><p>We will parse a document in the <a href="http://www.imsglobal.org/enterprise/index.cfm" target="_top">IMS
Enterprise Specification</a> format (<a href="http://www.imsglobal.org/enterprise/entv1p1/imsent_bestv1p1.html#1404584" target="_top">example XML document</a>), and translate it into
calls to the batch user sync API.</p></li><li><p>The document will contain either the complete user listitemst
(IMS: "snapshot"), or an incremental user listitemst (IMS: "Event
Driven" -- contains only adds, edits, and deletes). You could for
example do a complete transfer once a month, and incrementals every
night. The invocation should decide which type is returned.</p></li>
</ol></div><p>The design should favor interoperability, reliability and
robustness.</p><pre class="programlisting">
&lt;enterprise&gt;
&lt;properties&gt;
&lt;datasource&gt;Dunelm Services Limited&lt;/datasource&gt;
&lt;target&gt;Telecommunications LMS&lt;/target&gt;
&lt;type&gt;DATABASE UPDATE&lt;/type&gt;
&lt;datetime&gt;2001-08-08&lt;/datetime&gt;
&lt;/properties&gt;
&lt;person recstatus = "1"&gt;
&lt;comments&gt;Add a new Person record.&lt;/comments&gt;
&lt;sourcedid&gt;
&lt;source&gt;Dunelm Services Limited&lt;/source&gt;
&lt;id&gt;CK1&lt;/id&gt;
&lt;/sourcedid&gt;
&lt;name&gt;
&lt;fn&gt;Clark Kent&lt;/fn&gt;
&lt;sort&gt;Kent, C&lt;/sort&gt;
&lt;nickname&gt;Superman&lt;/nickname&gt;
&lt;/name&gt;
&lt;demographics&gt;
&lt;gender&gt;2&lt;/gender&gt;
&lt;/demographics&gt;
&lt;adr&gt;
&lt;extadd&gt;The Daily Planet&lt;/extadd&gt;
&lt;locality&gt;Metropolis&lt;/locality&gt;
&lt;country&gt;USA&lt;/country&gt;
&lt;/adr&gt;
&lt;/person&gt;
&lt;person recstatus = "2"&gt;
&lt;comments&gt;Update a previously created record.&lt;/comments&gt;
&lt;sourcedid&gt;
&lt;source&gt;Dunelm Services Limited&lt;/source&gt;
&lt;id&gt;CS1&lt;/id&gt;
&lt;/sourcedid&gt;
&lt;name&gt;
&lt;fn&gt;Colin Smythe&lt;/fn&gt;
&lt;sort&gt;Smythe, C&lt;/sort&gt;
&lt;nickname&gt;Colin&lt;/nickname&gt;
&lt;n&gt;
&lt;family&gt;Smythe&lt;/family&gt;
&lt;given&gt;Colin&lt;/given&gt;
&lt;other&gt;Manfred&lt;/other&gt;
&lt;other&gt;Wingarde&lt;/other&gt;
&lt;prefix&gt;Dr.&lt;/prefix&gt;
&lt;suffix&gt;C.Eng&lt;/suffix&gt;
&lt;partname partnametype = "Initials"&gt;C.M.W.&lt;/partname&gt;
&lt;/n&gt;
&lt;/name&gt;
&lt;demographics&gt;
&lt;gender&gt;2&lt;/gender&gt;
&lt;bday&gt;1958-02-18&lt;/bday&gt;
&lt;disability&gt;None.&lt;/disability&gt;
&lt;/demographics&gt;
&lt;email&gt;colin\@dunelm.com&lt;/email&gt;
&lt;url&gt;http://www.dunelm.com&lt;/url&gt;
&lt;tel teltype = "Mobile"&gt;4477932335019&lt;/tel&gt;
&lt;adr&gt;
&lt;extadd&gt;Dunelm Services Limited&lt;/extadd&gt;
&lt;street&gt;34 Acorn Drive&lt;/street&gt;
&lt;street&gt;Stannington&lt;/street&gt;
&lt;locality&gt; Sheffield&lt;/locality&gt;
&lt;region&gt;S.Yorks&lt;/region&gt;
&lt;pcode&gt;S7 6WA&lt;/pcode&gt;
&lt;country&gt;UK&lt;/country&gt;
&lt;/adr&gt;
&lt;photo imgtype = "gif"&gt;
&lt;extref&gt;http://www.dunelm.com/staff/colin2.gif&lt;/extref&gt;
&lt;/photo&gt;
&lt;institutionrole primaryrole = "No" institutionroletype = "Alumni"/&gt;
&lt;datasource&gt;dunelm:colinsmythe:1&lt;/datasource&gt;
&lt;/person&gt;
&lt;person recstatus = "3"&gt;
&lt;comments&gt;Delete this record.&lt;/comments&gt;
&lt;sourcedid&gt;
&lt;source&gt;Dunelm Services Limited&lt;/source&gt;
&lt;id&gt;LL1&lt;/id&gt;
&lt;/sourcedid&gt;
&lt;name&gt;
&lt;fn&gt;Lois Lane&lt;/fn&gt;
&lt;sort&gt;Lane, L&lt;/sort&gt;
&lt;/name&gt;
&lt;/person&gt;
&lt;/enterprise&gt;
</pre><p>Above would get translated into calls to the batch sync API as
follows:</p><pre class="programlisting">
for { ... loop over persons in the document ... } {
auth::batch::transaction \
-job_id $job_id \
-operation [ad_decode $recstatus 2 "update" 3 "delete" "insert"] \
-authority_id $authority_id \
-username { $userid if present, otherwise $sourcedid.id } \
-first_names { $name.given if present, otherwise all except last part of $name.fn } \
-last_name { $name.family if present, otherwise last part of $name.fn } \
-email { $person.email ; we require this, even though the specification does not } \
-url { $url, if present } \
-portrait_url { $photo.imgtype/$photo.extref -- grab photo, store in DB }
}
}
</pre><p>Mandatory fields which we can rely on are:</p><div class="orderedlist"><ol type="1">
<li><p>sourcedid: ID as defined by the source system. Used for
username.</p></li><li><p>name.fn (formatted name). Used for first_names, last_name</p></li>
</ol></div><p>Note that we require 'email' attribute, but the IMS Enterprise
spec does not. Hence, unless we change our data model to allow
users without an email address, we will have to throw an error.</p><p>Here's how we map IMS enterprise to OpenACS tables.</p><div class="orderedlist"><ol type="1">
<li>
<p>username:</p><div class="orderedlist"><ol type="a">
<li><p>&lt;userid&gt; <span class="emphasis"><em>...</em></span>
&lt;/userid&gt; if present.</p></li><li><p>&lt;sourcedid&gt;&lt;id&gt; <span class="emphasis"><em>...</em></span> &lt;/id&gt;&lt;/sourcedid&gt;
otherwise</p></li>
</ol></div>
</li><li>
<p>first_names:</p><div class="orderedlist"><ol type="a">
<li><p>&lt;name&gt;&lt;given&gt; <span class="emphasis"><em>...</em></span>&lt;/given&gt;&lt;/name&gt; if
present.</p></li><li><p>&lt;name&gt;&lt;fn&gt; <span class="emphasis"><em>...</em></span> ...&lt;/fn&gt;&lt;/name&gt;
otherwise</p></li>
</ol></div>
</li><li>
<p>last_name:</p><div class="orderedlist"><ol type="a">
<li><p>&lt;name&gt;&lt;family&gt; <span class="emphasis"><em>...</em></span>&lt;/family&gt;&lt;/name&gt; if
present.</p></li><li><p>&lt;name&gt;&lt;fn&gt;... <span class="emphasis"><em>...</em></span>&lt;/fn&gt;&lt;/name&gt;
otherwise</p></li>
</ol></div>
</li><li>
<p>email:</p><div class="orderedlist"><ol type="a">
<li><p>&lt;email&gt; <span class="emphasis"><em>...</em></span>&lt;/email&gt; if present.</p></li><li><p>Blank/unchanged if not.</p></li>
</ol></div>
</li><li>
<p>url:</p><div class="orderedlist"><ol type="a">
<li><p>&lt;url&gt; <span class="emphasis"><em>...</em></span>&lt;/url&gt; if present.</p></li><li><p>Blank/unchanged if not.</p></li>
</ol></div>
</li><li>
<p>portrait:</p><div class="orderedlist"><ol type="a"><li><p>&lt;photo imgtype="gif"&gt;&lt;extref&gt;<span class="emphasis"><em>...</em></span>&lt;/extref&gt;&lt;/photo&gt; if
present: HTTP GET the photo, insert it into the system. (Do we do
this, then, with all users when doing a snapshot update?)</p></li></ol></div>
</li>
</ol></div>
</div><div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id2452593" id="id2452593"></a>
Resources</h3></div></div></div><div class="itemizedlist"><ul type="disc">
<li><p>
<a href="http://www.cetis.ac.uk/content/20020524162233" target="_top">Consolidation before the leap; IMS Enterprise 1.1</a>: This
article says that IMS Enterprise 1.1 (current version) does not
address the communication model, which is critically missing for
real seamless interoperability. IMS Enterprise 2.0 will address
this, but Blackboard, who's influential in the IMS committee, is
adopting OKI's programming interrfaces for this.</p></li><li><p><a href="http://www.cetis.ac.uk/content/20030717185453" target="_top">IMS and OKI, the wire and the socket</a></p></li>
</ul></div>
</div>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="ext-auth-design" leftLabel="Prev" leftTitle="Design"
rightLink="" rightLabel="" rightTitle=""
homeLink="index" homeLabel="Home"
upLink="ext-auth-design" upLabel="Up">
\ No newline at end of file
<property name="context">{/doc/acs-authentication {Authentication}} {External Authentication}</property>
<property name="doc(title)">External Authentication</property>
<master>
<div class="book" lang="en">
<div class="titlepage"><div><div><h1 class="title">
<a name="id2410693" id="id2410693"></a>External
Authentication</h1></div></div></div><div class="toc"><dl>
<dt><span class="article"><a href="ext-auth-install">Installation</a></span></dt><dd><dl>
<dt><span class="sect1"><a href="ext-auth-pam-install">Using
Pluggable Authentication Modules (PAM) with OpenACS</a></span></dt><dt><span class="sect1"><a href="ext-auth-ldap-install">Using
LDAP/Active Directory with OpenACS</a></span></dt><dt><span class="sect1"><a href="configure-batch-sync">Configure Batch
Synchronization</a></span></dt>
</dl></dd><dt><span class="article"><a href="ext-auth-design">Design</a></span></dt><dd><dl><dt><span class="sect1"><a href="ims-sync-driver-design">IMS
Sync driver design</a></span></dt></dl></dd>
</dl></div>
</div>
<h2>Release Notes</h2>
<p>Please file bugs in the <a href="http://openacs.org/bugtracker/openacs/">Bug Tracker</a>.</p>
<hr>
<address><a href="mailto:docs\@openacs.org">docs\@openacs.org</a></address>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment