Package: doi-site
Delegation of the Minting of Datacite DOIs within an OrganisationIntroductionThis code provides a shim layer in front of the Datacite API in order to apply
local security settings and limit the sub-domain for which a user can mint
DOIs. It is designed to hook into an organisation’s LDAP server in order to
authenticate users.The Issue Addressed by this SoftwareWe do not have a single central repository for our data and a number of groups
are wishing to mint DOIs for their data. DataCite only provides one username
and password and there is no way to limit the sub-domain (name space) within
the organisation’s allocated domain, in which users mint DOIs. We wish to
divide up the organisation’s domain in a controlled manner and allow named
individuals to manage the minting of DOIs within confines of a given
sub-domain.The SolutionNamed individuals will have responsibility for a given sub-domain. The
individuals will have to agree to abide by the DataCite terms and conditions.
This software provides the ability to define sub-domains and an authorisation
mechanism to control minting within those sub-domains.In effect it provides a MDS service to control access to the DataCite MDS.
Calls via the API are validated before the organisation’s credentials are used
to passed on the call to DataCite.The aim is to provide a thin a layer as possible and simply pass on authorised
calls. Authentication is done via the organisation’s LDAP server and
authorisation via local database which maps LDAP ids to sub-domains. The MDS
ReST API is provided and users are referred to the DataCite API documentation.The software makes use of the django framework.In addition to the API some basic web pages are provided.Future WorkIt is intended to extend the web site to allow users to mint DOIs for their
sub-domains via a web form.Following on from this it is intended to link this system with a central
repository. This system would be extended to generate landing pages for data in
the central repository. The system could then be opened up to anyone in the
organisation to store data sets and mint DOIs under a central sub-domain.Installation and ConfigurationPrerequisitesPython => 2.7python-virtualenvgccmod_ssl.x86_64mod_wsgi.x86_64openldap-develApacheInstallationCreate the directory for the static filesmkdir-p/var/www/html/doiCreate the directory for the sqlite databasemkdir-p/var/doiCreate the python virtual environmentcd/optvirtualenvdoicddoisourcebin/activateexportDJANGO_PROJECT_STATIC_FILES=/var/www/html/doi/Local customisation for proxy, if requiredexporthttp_proxy=http://example.org:8080exporthttps_proxy=http://example.org:8080Install the softwarepipinstalldoi_siteConfigurationlocal_settings.pyCreate a copy of thelocal_settings.py.inifile aslocal_settings.pyReview the contents of this file and update the parameters. You MUST provide
values for:DOI_PREFIX- The organisation’s DataCite prefix in the form nn.nnnnDATACITE_USER_NAME- The organisation’s username for DataCiteDATACITE_PASSWORD- The organisation’s password for DataCiteAUTH_LDAP_SERVER_URI- The URI of the organisation’s LDAP serverAUTH_LDAP_USER_DN_TEMPLATE- The organisation’s LDAP DN templateORGANISATION_NAME- The name of your organisation, this will be displayed on the home pageORGANISATION_DOI_EMAIL- An email address for people to contact you about the this service, this will be displayed on the home pageSECRET_KEY- A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value.ALLOWED_HOSTS- A list of strings representing the host/domain names that this Django site can serve. This should include your server’s hostname.You should provide values for:ROLES_URL- The URL of the location of the document detailing users roles and responsibilitiesNOTES_URL- The URL of the location of the document containing notes for issuersAdditionally if necessary provide values for:HTTP_PROXY_HOST- Web proxy hostHTTP_PROXY_PORT- Web proxy portBy default the DataCiteTESTMDS is used. To use thePRODUCTIONMDS
uncomment:DATACITE_URLDATACITE_HANDLERIn a testing environment you can setDEBUG = TrueInitialisation and Admin User Creationpythonlib/python2.7/site-packages/doi_site/manage.pycollectstatic--clear--noinputpythonlib/python2.7/site-packages/doi_site/manage.pysyncdb--noinputpythonlib/python2.7/site-packages/doi_site/manage.pycreatesuperuserdeactivateStuff for apachecp-p/opt/doi/lib/python2.7/site-packages/doi_site/resources/doi_wsgi.conf/etc/httpd/conf.d/Assuming apache is running as the userapachechown-Rapache/opt/doichown-Rapache/var/doisystemctlstarthttpdCustomisation of the Web PagesThis code makes use of inheritance within the templates. It has been structured
to make it relatively easy to customise the look and feel of the site.
Everything inherits from base.html.base.html -> organisation_wrapper.html -> everything elseTo customise the appearance of the site provide your ownorganisation_skin.html, which should inherit frombase.html.Changeorganisation_wrapper.htmlto inherit from yourorganisation_skin.htmlbase.html -> organisation_wrapper.html -> organisation_wrapper.html -> everything elseWithin yourorganisation_skin.htmlyou can override the following blocks:headpage_headernavbarcontentfooterPlace any css files in the directorystatic/doi_site/css/If you have made any changes you will have to restart apacheAdding DOI Domains via the Admin Web PageThe software makes use of theGroupsmodel provided by the django
framework.Grouphas been extended to include sub-domain information. There
is a one to one mapping between group and sub-domain.In a browser go to the admin pages, i.e.https://example.org/admin/In order to log in you will need you the credentials that you used to create
the superuserClick on+Addbesides theGroupslabelGive a name to the group and a DOI suffixSave your changesGranting Minting Privileges to UsersGet the user to log in with their LDAP username and password, this will create
a local account (the password is not stored in the django database).In a browser go to the admin pages, i.e.https://example.org/admin/You will need you credentials that you used to create the superuser to log onClick onUsersClick on the user name you wish to editFill in their personal information, first name, last name, email address (yes
we should really pull this in from LDAP)Within theGroupsin thePermissionssection, assign the user to the
required groupsSave the changesThe user will then be able to mint DOIs for that groups DOI prefix