{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/24559","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/24559/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/24559/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/24559/events","html_url":"https://github.com/owncloud/core/pull/24559","id":154201081,"number":24559,"title":"two factor auth","user":{"login":"ChristophWurst","id":1374172,"avatar_url":"https://avatars.githubusercontent.com/u/1374172?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristophWurst","html_url":"https://github.com/ChristophWurst","followers_url":"https://api.github.com/users/ChristophWurst/followers","following_url":"https://api.github.com/users/ChristophWurst/following{/other_user}","gists_url":"https://api.github.com/users/ChristophWurst/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristophWurst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristophWurst/subscriptions","organizations_url":"https://api.github.com/users/ChristophWurst/orgs","repos_url":"https://api.github.com/users/ChristophWurst/repos","events_url":"https://api.github.com/users/ChristophWurst/events{/privacy}","received_events_url":"https://api.github.com/users/ChristophWurst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/3%20-%20To%20Review","name":"3 - To Review","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement","name":"enhancement","color":"02e10c"},{"url":"https://api.github.com/repos/owncloud/core/labels/security","name":"security","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/62","html_url":"https://github.com/owncloud/core/milestones/9.1-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/62/labels","id":1322460,"number":62,"title":"9.1-current","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":736,"closed_issues":807,"state":"open","created_at":"2015-09-24T16:30:14Z","updated_at":"2016-05-19T14:17:53Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-05-11T09:40:51Z","updated_at":"2016-05-19T14:20:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/24559","html_url":"https://github.com/owncloud/core/pull/24559","diff_url":"https://github.com/owncloud/core/pull/24559.diff","patch_url":"https://github.com/owncloud/core/pull/24559.patch"},"body":"This PR adds two factor authorization to all requests using the app framework. Unless at least one 2FA app is enabled (this app includes a sample app), nothing changes with respect to authentication. The dummy app included prompts the user for a token sent by email, which is the hard-coded value 'passme'. This app will be moved into a separate repo as it's not required for core. This 2FA system architecture allows app developers to write own 2FA providers which can be plugged in as apps.\r\n\r\nfixes #12102\r\n\r\nTODO - basic\r\n- [x] parse 2FA providers from info.xml\r\n- [x] build list of 2FA providers\r\n- [x] check if 2FA is enforced for the user\r\n- [x] show 2FA provider selection view\r\n- [x] show selected 2FA provider challenge view\r\n- [x] check the validity of the submitted token\r\n- [x] show 2FA token error message\r\n- [x] unit tests\r\n- [x] OCC command to disable 2FA for users\r\n- [x] prettier 2FA login screen\r\n\r\nTODO - email 2FA app\r\n- [x] dummy validation (always enforce + hard-coded token)\r\n\r\nTODO - enhanced (done in separate PRs if possible)\r\n- if 2FA is used, clients can only log in with client-specific passwords\r\n- extract demo app into it's own repo\r\n- send out real email with a generated temporary password\r\n- remember redirect_url across requests\r\n\r\nOther ideas\r\n- make it possible to cancel 2FA to log in as an other user"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/220338739","html_url":"https://github.com/owncloud/core/pull/24559#issuecomment-220338739","issue_url":"https://api.github.com/repos/owncloud/core/issues/24559","id":220338739,"user":{"login":"ChristophWurst","id":1374172,"avatar_url":"https://avatars.githubusercontent.com/u/1374172?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristophWurst","html_url":"https://github.com/ChristophWurst","followers_url":"https://api.github.com/users/ChristophWurst/followers","following_url":"https://api.github.com/users/ChristophWurst/following{/other_user}","gists_url":"https://api.github.com/users/ChristophWurst/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristophWurst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristophWurst/subscriptions","organizations_url":"https://api.github.com/users/ChristophWurst/orgs","repos_url":"https://api.github.com/users/ChristophWurst/repos","events_url":"https://api.github.com/users/ChristophWurst/events{/privacy}","received_events_url":"https://api.github.com/users/ChristophWurst/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T14:20:32Z","updated_at":"2016-05-19T14:20:32Z","body":"I'll extract the sample app into it's own repo https://github.com/owncloud/twofactor_email"}}