Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth tokens #136

Closed
wants to merge 16 commits into from
Closed

Conversation

joshuablake
Copy link
Contributor

@joshuablake joshuablake commented Aug 10, 2016

Olaf: Closing this pull request to stale it. We will review this at a later stage and perhaps re-open it.

Requires #124 as that adds the models in the backend (diff with just this pull request).

Whenever a component receives a request, the receiver should check authentication from the caller. Workers should never know any other components auth token due to running user code.

Places where needs/has been implemented:

  • players/creator interface (needs a new auth token generated before the creator app is started).
  • players/game interface (game auth token).
  • game/worker interface (avatar auth token).

@joshuablake
Copy link
Contributor Author

Not sure how we can pass in an auth token to the aimmo-game-creator app.

@CelineBoudier
Copy link
Contributor

will add the token as hidden env var in Snap CI!

@joshuablake
Copy link
Contributor Author

@CelineBoudier I think an env var CREATOR_AUTH_TOKEN with the output of urlsafe_b64encode(urandom(16)) (or some other urlsafe string, that's just what we're currently using elsewhere) should work.

@joshuablake
Copy link
Contributor Author

So it's now accessiable from Django (might need to be added to app.yaml?) but still not sure how to pass it into the container.

@CelineBoudier
Copy link
Contributor

yup!

@CelineBoudier
Copy link
Contributor

@joshuablake
Copy link
Contributor Author

3efee2a should have a solution

@joshuablake
Copy link
Contributor Author

I think this is done although there might be a better method for getting the token to the creator.

@joshuablake joshuablake changed the title [WIP] Auth tokens Auth tokens Aug 11, 2016
@joshuablake
Copy link
Contributor Author

Fixes #115

@CelineBoudier
Copy link
Contributor

@joshuablake if you write Fixes #115 in a commit it will actually close this issue once accepted :)

@mikebryant
Copy link
Contributor

Derp, put the wrong issue number in, sorry

Joshua Blake added 6 commits September 7, 2016 15:27
* Use Avatar models that map a user to a game with their code (allows
  mutliple avatars per user is seperate game). Contains majority of work
  for ocadotechnology#21.
* Use Game models with configurable permissions. Fixes ocadotechnology#79.
* Support multiple games on the backend (managed by aimmo-game-creator)
* Add UI for above.
@joshuablake joshuablake force-pushed the auth_tokens branch 2 times, most recently from 8c79525 to 620008c Compare September 8, 2016 14:37
@Spycho Spycho modified the milestone: Minimum Lovable Product Mar 22, 2017
@Spycho
Copy link
Contributor

Spycho commented May 24, 2017

@mikebryant is probably the only one that knows what this is all about!

@mikebryant
Copy link
Contributor

@Spycho we should have auth on all of the comms between components
Otherwise someone's worker could conceivably send messages masquerading as other users into the game

@Spycho
Copy link
Contributor

Spycho commented Jun 2, 2017

Makes sense @mikebryant, I more meant you might know how that can be done, and how far these commits get us there, and how to resolve the merge conflicts.

@OlafSzmidt
Copy link
Contributor

Closing this pull request to stale it. We will review this at a later stage and perhaps re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants