amazon-web-services - 使用 AWS Cognito 进行桌面身份验证
问题描述
经过一番战斗,我编写了一个测试桌面应用程序,允许用户使用 AWS Cognito 进行身份验证。我可以允许 AWS 处理身份验证、密码存储等。这解决了一些问题——为什么要重新发明轮子?
现在我的问题是我在应用程序中有各种需要细粒度权限的资源。如何使用 Cognito 控制对我的应用程序中非 AWS 资源的访问?
解决方案
我建议使用自定义属性,因为您提到了非 AWS 服务。创建一个名为 customer:role 的属性,其值为 ROLE_USER、ROLE_ADMIN 等。
一旦他们在应用程序中通过身份验证,您就可以通过解码自定义属性来控制他们的权限。本教程更多地介绍了在 SAAS 多租户方法中使用 AWS 服务的权限。但是,我发现它非常有用,值得学习。
推荐阅读
- angular - drawLines 函数有效,但加载结束后线条消失
- scp - 我想使用 scp/pscp 命令从 root 将文件从 linux 传输到 windows,但是我收到拒绝访问错误
- c# - 如何将焦点放在文本框或该表单中的任何其他控件中的最前面
- python - Azure Devops 和 Python 的集成以通过自动化脚本的测试结果并在 Azure Devops 中更新?
- shell - 用 n 个空格替换一个模式
- sql-server - 有没有办法让 SQL Server 自动规范化重复的字符串?
- android-studio - 如何解决此错误?> 任务:app:installDebug 失败
- java - 为什么无法解析符号 TransactionWriteRequest 或 TransactionLoadRequest?
- amazon-web-services - 尝试从私有 ECR 中提取图像时出现“没有基本身份验证凭据”
- regex - 如何在 RegEx 中选择某些数字?