€cdocutils.nodes document q)q}q(U nametypesq}q(X���ldap-based authenticationqNX.���utility for password file based authenticationqNX ���metacat authentication mechanismqNX���file-based authenticationq NuUsubstitution_defsq }qUparse_messagesq]q Ucurrent_sourceqNU decorationqNUautofootnote_startqKUnameidsq}q(hUldap-based-authenticationqhU.utility-for-password-file-based-authenticationqhU metacat-authentication-mechanismqh Ufile-based-authenticationquUchildrenq]qcdocutils.nodes section q)q}q(U rawsourceqU�UparentqhUsourceqXg���/var/lib/jenkins/jobs/Metacat_stable/workspace/METACAT_2_7_2/docs/user/metacat/source/authinterface.rstqUtagnameq Usectionq!U attributesq"}q#(Udupnamesq$]Uclassesq%]Ubackrefsq&]Uidsq']q(haUnamesq)]q*hauUlineq+KUdocumentq,hh]q-(cdocutils.nodes title q.)q/}q0(hX ���Metacat Authentication Mechanismq1hhhhh Utitleq2h"}q3(h$]h%]h&]h']h)]uh+Kh,hh]q4cdocutils.nodes Text q5X ���Metacat Authentication Mechanismq6…q7}q8(hh1hh/ubaubcdocutils.nodes paragraph q9)q:}q;(hXZ��Metacat supports either an internal password file authentication or the use of LDAP as an external authentication mechanism. It does this by supplying two classes (``AuthFile`` or ``AuthLDAP``) that implement authentication via a password file or an external LDAP server. You may choose the authentication mechanism during initial configuration.hhhhh U paragraphq<h"}q=(h$]h%]h&]h']h)]uh+Kh,hh]q>(h5X¥���Metacat supports either an internal password file authentication or the use of LDAP as an external authentication mechanism. It does this by supplying two classes (q?…q@}qA(hX¥���Metacat supports either an internal password file authentication or the use of LDAP as an external authentication mechanism. It does this by supplying two classes (hh:ubcdocutils.nodes literal qB)qC}qD(hX���``AuthFile``h"}qE(h$]h%]h&]h']h)]uhh:h]qFh5X���AuthFileqG…qH}qI(hU�hhCubah UliteralqJubh5X��� or qK…qL}qM(hX��� or hh:ubhB)qN}qO(hX���``AuthLDAP``h"}qP(h$]h%]h&]h']h)]uhh:h]qQh5X���AuthLDAPqR…qS}qT(hU�hhNubah hJubh5X™���) that implement authentication via a password file or an external LDAP server. You may choose the authentication mechanism during initial configuration.qU…qV}qW(hX™���) that implement authentication via a password file or an external LDAP server. You may choose the authentication mechanism during initial configuration.hh:ubeubh9)qX}qY(hXç��If neither of these choices is suitable for your deployment, a custom authentication mechanism can be built. Metacat is written such that this Authentication provider is replaceable with another class that implements the same interface (``AuthInterface``). As an Administrator, you have the choice to provide an alternative implementation of ``AuthInterface`` and then configuring ``metacat.properties`` to use that class for authentication instead of LDAP or the internal password file.hhhhh h<h"}qZ(h$]h%]h&]h']h)]uh+Kh,hh]q[(h5Xí���If neither of these choices is suitable for your deployment, a custom authentication mechanism can be built. Metacat is written such that this Authentication provider is replaceable with another class that implements the same interface (q\…q]}q^(hXí���If neither of these choices is suitable for your deployment, a custom authentication mechanism can be built. Metacat is written such that this Authentication provider is replaceable with another class that implements the same interface (hhXubhB)q_}q`(hX���``AuthInterface``h"}qa(h$]h%]h&]h']h)]uhhXh]qbh5X ���AuthInterfaceqc…qd}qe(hU�hh_ubah hJubh5XX���). As an Administrator, you have the choice to provide an alternative implementation of qf…qg}qh(hXX���). As an Administrator, you have the choice to provide an alternative implementation of hhXubhB)qi}qj(hX���``AuthInterface``h"}qk(h$]h%]h&]h']h)]uhhXh]qlh5X ���AuthInterfaceqm…qn}qo(hU�hhiubah hJubh5X��� and then configuring qp…qq}qr(hX��� and then configuring hhXubhB)qs}qt(hX���``metacat.properties``h"}qu(h$]h%]h&]h']h)]uhhXh]qvh5X���metacat.propertiesqw…qx}qy(hU�hhsubah hJubh5XT��� to use that class for authentication instead of LDAP or the internal password file.qz…q{}q|(hXT��� to use that class for authentication instead of LDAP or the internal password file.hhXubeubh)q}}q~(hU�hhhhh h!h"}q(h$]h%]h&]h']q€hah)]qh auh+Kh,hh]q‚(h.)qƒ}q„(hX���File-Based Authenticationq…hh}hhh h2h"}q†(h$]h%]h&]h']h)]uh+Kh,hh]q‡h5X���File-Based Authenticationqˆ…q‰}qŠ(hh…hhƒubaubh9)q‹}qŒ(hXé���This is the default authentication mechanism in Metacat. The password file path can be specified during initial configuration. The Tomcat user should have write/read permission to access the file. The password file follows this form:qhh}hhh h<h"}qŽ(h$]h%]h&]h']h)]uh+Kh,hh]qh5Xé���This is the default authentication mechanism in Metacat. The password file path can be specified during initial configuration. The Tomcat user should have write/read permission to access the file. The password file follows this form:q…q‘}q’(hhhh‹ubaubcdocutils.nodes literal_block q“)q”}q•(hXÂ��<?xml version="1.0" encoding="UTF-8"?> <subjects> <users> <user dn="uid=john,o=NCEAS,dc=ecoinformatics,dc=org"> <password>csilPspPJdMx8zt7L9XKXeUxZjkPgKZd.o7TTPC0oJOFmT2kQ/E92</password> <email>foo@foo.com</email> <surName>Smith</surName> <givenName>John</givenName> <organization>NCEAS</organization> <memberof>cn=nceas-dev,o=NCEAS,dc=ecoinformatics,dc=org</memberof> </user> <user dn="uid=brand,o=NCEAS,dc=ecoinformatics,dc=org"> <password>$2a$10$j8eGWJBEpj5MubdaqOeJje7oYw6JNc2aq2U7buoRw16kthwOEcWkC</password> </user> </users> <groups> <group name="cn=nceas-dev,o=NCEAS,dc=ecoinformatics,dc=org"> <description>Developers at NCEAS</description> </group> </groups> </subjects>hh}hhh U literal_blockq–h"}q—(U xml:spaceq˜Upreserveq™h']h&]h$]h%]h)]uh+Kh,hh]qšh5XÂ��<?xml version="1.0" encoding="UTF-8"?> <subjects> <users> <user dn="uid=john,o=NCEAS,dc=ecoinformatics,dc=org"> <password>csilPspPJdMx8zt7L9XKXeUxZjkPgKZd.o7TTPC0oJOFmT2kQ/E92</password> <email>foo@foo.com</email> <surName>Smith</surName> <givenName>John</givenName> <organization>NCEAS</organization> <memberof>cn=nceas-dev,o=NCEAS,dc=ecoinformatics,dc=org</memberof> </user> <user dn="uid=brand,o=NCEAS,dc=ecoinformatics,dc=org"> <password>$2a$10$j8eGWJBEpj5MubdaqOeJje7oYw6JNc2aq2U7buoRw16kthwOEcWkC</password> </user> </users> <groups> <group name="cn=nceas-dev,o=NCEAS,dc=ecoinformatics,dc=org"> <description>Developers at NCEAS</description> </group> </groups> </subjects>q›…qœ}q(hU�hh”ubaubh9)qž}qŸ(hXN���The format of the DN must look like uid=john,o=NCEAS,dc=ecoinformatics,dc=org.q hh}hhh h<h"}q¡(h$]h%]h&]h']h)]uh+K-h,hh]q¢h5XN���The format of the DN must look like uid=john,o=NCEAS,dc=ecoinformatics,dc=org.q£…q¤}q¥(hh hhžubaubh9)q¦}q§(hXZ���The format of the group name must look like cn=nceas-dev,o=NCEAS,dc=ecoinformatics,dc=org.q¨hh}hhh h<h"}q©(h$]h%]h&]h']h)]uh+K/h,hh]qªh5XZ���The format of the group name must look like cn=nceas-dev,o=NCEAS,dc=ecoinformatics,dc=org.q«…q¬}q(hh¨hh¦ubaubh9)q®}q¯(hX.��The password stored in the file is hashed using Bcrypt algorithm. If you have the "-i" in the "useradd" or "usermod" commands when you run the command line utility (see the following section), you will be prompted to input the password and the utility will hash the password and store it in the file. You may also get the hash of a password from any online tool, such as https://www.dailycred.com/blog/12/bcrypt-calculator (we don't have any guaranty on the security of those tools), then use the "-h" to pass the hashed password to the file by the utility.hh}hhh h<h"}q°(h$]h%]h&]h']h)]uh+K1h,hh]q±(h5Xt��The password stored in the file is hashed using Bcrypt algorithm. If you have the "-i" in the "useradd" or "usermod" commands when you run the command line utility (see the following section), you will be prompted to input the password and the utility will hash the password and store it in the file. You may also get the hash of a password from any online tool, such as q²…q³}q´(hXt��The password stored in the file is hashed using Bcrypt algorithm. If you have the "-i" in the "useradd" or "usermod" commands when you run the command line utility (see the following section), you will be prompted to input the password and the utility will hash the password and store it in the file. You may also get the hash of a password from any online tool, such as hh®ubcdocutils.nodes reference qµ)q¶}q·(hX3���https://www.dailycred.com/blog/12/bcrypt-calculatorq¸h"}q¹(Urefurih¸h']h&]h$]h%]h)]uhh®h]qºh5X3���https://www.dailycred.com/blog/12/bcrypt-calculatorq»…q¼}q½(hU�hh¶ubah U referenceq¾ubh5X‡��� (we don't have any guaranty on the security of those tools), then use the "-h" to pass the hashed password to the file by the utility.q¿…qÀ}qÁ(hX‡��� (we don't have any guaranty on the security of those tools), then use the "-h" to pass the hashed password to the file by the utility.hh®ubeubeubh)qÂ}qÃ(hU�hhhhh h!h"}qÄ(h$]h%]h&]h']qÅhah)]qÆhauh+K:h,hh]qÇ(h.)qÈ}qÉ(hX.���Utility for Password File Based AuthenticationqÊhhÂhhh h2h"}qË(h$]h%]h&]h']h)]uh+K:h,hh]qÌh5X.���Utility for Password File Based AuthenticationqÍ…qÎ}qÏ(hhÊhhÈubaubh9)qÐ}qÑ(hX¤���You can edit the password file manually or use Metacat's command line utility for managing users and groups. The utility is located in the deployed Metacat webapp::hhÂhhh h<h"}qÒ(h$]h%]h&]h']h)]uh+K;h,hh]qÓh5X£���You can edit the password file manually or use Metacat's command line utility for managing users and groups. The utility is located in the deployed Metacat webapp:qÔ…qÕ}qÖ(hX£���You can edit the password file manually or use Metacat's command line utility for managing users and groups. The utility is located in the deployed Metacat webapp:hhÐubaubh“)q×}qØ(hX1���$METACAT/WEB-INF/scripts/bash/authFileManager.sh.hhÂhhh h–h"}qÙ(h˜h™h']h&]h$]h%]h)]uh+K>h,hh]qÚh5X1���$METACAT/WEB-INF/scripts/bash/authFileManager.sh.qÛ…qÜ}qÝ(hU�hh×ubaubh9)qÞ}qß(hXO���You must be in the directory - $METACAT/WEB-INF/scripts/bash/ to run the file::qàhhÂhhh h<h"}qá(h$]h%]h&]h']h)]uh+K@h,hh]qâh5XN���You must be in the directory - $METACAT/WEB-INF/scripts/bash/ to run the file:qã…qä}qå(hXN���You must be in the directory - $METACAT/WEB-INF/scripts/bash/ to run the file:hhÞubaubh“)qæ}qç(hX!���cd $METACAT/WEB-INF/scripts/bash/hhÂhhh h–h"}qè(h˜h™h']h&]h$]h%]h)]uh+KBh,hh]qéh5X!���cd $METACAT/WEB-INF/scripts/bash/qê…që}qì(hU�hhæubaubh9)qí}qî(hX=���In order to run the file, you must make the file executable::qïhhÂhhh h<h"}qð(h$]h%]h&]h']h)]uh+KDh,hh]qñh5X<���In order to run the file, you must make the file executable:qò…qó}qô(hX<���In order to run the file, you must make the file executable:hhíubaubh“)qõ}qö(hX���chmod u+x authFileManager.shhhÂhhh h–h"}q÷(h˜h™h']h&]h$]h%]h)]uh+KFh,hh]qøh5X���chmod u+x authFileManager.shqù…qú}qû(hU�hhõubaubh9)qü}qý(hX.���You run the command as the owner of the file::qþhhÂhhh h<h"}qÿ(h$]h%]h&]h']h)]uh+KHh,hh]r���h5X-���You run the command as the owner of the file:r��…r��}r��(hX-���You run the command as the owner of the file:hhüubaubh“)r��}r��(hX���./authFileManager.sh [options]hhÂhhh h–h"}r��(h˜h™h']h&]h$]h%]h)]uh+KJh,hh]r��h5X���./authFileManager.sh [options]r��…r ��}r ��(hU�hj��ubaubh9)r��}r��(hX���Usage of the utility:r ��hhÂhhh h<h"}r��(h$]h%]h&]h']h)]uh+KLh,hh]r��h5X���Usage of the utility:r��…r��}r��(hj ��hj��ubaubh9)r��}r��(hX“���./authFileManager.sh useradd -i -dn <user-distinguish-name> [-g <group-name> -e <email-address> -s <surname> -f <given-name> -o <organizationName>]r��hhÂhhh h<h"}r��(h$]h%]h&]h']h)]uh+KNh,hh]r��h5X“���./authFileManager.sh useradd -i -dn <user-distinguish-name> [-g <group-name> -e <email-address> -s <surname> -f <given-name> -o <organizationName>]r��…r��}r��(hj��hj��ubaubh9)r��}r��(hX¥���./authFileManager.sh useradd -h <hashed-password> -dn <user-distinguish-name> [-g <group-name> -e <email-address> -s <surname> -f <given-name> -o <organizationName>]r��hhÂhhh h<h"}r��(h$]h%]h&]h']h)]uh+KPh,hh]r��h5X¥���./authFileManager.sh useradd -h <hashed-password> -dn <user-distinguish-name> [-g <group-name> -e <email-address> -s <surname> -f <given-name> -o <organizationName>]r ��…r!��}r"��(hj��hj��ubaubh9)r#��}r$��(hX@���./authFileManager.sh groupadd -g <group-name> [-d <description>]r%��hhÂhhh h<h"}r&��(h$]h%]h&]h']h)]uh+KRh,hh]r'��h5X@���./authFileManager.sh groupadd -g <group-name> [-d <description>]r(��…r)��}r*��(hj%��hj#��ubaubh9)r+��}r,��(hXE���./authFileManager.sh usermod -password -dn <user-distinguish-name> -ir-��hhÂhhh h<h"}r.��(h$]h%]h&]h']h)]uh+KTh,hh]r/��h5XE���./authFileManager.sh usermod -password -dn <user-distinguish-name> -ir0��…r1��}r2��(hj-��hj+��ubaubh9)r3��}r4��(hX[���./authFileManager.sh usermod -password -dn <user-distinguish-name> -h <new-hashed-password>r5��hhÂhhh h<h"}r6��(h$]h%]h&]h']h)]uh+KVh,hh]r7��h5X[���./authFileManager.sh usermod -password -dn <user-distinguish-name> -h <new-hashed-password>r8��…r9��}r:��(hj5��hj3��ubaubh9)r;��}r<��(hXX���./authFileManager.sh usermod -group -a -dn <user-distinguish-name> -g <added-group-name>r=��hhÂhhh h<h"}r>��(h$]h%]h&]h']h)]uh+KXh,hh]r?��h5XX���./authFileManager.sh usermod -group -a -dn <user-distinguish-name> -g <added-group-name>r@��…rA��}rB��(hj=��hj;��ubaubh9)rC��}rD��(hXZ���./authFileManager.sh usermod -group -r -dn <user-distinguish-name> -g <removed-group-name>rE��hhÂhhh h<h"}rF��(h$]h%]h&]h']h)]uh+KZh,hh]rG��h5XZ���./authFileManager.sh usermod -group -r -dn <user-distinguish-name> -g <removed-group-name>rH��…rI��}rJ��(hjE��hjC��ubaubcdocutils.nodes note rK��)rL��}rM��(hXn��Metacat currently uses Bcrypt algorithm to hash the password. The hashed password following the "-h" should be generated by a Bcrypt algorithm. The hash string usually contains $ signs which can interfere with the command line arguments. You should use two SINGLE quotes to wrap the entire hashed string. The <user-distinguish-name> must look like "uid=john,o=something,dc=something,dc=something" and the group-name must look like "cn=dev,o=something,dc=something,dc=something". If an option value has spaces, the value should be enclosed in double quotes. For example: ./authFileManager.sh groupadd -g cn=dev,o=something,dc=something,dc=something -d "Developers at NCEAS" The "-d <description>" option in the "groupadd" command is optional; "-g <groupname> -e <email-address> -s <surname> -f <given-name> -o <organizationName>" in the "useradd" command are optional as well.hhÂhhh UnoterN��h"}rO��(h$]h%]h&]h']h)]uh+Nh,hh]rP��(h9)rQ��}rR��(hX0��Metacat currently uses Bcrypt algorithm to hash the password. The hashed password following the "-h" should be generated by a Bcrypt algorithm. The hash string usually contains $ signs which can interfere with the command line arguments. You should use two SINGLE quotes to wrap the entire hashed string.rS��hjL��hhh h<h"}rT��(h$]h%]h&]h']h)]uh+K_h]rU��h5X0��Metacat currently uses Bcrypt algorithm to hash the password. The hashed password following the "-h" should be generated by a Bcrypt algorithm. The hash string usually contains $ signs which can interfere with the command line arguments. You should use two SINGLE quotes to wrap the entire hashed string.rV��…rW��}rX��(hjS��hjQ��ubaubh9)rY��}rZ��(hX���The <user-distinguish-name> must look like "uid=john,o=something,dc=something,dc=something" and the group-name must look like "cn=dev,o=something,dc=something,dc=something".r[��hjL��hhh h<h"}r\��(h$]h%]h&]h']h)]uh+Kbh]r]��h5X���The <user-distinguish-name> must look like "uid=john,o=something,dc=something,dc=something" and the group-name must look like "cn=dev,o=something,dc=something,dc=something".r^��…r_��}r`��(hj[��hjY��ubaubh9)ra��}rb��(hXÁ���If an option value has spaces, the value should be enclosed in double quotes. For example: ./authFileManager.sh groupadd -g cn=dev,o=something,dc=something,dc=something -d "Developers at NCEAS"rc��hjL��hhh h<h"}rd��(h$]h%]h&]h']h)]uh+Kdh]re��h5XÁ���If an option value has spaces, the value should be enclosed in double quotes. For example: ./authFileManager.sh groupadd -g cn=dev,o=something,dc=something,dc=something -d "Developers at NCEAS"rf��…rg��}rh��(hjc��hja��ubaubh9)ri��}rj��(hXÊ���The "-d <description>" option in the "groupadd" command is optional; "-g <groupname> -e <email-address> -s <surname> -f <given-name> -o <organizationName>" in the "useradd" command are optional as well.rk��hjL��hhh h<h"}rl��(h$]h%]h&]h']h)]uh+Kgh]rm��h5XÊ���The "-d <description>" option in the "groupadd" command is optional; "-g <groupname> -e <email-address> -s <surname> -f <given-name> -o <organizationName>" in the "useradd" command are optional as well.rn��…ro��}rp��(hjk��hji��ubaubeubeubh)rq��}rr��(hU�hhhhh h!h"}rs��(h$]h%]h&]h']rt��hah)]ru��hauh+Kkh,hh]rv��(h.)rw��}rx��(hX���LDAP-Based Authenticationry��hjq��hhh h2h"}rz��(h$]h%]h&]h']h)]uh+Kkh,hh]r{��h5X���LDAP-Based Authenticationr|��…r}��}r~��(hjy��hjw��ubaubh9)r��}r€��(hXà��Before the Metacat 2.4.0 release, LDAP was the default authentication mechanism and was configured to use the NCEAS LDAP server. We are now restricting access to the server to only trusted partners who can guarantee secure communication with their clients and the LDAP server. If you are not on the list, you can contact us for more information or you may use the password file authentication (for a small group of users) or set up your own LDAP server (for a big group of users).r��hjq��hhh h<h"}r‚��(h$]h%]h&]h']h)]uh+Klh,hh]rƒ��h5Xà��Before the Metacat 2.4.0 release, LDAP was the default authentication mechanism and was configured to use the NCEAS LDAP server. We are now restricting access to the server to only trusted partners who can guarantee secure communication with their clients and the LDAP server. If you are not on the list, you can contact us for more information or you may use the password file authentication (for a small group of users) or set up your own LDAP server (for a big group of users).r„��…r…��}r†��(hj��hj��ubaubeubeubahU�Utransformerr‡��NU footnote_refsrˆ��}r‰��UrefnamesrŠ��}r‹��Usymbol_footnotesrŒ��]r��Uautofootnote_refsrŽ��]r��Usymbol_footnote_refsr��]r‘��U citationsr’��]r“��h,hUcurrent_liner”��NUtransform_messagesr•��]r–��Ureporterr—��NUid_startr˜��KU autofootnotesr™��]rš��U citation_refsr›��}rœ��Uindirect_targetsr��]rž��UsettingsrŸ��(cdocutils.frontend Values r ��or¡��}r¢��(Ufootnote_backlinksr£��KUrecord_dependenciesr¤��NUrfc_base_urlr¥��Uhttps://tools.ietf.org/html/r¦��U tracebackr§��ˆUpep_referencesr¨��NUstrip_commentsr©��NU toc_backlinksrª��Uentryr«��U language_coder¬��Uenr��U datestampr®��NUreport_levelr¯��KU_destinationr°��NU halt_levelr±��KU strip_classesr²��Nh2NUerror_encoding_error_handlerr³��Ubackslashreplacer´��Udebugrµ��NUembed_stylesheetr¶��‰Uoutput_encoding_error_handlerr·��Ustrictr¸��U sectnum_xformr¹��KUdump_transformsrº��NU docinfo_xformr»��KUwarning_streamr¼��NUpep_file_url_templater½��Upep-%04dr¾��Uexit_status_levelr¿��KUconfigrÀ��NUstrict_visitorrÁ��NUcloak_email_addressesrÂ��ˆUtrim_footnote_reference_spacerÃ��‰UenvrÄ��NUdump_pseudo_xmlrÅ��NUexpose_internalsrÆ��NUsectsubtitle_xformrÇ��‰Usource_linkrÈ��NUrfc_referencesrÉ��NUoutput_encodingrÊ��Uutf-8rË��U source_urlrÌ��NUinput_encodingrÍ��U utf-8-sigrÎ��U_disable_configrÏ��NU id_prefixrÐ��U�U tab_widthrÑ��KUerror_encodingrÒ��UUTF-8rÓ��U_sourcerÔ��hUgettext_compactrÕ��ˆU generatorrÖ��NUdump_internalsr×��NUsmart_quotesrØ��‰Upep_base_urlrÙ��U https://www.python.org/dev/peps/rÚ��Usyntax_highlightrÛ��UlongrÜ��Uinput_encoding_error_handlerrÝ��j¸��Uauto_id_prefixrÞ��Uidrß��Udoctitle_xformrà��‰Ustrip_elements_with_classesrá��NU _config_filesrâ��]Ufile_insertion_enabledrã��ˆUraw_enabledrä��KU dump_settingsrå��NubUsymbol_footnote_startræ��K�Uidsrç��}rè��(hh}hhÂhhhjq��uUsubstitution_namesré��}rê��h h,h"}rë��(h$]h']h&]Usourcehh%]h)]uU footnotesrì��]rí��Urefidsrî��}rï��ub.