{"action":"created","comment":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/75318847","id":75318847,"diff_hunk":"@@ -59,13 +59,22 @@ The command will be called with two arguments\n \n cockpit-ws will then send contents of the Authorization http header, without the\n auth scheme, on fd #3 to the command. Once the command has processed the credentials\n-it MUST write a JSON response to fd #3.\n+it MUST write a JSON response to fd #3. Cockpit opens this fd using SOCK_SEQPACKET so\n+messages can be sent and received in one operation. Each message should be no more\n+than 65536 bytes.\n \n By default cockpit-ws will wait a maximum of 30 seconds to receive this response.\n The number of seconds to wait can be adjusted by adding a timeout parameter along\n side the auth schema configuration in your config file. The given value should be\n a number between 1 and 900.\n \n+If more information is needed the command should response with a json object containing\n+a ```prompt``` string. These message will be displayed to the user and the user will be\n+prompted for a response. If the user does not respond within 30 seconds the command will be","path":"doc/authentication.md","position":16,"original_position":16,"commit_id":"29b9603c010cbc360545424a685bb8fbbde70a13","original_commit_id":"29b9603c010cbc360545424a685bb8fbbde70a13","user":{"login":"stefwalter","id":795070,"avatar_url":"https://avatars.githubusercontent.com/u/795070?v=3","gravatar_id":"","url":"https://api.github.com/users/stefwalter","html_url":"https://github.com/stefwalter","followers_url":"https://api.github.com/users/stefwalter/followers","following_url":"https://api.github.com/users/stefwalter/following{/other_user}","gists_url":"https://api.github.com/users/stefwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/stefwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefwalter/subscriptions","organizations_url":"https://api.github.com/users/stefwalter/orgs","repos_url":"https://api.github.com/users/stefwalter/repos","events_url":"https://api.github.com/users/stefwalter/events{/privacy}","received_events_url":"https://api.github.com/users/stefwalter/received_events","type":"User","site_admin":false},"body":"> What would you suggest as a sane default? \r\n\r\nHow long does it take to look for your two factor key press the key and type the code. Seems like it could be much longer than 30 seconds. What about a global timeout for the entire authentication rather than per response?\r\n\r\n> I don't have any indication on the login page of how long you have. Not sure how easy the animation will be to setup without jquery but i can look into it.\r\n\r\nThat can be a follow up. Pure CSS can work. I can probably help.","created_at":"2016-08-18T14:32:18Z","updated_at":"2016-08-18T14:32:18Z","html_url":"https://github.com/cockpit-project/cockpit/pull/4827#discussion_r75318847","pull_request_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827","_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/75318847"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/4827#discussion_r75318847"},"pull_request":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827"}}},"pull_request":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827","id":80184871,"html_url":"https://github.com/cockpit-project/cockpit/pull/4827","diff_url":"https://github.com/cockpit-project/cockpit/pull/4827.diff","patch_url":"https://github.com/cockpit-project/cockpit/pull/4827.patch","issue_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/4827","number":4827,"state":"open","locked":false,"title":"ws: Support conversations in authentication","user":{"login":"petervo","id":10439156,"avatar_url":"https://avatars.githubusercontent.com/u/10439156?v=3","gravatar_id":"","url":"https://api.github.com/users/petervo","html_url":"https://github.com/petervo","followers_url":"https://api.github.com/users/petervo/followers","following_url":"https://api.github.com/users/petervo/following{/other_user}","gists_url":"https://api.github.com/users/petervo/gists{/gist_id}","starred_url":"https://api.github.com/users/petervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petervo/subscriptions","organizations_url":"https://api.github.com/users/petervo/orgs","repos_url":"https://api.github.com/users/petervo/repos","events_url":"https://api.github.com/users/petervo/events{/privacy}","received_events_url":"https://api.github.com/users/petervo/received_events","type":"User","site_admin":false},"body":"Supoprt authentication methods that take several requests / responses to complete. Start by supporting PAM Conversations.\r\n\r\nStill needs unit tests and SSH support","created_at":"2016-08-05T03:45:50Z","updated_at":"2016-08-18T14:32:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba8373acd58ef7c16282f8258901770ff1055b81","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827/commits","review_comments_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827/comments","review_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/4827/comments","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/29b9603c010cbc360545424a685bb8fbbde70a13","head":{"label":"petervo:pam-conv","ref":"pam-conv","sha":"29b9603c010cbc360545424a685bb8fbbde70a13","user":{"login":"petervo","id":10439156,"avatar_url":"https://avatars.githubusercontent.com/u/10439156?v=3","gravatar_id":"","url":"https://api.github.com/users/petervo","html_url":"https://github.com/petervo","followers_url":"https://api.github.com/users/petervo/followers","following_url":"https://api.github.com/users/petervo/following{/other_user}","gists_url":"https://api.github.com/users/petervo/gists{/gist_id}","starred_url":"https://api.github.com/users/petervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petervo/subscriptions","organizations_url":"https://api.github.com/users/petervo/orgs","repos_url":"https://api.github.com/users/petervo/repos","events_url":"https://api.github.com/users/petervo/events{/privacy}","received_events_url":"https://api.github.com/users/petervo/received_events","type":"User","site_admin":false},"repo":{"id":28927963,"name":"cockpit","full_name":"petervo/cockpit","owner":{"login":"petervo","id":10439156,"avatar_url":"https://avatars.githubusercontent.com/u/10439156?v=3","gravatar_id":"","url":"https://api.github.com/users/petervo","html_url":"https://github.com/petervo","followers_url":"https://api.github.com/users/petervo/followers","following_url":"https://api.github.com/users/petervo/following{/other_user}","gists_url":"https://api.github.com/users/petervo/gists{/gist_id}","starred_url":"https://api.github.com/users/petervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petervo/subscriptions","organizations_url":"https://api.github.com/users/petervo/orgs","repos_url":"https://api.github.com/users/petervo/repos","events_url":"https://api.github.com/users/petervo/events{/privacy}","received_events_url":"https://api.github.com/users/petervo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petervo/cockpit","description":"Cockpit, a user interface for GNU/Linux servers","fork":true,"url":"https://api.github.com/repos/petervo/cockpit","forks_url":"https://api.github.com/repos/petervo/cockpit/forks","keys_url":"https://api.github.com/repos/petervo/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petervo/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petervo/cockpit/teams","hooks_url":"https://api.github.com/repos/petervo/cockpit/hooks","issue_events_url":"https://api.github.com/repos/petervo/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/petervo/cockpit/events","assignees_url":"https://api.github.com/repos/petervo/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/petervo/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/petervo/cockpit/tags","blobs_url":"https://api.github.com/repos/petervo/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petervo/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petervo/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/petervo/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petervo/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/petervo/cockpit/languages","stargazers_url":"https://api.github.com/repos/petervo/cockpit/stargazers","contributors_url":"https://api.github.com/repos/petervo/cockpit/contributors","subscribers_url":"https://api.github.com/repos/petervo/cockpit/subscribers","subscription_url":"https://api.github.com/repos/petervo/cockpit/subscription","commits_url":"https://api.github.com/repos/petervo/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/petervo/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/petervo/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/petervo/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/petervo/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/petervo/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petervo/cockpit/merges","archive_url":"https://api.github.com/repos/petervo/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petervo/cockpit/downloads","issues_url":"https://api.github.com/repos/petervo/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/petervo/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/petervo/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/petervo/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petervo/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/petervo/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/petervo/cockpit/deployments","created_at":"2015-01-07T18:36:59Z","updated_at":"2016-03-16T00:43:55Z","pushed_at":"2016-08-17T15:14:05Z","git_url":"git://github.com/petervo/cockpit.git","ssh_url":"git@github.com:petervo/cockpit.git","clone_url":"https://github.com/petervo/cockpit.git","svn_url":"https://github.com/petervo/cockpit","homepage":"http://www.cockpit-project.org/","size":26404,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cockpit-project:master","ref":"master","sha":"a59af5d44505d1ed8a00e1c3464ed5e23f18ddad","user":{"login":"cockpit-project","id":5765104,"avatar_url":"https://avatars.githubusercontent.com/u/5765104?v=3","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"repo":{"id":14049216,"name":"cockpit","full_name":"cockpit-project/cockpit","owner":{"login":"cockpit-project","id":5765104,"avatar_url":"https://avatars.githubusercontent.com/u/5765104?v=3","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockpit-project/cockpit","description":"Cockpit, a user interface for Linux servers","fork":false,"url":"https://api.github.com/repos/cockpit-project/cockpit","forks_url":"https://api.github.com/repos/cockpit-project/cockpit/forks","keys_url":"https://api.github.com/repos/cockpit-project/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockpit-project/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockpit-project/cockpit/teams","hooks_url":"https://api.github.com/repos/cockpit-project/cockpit/hooks","issue_events_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/cockpit-project/cockpit/events","assignees_url":"https://api.github.com/repos/cockpit-project/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/cockpit-project/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/cockpit-project/cockpit/tags","blobs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockpit-project/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockpit-project/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/cockpit-project/cockpit/languages","stargazers_url":"https://api.github.com/repos/cockpit-project/cockpit/stargazers","contributors_url":"https://api.github.com/repos/cockpit-project/cockpit/contributors","subscribers_url":"https://api.github.com/repos/cockpit-project/cockpit/subscribers","subscription_url":"https://api.github.com/repos/cockpit-project/cockpit/subscription","commits_url":"https://api.github.com/repos/cockpit-project/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockpit-project/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockpit-project/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/cockpit-project/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockpit-project/cockpit/merges","archive_url":"https://api.github.com/repos/cockpit-project/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockpit-project/cockpit/downloads","issues_url":"https://api.github.com/repos/cockpit-project/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/cockpit-project/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/cockpit-project/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockpit-project/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/cockpit-project/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/cockpit-project/cockpit/deployments","created_at":"2013-11-01T17:36:46Z","updated_at":"2016-08-18T14:19:36Z","pushed_at":"2016-08-18T12:36:41Z","git_url":"git://github.com/cockpit-project/cockpit.git","ssh_url":"git@github.com:cockpit-project/cockpit.git","clone_url":"https://github.com/cockpit-project/cockpit.git","svn_url":"https://github.com/cockpit-project/cockpit","homepage":"http://www.cockpit-project.org/","size":38060,"stargazers_count":1678,"watchers_count":1678,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":221,"mirror_url":null,"open_issues_count":414,"forks":221,"open_issues":414,"watchers":1678,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/4827"},"issue":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/4827"},"comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/4827/comments"},"review_comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827/comments"},"review_comment":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4827/commits"},"statuses":{"href":"https://api.github.com/repos/cockpit-project/cockpit/statuses/29b9603c010cbc360545424a685bb8fbbde70a13"}}}}
{"actor":{"display_login":"stefwalter"}}