{"action":"opened","number":40,"pull_request":{"url":"https://api.github.com/repos/edx/programs/pulls/40","id":50593650,"html_url":"https://github.com/edx/programs/pull/40","diff_url":"https://github.com/edx/programs/pull/40.diff","patch_url":"https://github.com/edx/programs/pull/40.patch","issue_url":"https://api.github.com/repos/edx/programs/issues/40","number":40,"state":"open","locked":false,"title":"adjust JWT_LEEWAY and use custom JWT decode function","user":{"login":"jimabramson","id":1349368,"avatar_url":"https://avatars.githubusercontent.com/u/1349368?v=3","gravatar_id":"","url":"https://api.github.com/users/jimabramson","html_url":"https://github.com/jimabramson","followers_url":"https://api.github.com/users/jimabramson/followers","following_url":"https://api.github.com/users/jimabramson/following{/other_user}","gists_url":"https://api.github.com/users/jimabramson/gists{/gist_id}","starred_url":"https://api.github.com/users/jimabramson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimabramson/subscriptions","organizations_url":"https://api.github.com/users/jimabramson/orgs","repos_url":"https://api.github.com/users/jimabramson/repos","events_url":"https://api.github.com/users/jimabramson/events{/privacy}","received_events_url":"https://api.github.com/users/jimabramson/received_events","type":"User","site_admin":false},"body":"ECOM-2839\r\n\r\nProcess of elimination points to the \"iat\" (issued at) claim in programs JWT tokens as the cause of intermittent bursts of 401 errors.  This is the only claim with a dynamic value present in these tokens that is not present in ecom tokens (which do not experience such errors).  It's a timestamp on the generation of the JWT.   If the clock on a host where the JWT is generated is even a fraction of a second ahead of the clock on the host where it's read, the JWT can appear to have been generated in the future, and thus be considered invalid.\r\n\r\n\"Leeway\" is a setting which allows the JWT library to tolerate drift between clocks on two systems - this PR changes it from the library default (zero tolerance) to 1 second.\r\n\r\nAlso in this PR are changes to require the presence of \"exp\" and \"iat\" claims, and to get more specific log messages for invalid JWT tokens in case fixing the leeway doesn't completely address the problem.\r\n\r\n@rlucioni @cpennington @clintonb \r\n ","created_at":"2015-11-13T01:27:50Z","updated_at":"2015-11-13T01:27:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/programs/pulls/40/commits","review_comments_url":"https://api.github.com/repos/edx/programs/pulls/40/comments","review_comment_url":"https://api.github.com/repos/edx/programs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/programs/issues/40/comments","statuses_url":"https://api.github.com/repos/edx/programs/statuses/2b669134c476e81ba327e7366c7059ec9aa7a44c","head":{"label":"edx:jsa/ecom-2839-2","ref":"jsa/ecom-2839-2","sha":"2b669134c476e81ba327e7366c7059ec9aa7a44c","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":42223848,"name":"programs","full_name":"edx/programs","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/programs","description":"Django application used as the backend to support Programs-based product lines such as edX's XSeries offering.","fork":false,"url":"https://api.github.com/repos/edx/programs","forks_url":"https://api.github.com/repos/edx/programs/forks","keys_url":"https://api.github.com/repos/edx/programs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/programs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/programs/teams","hooks_url":"https://api.github.com/repos/edx/programs/hooks","issue_events_url":"https://api.github.com/repos/edx/programs/issues/events{/number}","events_url":"https://api.github.com/repos/edx/programs/events","assignees_url":"https://api.github.com/repos/edx/programs/assignees{/user}","branches_url":"https://api.github.com/repos/edx/programs/branches{/branch}","tags_url":"https://api.github.com/repos/edx/programs/tags","blobs_url":"https://api.github.com/repos/edx/programs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/programs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/programs/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/programs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/programs/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/programs/languages","stargazers_url":"https://api.github.com/repos/edx/programs/stargazers","contributors_url":"https://api.github.com/repos/edx/programs/contributors","subscribers_url":"https://api.github.com/repos/edx/programs/subscribers","subscription_url":"https://api.github.com/repos/edx/programs/subscription","commits_url":"https://api.github.com/repos/edx/programs/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/programs/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/programs/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/programs/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/programs/contents/{+path}","compare_url":"https://api.github.com/repos/edx/programs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/programs/merges","archive_url":"https://api.github.com/repos/edx/programs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/programs/downloads","issues_url":"https://api.github.com/repos/edx/programs/issues{/number}","pulls_url":"https://api.github.com/repos/edx/programs/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/programs/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/programs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/programs/labels{/name}","releases_url":"https://api.github.com/repos/edx/programs/releases{/id}","created_at":"2015-09-10T05:22:07Z","updated_at":"2015-11-02T21:19:30Z","pushed_at":"2015-11-12T23:09:37Z","git_url":"git://github.com/edx/programs.git","ssh_url":"git@github.com:edx/programs.git","clone_url":"https://github.com/edx/programs.git","svn_url":"https://github.com/edx/programs","homepage":"http://open-edx-programs-guide.readthedocs.org/en/latest/","size":1168,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"50cb8e551fc7c3eb58342d18af104a23bf321a62","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":42223848,"name":"programs","full_name":"edx/programs","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/programs","description":"Django application used as the backend to support Programs-based product lines such as edX's XSeries offering.","fork":false,"url":"https://api.github.com/repos/edx/programs","forks_url":"https://api.github.com/repos/edx/programs/forks","keys_url":"https://api.github.com/repos/edx/programs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/programs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/programs/teams","hooks_url":"https://api.github.com/repos/edx/programs/hooks","issue_events_url":"https://api.github.com/repos/edx/programs/issues/events{/number}","events_url":"https://api.github.com/repos/edx/programs/events","assignees_url":"https://api.github.com/repos/edx/programs/assignees{/user}","branches_url":"https://api.github.com/repos/edx/programs/branches{/branch}","tags_url":"https://api.github.com/repos/edx/programs/tags","blobs_url":"https://api.github.com/repos/edx/programs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/programs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/programs/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/programs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/programs/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/programs/languages","stargazers_url":"https://api.github.com/repos/edx/programs/stargazers","contributors_url":"https://api.github.com/repos/edx/programs/contributors","subscribers_url":"https://api.github.com/repos/edx/programs/subscribers","subscription_url":"https://api.github.com/repos/edx/programs/subscription","commits_url":"https://api.github.com/repos/edx/programs/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/programs/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/programs/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/programs/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/programs/contents/{+path}","compare_url":"https://api.github.com/repos/edx/programs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/programs/merges","archive_url":"https://api.github.com/repos/edx/programs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/programs/downloads","issues_url":"https://api.github.com/repos/edx/programs/issues{/number}","pulls_url":"https://api.github.com/repos/edx/programs/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/programs/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/programs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/programs/labels{/name}","releases_url":"https://api.github.com/repos/edx/programs/releases{/id}","created_at":"2015-09-10T05:22:07Z","updated_at":"2015-11-02T21:19:30Z","pushed_at":"2015-11-12T23:09:37Z","git_url":"git://github.com/edx/programs.git","ssh_url":"git@github.com:edx/programs.git","clone_url":"https://github.com/edx/programs.git","svn_url":"https://github.com/edx/programs","homepage":"http://open-edx-programs-guide.readthedocs.org/en/latest/","size":1168,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/programs/pulls/40"},"html":{"href":"https://github.com/edx/programs/pull/40"},"issue":{"href":"https://api.github.com/repos/edx/programs/issues/40"},"comments":{"href":"https://api.github.com/repos/edx/programs/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/programs/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/programs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/programs/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/edx/programs/statuses/2b669134c476e81ba327e7366c7059ec9aa7a44c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":97,"deletions":3,"changed_files":4}}