{"action":"created","issue":{"url":"https://api.github.com/repos/bitly/oauth2_proxy/issues/225","repository_url":"https://api.github.com/repos/bitly/oauth2_proxy","labels_url":"https://api.github.com/repos/bitly/oauth2_proxy/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/bitly/oauth2_proxy/issues/225/comments","events_url":"https://api.github.com/repos/bitly/oauth2_proxy/issues/225/events","html_url":"https://github.com/bitly/oauth2_proxy/issues/225","id":140070571,"number":225,"title":"stuck on github setup ","user":{"login":"hulbert","id":592442,"avatar_url":"https://avatars.githubusercontent.com/u/592442?v=3","gravatar_id":"","url":"https://api.github.com/users/hulbert","html_url":"https://github.com/hulbert","followers_url":"https://api.github.com/users/hulbert/followers","following_url":"https://api.github.com/users/hulbert/following{/other_user}","gists_url":"https://api.github.com/users/hulbert/gists{/gist_id}","starred_url":"https://api.github.com/users/hulbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hulbert/subscriptions","organizations_url":"https://api.github.com/users/hulbert/orgs","repos_url":"https://api.github.com/users/hulbert/repos","events_url":"https://api.github.com/users/hulbert/events{/privacy}","received_events_url":"https://api.github.com/users/hulbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-11T02:50:03Z","updated_at":"2016-11-03T04:30:08Z","closed_at":null,"body":"I'm trying to set up proxying on Heroku using oauth2_proxy with Github in front.\n\nI've tried a number of things but continue to just get redirected back to the sign in page. The cookie never seems to get set and the logging of the session after successful contact with Github seems odd compared to other examples I've seen.\n\nThe Heroku procfile runs this `bin/oauth2_proxy-2.0.1.linux-amd64.go1.4.2/oauth2_proxy -http-address=\"0.0.0.0:$PORT\" -config='oauth2_proxy.cfg'`. The config file (after massaging numerous times, I've tried a variety of things) looks like this:\n\n```\nprovider = \"github\"\ngithub_org = \"<redacted string>\"\ngithub_team = \"*\"\nscope = \"user:email,read:org\"\nemail_domains = [\"*\"]\nupstreams = [\"http://127.0.0.1:8080/\"]\npass_host_header = false\nredirect_url = \"https://APP.herokuapp.com/oauth2/callback\"\ncookie_name = \"scott_cookie\"\ncookie_secure = false\ncookie_httponly = false\nrequest_logging = true\n```\n\nI set up a Github app as directed in the README on master, with the redirect URL matching before.\n\nI've tried config files without the last 5 last lines from above, and also with the scope not set.\n\nThe are three environment variables set on the Heroku box:\n\n```\nOAUTH2_PROXY_CLIENT_ID\nOAUTH2_PROXY_CLIENT_SECRET\nOAUTH2_PROXY_COOKIE_SECRET\n```\n\nHere are logs of restarting the dyno and loading the main page. I've also tried revoking all user access tokens via Github.\n\n```\n2016-03-11T02:44:58.010137+00:00 heroku[web.1]: State changed from up to starting\n2016-03-11T02:44:58.009489+00:00 heroku[web.1]: Restarting\n2016-03-11T02:44:58.635172+00:00 heroku[web.1]: Starting process with command `bin/oauth2_proxy-2.0.1.linux-amd64.go1.4.2/oauth2_proxy -http-address=\"0.0.0.0:37429\" -config='oauth2_proxy.cfg'`\n2016-03-11T02:44:59.789145+00:00 app[web.1]: 2016/03/11 02:44:59 oauthproxy.go:90: mapping path \"/\" => upstream \"http://127.0.0.1:8080/\"\n2016-03-11T02:44:59.789218+00:00 app[web.1]: 2016/03/11 02:44:59 oauthproxy.go:106: OauthProxy configured for GitHub Client ID: <REDACTED>\n2016-03-11T02:44:59.789239+00:00 app[web.1]: 2016/03/11 02:44:59 oauthproxy.go:116: Cookie settings: name:scott_cookie secure(https):false httponly:false expiry:168h0m0s domain:<default> refresh:disabled\n2016-03-11T02:44:59.789628+00:00 app[web.1]: 2016/03/11 02:44:59 http.go:45: HTTP: listening on 0.0.0.0:37429\n2016-03-11T02:45:00.331916+00:00 heroku[web.1]: State changed from starting to up\n2016-03-11T02:45:02.502895+00:00 heroku[web.1]: Stopping all processes with SIGTERM\n2016-03-11T02:45:04.624421+00:00 heroku[web.1]: Process exited with status 2\n2016-03-11T02:45:19.165681+00:00 heroku[router]: at=info method=GET path=\"/\" host=APP.herokuapp.com request_id=66ef9711-c8cb-43b8-b92d-9e885642479c fwd=\"<scotts-ip>\" dyno=web.1 connect=2ms service=3ms status=403 bytes=2523\n2016-03-11T02:45:19.164866+00:00 app[web.1]: 2016/03/11 02:45:19 oauthproxy.go:455: 10.153.220.144:54290 Cookie \"scott_cookie\" not present\n2016-03-11T02:45:19.165868+00:00 app[web.1]: 10.153.220.144 - - [11/Mar/2016:02:45:19 +0000] APP.herokuapp.com GET - \"/\" HTTP/1.1 \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12\" 403 2244 0.001\n2016-03-11T02:45:22.954286+00:00 heroku[router]: at=info method=GET path=\"/oauth2/start?rd=%2F\" host=APP.herokuapp.com request_id=0552cc36-2b2f-4d7d-ac61-4e1984d561bc fwd=\"<scotts-ip>\" dyno=web.1 connect=1ms service=2ms status=302 bytes=676\n2016-03-11T02:45:22.954742+00:00 app[web.1]: 10.153.220.144 - - [11/Mar/2016:02:45:22 +0000] APP.herokuapp.com GET - \"/oauth2/start?rd=%2F\" HTTP/1.1 \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12\" 302 284 0.000\n2016-03-11T02:45:24.157519+00:00 heroku[router]: at=info method=GET path=\"/oauth2/callback?code=064f923ecdd4801bb31f&state=%2F\" host=APP.herokuapp.com request_id=8d52aca7-6675-49d2-9e3a-e25ab20cd4f3 fwd=\"<scotts-ip>\" dyno=web.1 connect=2ms service=121ms status=302 bytes=286\n2016-03-11T02:45:24.157749+00:00 app[web.1]: 2016/03/11 02:45:24 oauthproxy.go:435: 10.153.220.144:59510 authentication complete Session{ token:true}\n2016-03-11T02:45:24.157824+00:00 app[web.1]: 10.153.220.144 - - [11/Mar/2016:02:45:24 +0000] APP.herokuapp.com GET - \"/oauth2/callback?code=064f923ecdd4801bb31f&state=%2F\" HTTP/1.1 \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12\" 302 24 0.120\n2016-03-11T02:45:24.409132+00:00 heroku[router]: at=info method=GET path=\"/\" host=APP.herokuapp.com request_id=5e65eda0-c702-4b10-ab27-36e34f76ce6a fwd=\"<scotts-ip>\" dyno=web.1 connect=1ms service=2ms status=403 bytes=2523\n2016-03-11T02:45:24.408874+00:00 app[web.1]: 2016/03/11 02:45:24 oauthproxy.go:455: 10.153.220.144:45667 Cookie Signature not valid\n2016-03-11T02:45:24.409032+00:00 app[web.1]: 10.153.220.144 - - [11/Mar/2016:02:45:24 +0000] APP.herokuapp.com GET - \"/\" HTTP/1.1 \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12\" 403 2244 0.000\n```\n\nThe line that looks weird to me is `authentication complete Session{ token:true}`. Other posted issues I've seen have more info here, like email or organization. Thanks! \n"},"comment":{"url":"https://api.github.com/repos/bitly/oauth2_proxy/issues/comments/258062595","html_url":"https://github.com/bitly/oauth2_proxy/issues/225#issuecomment-258062595","issue_url":"https://api.github.com/repos/bitly/oauth2_proxy/issues/225","id":258062595,"user":{"login":"mbrevoort","id":30455,"avatar_url":"https://avatars.githubusercontent.com/u/30455?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrevoort","html_url":"https://github.com/mbrevoort","followers_url":"https://api.github.com/users/mbrevoort/followers","following_url":"https://api.github.com/users/mbrevoort/following{/other_user}","gists_url":"https://api.github.com/users/mbrevoort/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrevoort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrevoort/subscriptions","organizations_url":"https://api.github.com/users/mbrevoort/orgs","repos_url":"https://api.github.com/users/mbrevoort/repos","events_url":"https://api.github.com/users/mbrevoort/events{/privacy}","received_events_url":"https://api.github.com/users/mbrevoort/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T04:30:08Z","updated_at":"2016-11-03T04:30:08Z","body":"I'm stuck on this same issue, getting \"Cookie Signature not valid\" with github provider after ` authentication complete Session{ token:true}`. \r\n\r\nHere's a snippet of my Kubernetes config with the start options:\r\n\r\n```\r\n        command: [\"oauth2_proxy\",\r\n                  \"--tls-cert=/etc/prometheus-proxy-cert/cert\",\r\n                  \"--tls-key=/etc/prometheus-proxy-cert/key\",\r\n                  \"--provider=github\",\r\n                  \"--github-org=$(GITHUB_ORG)\",\r\n                  \"--upstream=http://127.0.0.1:9090\",\r\n                  \"--email-domain=*\",\r\n                  \"--client-id=$(CLIENT_ID)\",\r\n                  \"--client-secret=$(CLIENT_SECRET)\",\r\n                  \"--cookie-expire=168h0m0s\",\r\n                  \"--cookie-name=proxysession\",\r\n                  \"--redirect-url=$(BASE_URL)/oauth2/callback\",\r\n                  \"--cookie-secret=$(COOKIE_SECRET)\",\r\n                  \"--cookie-secure=true\",\r\n                  \"--cookie-httponly=false\",\r\n                  \"--https-address=0.0.0.0:4443\"]\r\n```\r\n\r\n@gkuchta  Did you get past this?"}}
{"actor":{"display_login":"mbrevoort"}}