Search code examples
javaspringamazon-web-servicesjersey-2.0login-with-amazon

Login with Amazon SDK in REST web service


Building a service to manage some AWS resources S3 and EC2. My first time doing something like this. The backend is a RESTful web service using Spring + Jersey + MySQL. And a javascript client to interact with the user and the web service.

I am now building the authentication and verification of users and requests. Basic Auth + SSL or H-MAC seen like good solution but I also looked into the "Login with Amazon" option where my user would use his AWS credentials in my service, I looked into "Login with Amazon" but can not fully understand how I can implement and use it to.

Is this similar to Amazon been the oauth2 provider?

P.S. I understand that this question is vague and it would could be better suitable for stack programmers instead of stackoverflow, but I dediced to give it a chance, since I am a bit lost


Solution

  • One of your points is actually correct: if you integrate with Login with Amazon, Amazon will be your identity provider, and LWA is actually based on OAuth 2.0.

    But another of your assumptions is incorrect: the users of your application will actually login to your service using their Amazon.com credentials (the same credentials they use to shop on Amazon.com), and not their AWS credentials (which gives access to Amazon Web Services).

    Integrating with LWA (and any OAuth-based identity provider, like Google or Facebook, for that matter) should be super straightforward. Have you read the developer resources from LWA? What have you tried?