Integrate the Volentix Django REST framework backend with AWS Cognito

in utopian-io •  6 years ago 

venue - watermark-smaller.png

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 just cognito_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:

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

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

Github

https://github.com/shawnlauzon

volentix-logo-navy.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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) :

You received more than 10 upvotes. Your next target is to reach 50 upvotes.

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:

Be ready for the next contest!
Trick or Treat - Publish your scariest halloween story and win a new badge

Support SteemitBoard's project! Vote for its witness and get one more award!

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) :

You received more than 10 as payout for your posts. Your next target is to reach a total payout of 50

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:

SteemFest3 and SteemitBoard - Meet the Steemians Contest

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @shawnlauzon! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

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!