{"action":"created","issue":{"url":"https://api.github.com/repos/sahlinet/tumbo-server/issues/1","repository_url":"https://api.github.com/repos/sahlinet/tumbo-server","labels_url":"https://api.github.com/repos/sahlinet/tumbo-server/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/sahlinet/tumbo-server/issues/1/comments","events_url":"https://api.github.com/repos/sahlinet/tumbo-server/issues/1/events","html_url":"https://github.com/sahlinet/tumbo-server/issues/1","id":165973327,"number":1,"title":"social auth for Tumbo Console and Applications","user":{"login":"fatrix","id":102456,"avatar_url":"https://avatars.githubusercontent.com/u/102456?v=3","gravatar_id":"","url":"https://api.github.com/users/fatrix","html_url":"https://github.com/fatrix","followers_url":"https://api.github.com/users/fatrix/followers","following_url":"https://api.github.com/users/fatrix/following{/other_user}","gists_url":"https://api.github.com/users/fatrix/gists{/gist_id}","starred_url":"https://api.github.com/users/fatrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatrix/subscriptions","organizations_url":"https://api.github.com/users/fatrix/orgs","repos_url":"https://api.github.com/users/fatrix/repos","events_url":"https://api.github.com/users/fatrix/events{/privacy}","received_events_url":"https://api.github.com/users/fatrix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sahlinet/tumbo-server/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/sahlinet/tumbo-server/milestones/1","html_url":"https://github.com/sahlinet/tumbo-server/milestones/0.2","labels_url":"https://api.github.com/repos/sahlinet/tumbo-server/milestones/1/labels","id":1888046,"number":1,"title":"0.2","description":null,"creator":{"login":"fatrix","id":102456,"avatar_url":"https://avatars.githubusercontent.com/u/102456?v=3","gravatar_id":"","url":"https://api.github.com/users/fatrix","html_url":"https://github.com/fatrix","followers_url":"https://api.github.com/users/fatrix/followers","following_url":"https://api.github.com/users/fatrix/following{/other_user}","gists_url":"https://api.github.com/users/fatrix/gists{/gist_id}","starred_url":"https://api.github.com/users/fatrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatrix/subscriptions","organizations_url":"https://api.github.com/users/fatrix/orgs","repos_url":"https://api.github.com/users/fatrix/repos","events_url":"https://api.github.com/users/fatrix/events{/privacy}","received_events_url":"https://api.github.com/users/fatrix/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-07-17T11:54:59Z","updated_at":"2016-07-17T11:54:59Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-07-17T11:51:48Z","updated_at":"2016-09-23T07:22:24Z","closed_at":null,"body":"By now, Tumbo only support username/password authentication into the console. For later usage  in a Saas-offer Tumbo should also support **Social auth** by using [https://github.com/omab/python-social-auth](https://github.com/omab/python-social-auth).\r\n\r\nBut more important is Social auth authentication for Tumbo Applications.\r\n\r\n- By now only Tumbo users can be authenticated for the apps and the user has a session on the root path (thus is authenticated for all apps running on this Tumbo platform). Users should be able to get a session only for one particular app (PATH). Because the user might set a reverse proxy in front of it, the path should be configurable.\r\n\r\nBecause auth on app level is not suported by now, on [https://httptest.sahli.net/](https://httptest.sahli.net/) (see repo [https://github.com/sahlinet/httptest](https://github.com/sahlinet/httptest) uses generated ressource ids awhich are linked to email addresses.\r\n\r\n- By now the workers receive the username of the authenticated user in the request information. The identity should be propagated to the worker with a JWT. [http://blog.apcelent.com/django-json-web-token-authentication-backend.html](http://blog.apcelent.com/django-json-web-token-authentication-backend.html) is a good starting point for the JWT stuff (how to create token, how to read token).\r\n\r\nThe architecture and process might look like:\r\n\r\nAUTH FRONTEND\r\n\r\n\r\nThe frontend and api (drf) must have been enabled social auth login.\r\n* frontend [https://github.com/omab/django-social-auth](https://github.com/omab/django-social-auth)\r\n* api (drf) [https://github.com/PhilipGarnero/django-rest-framework-social-oauth2](https://github.com/PhilipGarnero/django-rest-framework-social-oauth2)\r\n\r\n\r\nAUTH BACKEND (worker)\r\n\r\n* [ExecutionViewSet class](https://github.com/sahlinet/tumbo-server/blob/master/tumbo/core/api_views.py#L158) muss add (or create?) a JWT token for request.user  and sign with a per worker executor secret\r\n* send request to worker with JWT token (contains username, custom_id for data in datastore\r\n\r\n* worker receives JWT token, verifies with secret which it received on startup\r\n* if it is signed by our secret on server -> we got now the identity: userame and custom_id for lookup data in datastore\r\n\r\n \r\n "},"comment":{"url":"https://api.github.com/repos/sahlinet/tumbo-server/issues/comments/249120976","html_url":"https://github.com/sahlinet/tumbo-server/issues/1#issuecomment-249120976","issue_url":"https://api.github.com/repos/sahlinet/tumbo-server/issues/1","id":249120976,"user":{"login":"fatrix","id":102456,"avatar_url":"https://avatars.githubusercontent.com/u/102456?v=3","gravatar_id":"","url":"https://api.github.com/users/fatrix","html_url":"https://github.com/fatrix","followers_url":"https://api.github.com/users/fatrix/followers","following_url":"https://api.github.com/users/fatrix/following{/other_user}","gists_url":"https://api.github.com/users/fatrix/gists{/gist_id}","starred_url":"https://api.github.com/users/fatrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatrix/subscriptions","organizations_url":"https://api.github.com/users/fatrix/orgs","repos_url":"https://api.github.com/users/fatrix/repos","events_url":"https://api.github.com/users/fatrix/events{/privacy}","received_events_url":"https://api.github.com/users/fatrix/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T07:22:24Z","updated_at":"2016-09-23T07:22:24Z","body":"Added frontend_host to be able to use with a proxied project. https://github.com/sahlinet/tumbo-server/commit/98b3c616bdcf344adcef9b6844061d8ae9fab030"}}
{"actor":{"display_login":"fatrix"}}