Integrate the Volentix Django REST framework backend with AWS Cognito
Repository
https://github.com/Volentix/venue-server
Details
Our current Python-based system uses the Django REST framework to authenticate users. I would like to instead use AWS Cognito to authenticate users.
- A new parameter is passed to
POST /api/authenticate
:{ username: "thor", password: "default2018", authentication: "cognito" // new, optional parameter }
- If and only if
authentication=cognito
, then the server uses Cognito to authenticate the user. If authentication is successful, then a token is created as it is today on the Venue server. - Information about Cognito is configured as an environment variable passed into the system. I'm not sure what information is needed; it is probably best for the developer to create a Cognito User Pool for testing.
The following items are requested, but not mandatory:
- Parameters from Cognito which are necessary to signin (perhaps just a token) are returned as part of the
api/authenticate
call; this is probably justcognito_token
or something similar. The Cognito token would then need to be saved with the Venue-generated token. - The
/api/logout
function logs out the Cognito user with the saved Cognito token as well as logging out the Venue user.
Other links you might find useful:
- Venue is running on a development environment; feel free to play with this as you would like. The password for each user is
default2018
. - Information on the product as a whole is at https://github.com/venue; we also maintain a Waffle board
- Current API documentation can be found at https://venue-dev.volentix.io/docs/ -- this documentation is also available if you run the venue server and see them at http://localhost:3000/docs.
- The Venue client can also be run locally to see how the API is used in practice.
- I found this Django-warrant package, however the configuration as specified doesn't work because we are using the Django REST package. It might be of some use, but it is not a requirement to be used.
Moving the users from the current system to the new system is NOT a part of this project; I have already written a Lambda function which copies users from Django to Cognito. For testing, you should create a user in your Cognito User Pool to confirm that Venue correctly authenticates there.
When this authentication module is complete, the front end will be updated to create new users only in Cognito. Change of emails and change of passwords will also be performed on Cognito. So those parts of the code do not need to be updated either.
As background, this is part of a migration strategy to move from the current Django-based monolithic project to a microservices-based repository, currently hosted on Lambda and deployed by serverless.
Components
- The Venue server Authentication module
- Add any requirements
- Add connection information need for the Cognito service in settings
Deadline
There is not a hard deadline for this, but I would like it completed the sooner the better. By November 9th would be nice.
Communication
You can contact me via email at [email protected] or on Telegram @shawnlauzon.
The Volentix community is at https://t.me/Volentix
Thanks for the task request, @shawnlauzon! I'm not familiar with AWS Cognite myself, but I think the task should be clear for someone who is. Good luck with finding someone who can solve the task!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thanks for evaluating it @amosbastian! I hope someone can help too :)
Thank you for your review, @amosbastian! Keep up the good work!
Congratulations @shawnlauzon! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Hi @shawnlauzon!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Hey, @shawnlauzon!
Thanks for contributing on Utopian.
We’re already looking forward to your next task request!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Congratulations @shawnlauzon! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Congratulations @shawnlauzon! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!