简体   繁体   English

OAuth 2.0 + Lambda + API网关

[英]OAuth 2.0 + Lambda + API Gateway

Ok I do some reaserch and I try once more explain what I am looking for. 好吧,我做了一些重新研究,然后再试一次解释我要寻找的东西。
So my question is can I make OAuth provider server using Lambda and API gateway? 所以我的问题是我可以使用Lambda和API网关制作OAuth提供程序服务器吗? I didn't found any solution like this, and I don't even know how to start so any ideas are valuable. 我没有找到这样的解决方案,甚至都不知道如何开始,所以任何想法都非常有价值。
And then I want to use API custom authentication to validade my bearer token. 然后,我想使用API​​自定义身份验证来验证我的承载令牌。

I try to be specific as I can: I have my application where I store my log users. 我会尽量做到具体:我将应用程序存储在日志用户中。 I want to OAuth 2.0 authorization code grant flow using only Lambda and API Gateway (something like Google oAuth but my app want to be an authentication provider). 我想仅使用Lambda和API网关(类似于Google oAuth,但我的应用希望成为身份验证提供程序)来进行OAuth 2.0授权代码授予流程。 I found couple solutions like this: https://www.authlete.com/documents/article/custom_authorizer/index but I want to use my own authorization server implementation, and I don't want to specific in Lambda auth impl. 我找到了几个类似的解决方案: https : //www.authlete.com/documents/article/custom_authorizer/index,但是我想使用自己的授权服务器实现,也不想在Lambda auth impl中具体说明。 api_key and secret_key. api_key和secret_key。 So there are my questions: 1. Can I make my own authorization server using only Lambda and API gateway? 因此,我有以下问题:1.我可以仅使用Lambda和API网关制作自己的授权服务器吗? (I know there is a implementation in Spring but for now I want serwerless solution) 2. If I can I will be pleased for any tips because I really stuck. (我知道在Spring中有一个实现,但是现在我想要没有任何麻烦的解决方案)2.如果可以的话,我会为任何提示感到高兴,因为我真的很坚持。
There is a possibility that in my reasoning are mistakes. 在我的推理中,有可能是错误。

In API Gateway you can create custom authorizers to be invoked before the API method is executed. 在API Gateway中,您可以创建要在执行API方法之前调用的自定义授权者。 Normally you can create a Lambda function to receive the authentication details and return a Policyt Document authorizing or denying the API method execution. 通常,您可以创建Lambda函数以接收身份验证详细信息,并返回授权或拒绝API方法执行的Policyt文档。

You can create a Lambda to make the OAuth provider authentication and generate the Policy Document, based on authentication flow. 您可以基于身份验证流程创建Lambda以进行OAuth提供程序身份验证并生成策略文档。 You can get more information here . 您可以在此处获得更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM