{"action":"created","issue":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/3289","repository_url":"https://api.github.com/repos/IQSS/dataverse","labels_url":"https://api.github.com/repos/IQSS/dataverse/issues/3289/labels{/name}","comments_url":"https://api.github.com/repos/IQSS/dataverse/issues/3289/comments","events_url":"https://api.github.com/repos/IQSS/dataverse/issues/3289/events","html_url":"https://github.com/IQSS/dataverse/pull/3289","id":171699966,"number":3289,"title":"allow sha-1 password during convert to shib #3287","user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Status:%20QA","name":"Status: QA","color":"336633"}],"state":"open","locked":false,"assignee":{"login":"kcondon","id":4983816,"avatar_url":"https://avatars.githubusercontent.com/u/4983816?v=3","gravatar_id":"","url":"https://api.github.com/users/kcondon","html_url":"https://github.com/kcondon","followers_url":"https://api.github.com/users/kcondon/followers","following_url":"https://api.github.com/users/kcondon/following{/other_user}","gists_url":"https://api.github.com/users/kcondon/gists{/gist_id}","starred_url":"https://api.github.com/users/kcondon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcondon/subscriptions","organizations_url":"https://api.github.com/users/kcondon/orgs","repos_url":"https://api.github.com/users/kcondon/repos","events_url":"https://api.github.com/users/kcondon/events{/privacy}","received_events_url":"https://api.github.com/users/kcondon/received_events","type":"User","site_admin":false},"assignees":[{"login":"kcondon","id":4983816,"avatar_url":"https://avatars.githubusercontent.com/u/4983816?v=3","gravatar_id":"","url":"https://api.github.com/users/kcondon","html_url":"https://github.com/kcondon","followers_url":"https://api.github.com/users/kcondon/followers","following_url":"https://api.github.com/users/kcondon/following{/other_user}","gists_url":"https://api.github.com/users/kcondon/gists{/gist_id}","starred_url":"https://api.github.com/users/kcondon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcondon/subscriptions","organizations_url":"https://api.github.com/users/kcondon/orgs","repos_url":"https://api.github.com/users/kcondon/repos","events_url":"https://api.github.com/users/kcondon/events{/privacy}","received_events_url":"https://api.github.com/users/kcondon/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/IQSS/dataverse/milestones/50","html_url":"https://github.com/IQSS/dataverse/milestones/4.5%20-%20Metadata%20Export%20and%20Harvesting","labels_url":"https://api.github.com/repos/IQSS/dataverse/milestones/50/labels","id":1564325,"number":50,"title":"4.5 - Metadata Export and Harvesting","description":"Metadata Export will allow for federation and interoperability with other systems to help make Dataverse more widely and easily discoverable. Another key function of the export is not only to share metadata but to store it in the file system in a preservation format. \r\n\r\nHarvesting allows the metadata from datasets from another site to be imported so they appear to be local, though data files remain on the remote site. This makes it possible to access content from data repositories and other sites with interesting content as long as they support the protocols Dataverse uses. Additionally, harvesting allows for Dataverse installations and other repositories to share metadata with each other to create a data sharing community and provide more access to the datasets stored in each repository.\r\n\r\n","creator":{"login":"scolapasta","id":4268292,"avatar_url":"https://avatars.githubusercontent.com/u/4268292?v=3","gravatar_id":"","url":"https://api.github.com/users/scolapasta","html_url":"https://github.com/scolapasta","followers_url":"https://api.github.com/users/scolapasta/followers","following_url":"https://api.github.com/users/scolapasta/following{/other_user}","gists_url":"https://api.github.com/users/scolapasta/gists{/gist_id}","starred_url":"https://api.github.com/users/scolapasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scolapasta/subscriptions","organizations_url":"https://api.github.com/users/scolapasta/orgs","repos_url":"https://api.github.com/users/scolapasta/repos","events_url":"https://api.github.com/users/scolapasta/events{/privacy}","received_events_url":"https://api.github.com/users/scolapasta/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":48,"state":"open","created_at":"2016-02-04T20:12:20Z","updated_at":"2016-08-17T16:23:27Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-08-17T16:19:08Z","updated_at":"2016-08-17T18:14:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/IQSS/dataverse/pulls/3289","html_url":"https://github.com/IQSS/dataverse/pull/3289","diff_url":"https://github.com/IQSS/dataverse/pull/3289.diff","patch_url":"https://github.com/IQSS/dataverse/pull/3289.patch"},"body":"# RFI Checklist\r\n\r\n### 1. Related Issues\r\n\r\n- #3287 Upgraded (Bcrypt) password required for conversion from local to Shibboleth account \r\n\r\n---\r\n### 2. Pull Request Checklist\r\n\r\n- [x]  Functionality completed as described in FRD (no FRD)\r\n- [ ]  Dependencies, risks, assumptions in FRD addressed (no FRD)\r\n- [x]  Unit tests completed (REST Assured tests)\r\n- [x]  Deployment requirements identified (e.g., SQL scripts, indexing) (none)\r\n- [x]  Documentation completed (none)\r\n- [x]  All code checkins completed (none)\r\n\r\n---\r\n### 3. Review Checklist\r\n\r\n_**After** the pull request has been submitted, fill out this section._\r\n\r\n- [ ]  Code review completed or waived\r\n- [ ]  Testing requirements completed\r\n- [ ]  Usability testing completed or waived\r\n- [ ]  Support testing completed or waived\r\n- [ ]  Merged with develop branch and resolved conflicts\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/comments/240499171","html_url":"https://github.com/IQSS/dataverse/pull/3289#issuecomment-240499171","issue_url":"https://api.github.com/repos/IQSS/dataverse/issues/3289","id":240499171,"user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T18:14:32Z","updated_at":"2016-08-17T18:14:32Z","body":"@kcondon @akio-sone @donsizemore I thought it might be helpful for you to see how I tested this locally.\r\n\r\nStep 1 is to create a local account with an email address that you know will match the email address that the Shib IdP will assert (this is how the conversion process is kicked off). I used \"ghopper@mailinator.com\".\r\n\r\nStep 2 is to set `passwordencryptionversion` to \"0\" and `encryptedpassword` to a known password. `4G7xxL9z11/JKN4jHPn4g9iIQck=` is \"sha-1Pass\". (Hat tip to @michbarsinai for the info at https://github.com/IQSS/dataverse/pull/2922#issuecomment-190818688 .) Here's how it looks:\r\n\r\n```\r\n(dataverse) murphy:dataverse pdurbin$ psql dataverse_db -c 'select email,encryptedpassword,passwordencryptionversion from builtinuser where id = 213;'\r\n         email          |      encryptedpassword       | passwordencryptionversion \r\n------------------------+------------------------------+---------------------------\r\n ghopper@mailinator.com | 4G7xxL9z11/JKN4jHPn4g9iIQck= |                         0\r\n(1 row)\r\n```\r\n\r\nThen, you log in with Shib. (In dev, I used the curl command below to get \"ghopper@mailinator.com\" from the Shib IdP but this wont work on a real server: `curl http://localhost:8080/api/admin/settings/:DebugShibAccountType -X PUT -d HARVARD2`)\r\n\r\nYou should be prompted for to convert. Here are the screenshots I saw:\r\n\r\n![screen shot 2016-08-17 at 12 09 17 pm](https://cloud.githubusercontent.com/assets/21006/17747888/d78b7bc8-6484-11e6-9630-32fc87504e1d.png)\r\n\r\n![screen shot 2016-08-17 at 12 09 38 pm](https://cloud.githubusercontent.com/assets/21006/17747889/d78fac0c-6484-11e6-9b14-75dce0cbf2de.png)\r\n\r\nThis is the expected output in the logs:\r\n\r\n```\r\n[2016-08-17T12:09:26.596-0400] [glassfish 4.1] [INFO] [] [edu.harvard.iq.dataverse.authorization.providers.shib.ShibServiceBean] [tid: _ThreadID=93 _ThreadName=http-listener-1(3)] [timeMillis: 1471450166596] [levelValue: 800] [[\r\n  The username and/or password entered is invalid: passwordreset.xhtml?token=093da2c2-1e39-40b4-bcc2-b95eee69863c&faces-redirect=true]]\r\n\r\n[2016-08-17T12:09:26.597-0400] [glassfish 4.1] [INFO] [] [edu.harvard.iq.dataverse.authorization.providers.shib.ShibServiceBean] [tid: _ThreadID=93 _ThreadName=http-listener-1(3)] [timeMillis: 1471450166597] [levelValue: 800] [[\r\n  AuthenticationFailedException caught in canLogInAsBuiltinUser: The username and/or password entered is invalid: passwordreset.xhtml?token=093da2c2-1e39-40b4-bcc2-b95eee69863c&faces-redirect=true - Maybe the user (ghopper) hasn't upgraded their password? Checking the old password...]]\r\n\r\n[2016-08-17T12:09:26.601-0400] [glassfish 4.1] [INFO] [] [edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean] [tid: _ThreadID=93 _ThreadName=http-listener-1(3)] [timeMillis: 1471450166601] [levelValue: 800] [[\r\n  converting user 221 from builtin to shib]]\r\n```"}}
{"actor":{"display_login":"pdurbin"}}