{ "info": { "author": "Dave Vieglais", "author_email": "datadavev@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering" ], "description": "d1Login\n=======\n\nPython helper for authenticating in a DataONE environment.\n\nThe d1_certificate library offers some routines to assist with authenticating for interactions with DataONE services.\nAuthentication requires a web browser UI, and so is not suitable for use on headless systems. The basic process is:\n\n1. A web browser is opened to select an identity provider\n2. Credentials are entered into the selected IDP\n3. A certificate signing request is created and token information is retieved from CILogon\n4. The certificate is signed and moved to a consistent location.\n\nCaveats:\n\n1. A web browser is required\n2. It is assumed that the file downloaded by the web browser is located in ${HOME}/Downloads\n3. The generated certificate is placed into ${HOME}/.dataone/certificates\n4. The subject mapping and group info in the certificate is static. Be aware that the certificate will need to be\n regenerated if your user id mapping or group membership needs to change.\n\n\nInstallation\n------------\n\nRelease install::\n\n pip install -U d1login\n\nDevelopment install::\n\n git clone\n cd d1Login\n pip install -U -e .\n\n\nExample\n-------\n\nThe commandline app will open a web browser at the appropriate login URL. After authenticating, the browser will\ndownload a ``.jnlp`` file. This should be placed in ~/Downloads. The script will be waiting (upto 60 seconds) for the\n``.jnlp`` and once available, will process the file and request the certificate.\n\nCommandline::\n\n d1login\n <>\n Certificate downloaded to: /Users/vieglais/.dataone/certificates/x509up_u501\n\n\nAs a library::\n\n >>> import d1_certificate\n >>> service = d1_certificate.LOGIN_SERVICE['dev']\n >>> certpath = d1_certificate.login(overwrite=True, service=service)\n # Browser window opens for authentication\n\n >>> print certpath\n /Users/vieglais/.dataone/certificates/x509up_u501\n\n >>> d1_certificate.getSubjectFromCertFile( certpath )\n {'not_after': '20151216225323Z',\n 'not_before': '20151216044823Z',\n 'status': True,\n 'subject': 'CN=Dave Vieglais A34511,O=Google,C=US,DC=cilogon,DC=org',\n 'subject_info': None}\n\nOn OS X, the certificate can then be imported into the keychain for browser interactions with nodes in the authenticated\nenvironment. For example::\n\n CERT=/Users/vieglais/.dataone/certificates/x509up_u501\n openssl x509 -outform der -in ${CERT} -out \"${CERT}.der\"\n security add-certificates \"${CERT}.der\"\n\nNow open a browser (chrome or safari, firefox uses it's own cert management independent of keychain)\nand visit the URL::\n\n https://cn-dev.test.dataone.org/cn/v2/diag/subject\n\nYou should see your credentials in the xml response.\n\nOn Yosemite, you can no longer use .pem format certificates to authenticate using curl\n[See: http://curl.haxx.se/mail/archive-2014-10/0053.html ]. Instead, convert to a .p12 format certificate and use that\ninstead. Note of course, that entering your password on the command line like this is a security risk since it will\nappear in bash history, log files, and so forth. Example::\n\n CERT=/Users/vieglais/.dataone/certificates/x509up_u501\n openssl pkcs12 -export -in ${CERT} -out ${CERT}.p12 -passout pass:Some_Password\n curl -E ${CERT}.p12:Some_Password \"https://cn.dataone.org/cn/v2/diag/subject\"", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/DataONEorg/d1Login", "keywords": "openssl,DataONE,certificate,authentication", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "d1Login", "package_url": "https://pypi.org/project/d1Login/", "platform": "", "project_url": "https://pypi.org/project/d1Login/", "project_urls": { "Homepage": "https://github.com/DataONEorg/d1Login" }, "release_url": "https://pypi.org/project/d1Login/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Tool to assist with certificate login for DataONE", "version": "1.0.1" }, "last_serial": 3619317, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "43d3c1cf954af23919f95291e8a66d1b", "sha256": "edb7d96a77c167a0ad3d87e1a7e3549895502506b8972286f42a5bcf26bfbcd3" }, "downloads": -1, "filename": "d1Login-1.0.0.tar.gz", "has_sig": false, "md5_digest": "43d3c1cf954af23919f95291e8a66d1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9255, "upload_time": "2018-02-26T23:54:12", "url": "https://files.pythonhosted.org/packages/56/8b/19b36ffb2aa3b4a42849e505d6a5f15171e90304a4b4239e91d3eec1ef3d/d1Login-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "80c2152b41ec55cb2f11d81b8e65b8d6", "sha256": "239bc05eca15821a48abe5f9fde267b398b4a6025e03586d4020e9f0c1b89f59" }, "downloads": -1, "filename": "d1Login-1.0.1.tar.gz", "has_sig": false, "md5_digest": "80c2152b41ec55cb2f11d81b8e65b8d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9338, "upload_time": "2018-02-27T01:10:40", "url": "https://files.pythonhosted.org/packages/ab/1d/cca846954d3d4101cfd166877dc2173d61f6513105e7d196dc1a32b61190/d1Login-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80c2152b41ec55cb2f11d81b8e65b8d6", "sha256": "239bc05eca15821a48abe5f9fde267b398b4a6025e03586d4020e9f0c1b89f59" }, "downloads": -1, "filename": "d1Login-1.0.1.tar.gz", "has_sig": false, "md5_digest": "80c2152b41ec55cb2f11d81b8e65b8d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9338, "upload_time": "2018-02-27T01:10:40", "url": "https://files.pythonhosted.org/packages/ab/1d/cca846954d3d4101cfd166877dc2173d61f6513105e7d196dc1a32b61190/d1Login-1.0.1.tar.gz" } ] }