saml - SAML 2.0 中的可审计性
问题描述
SAML 2.0 是否能够存储正在访问我的 API-REST 的所有用户,并且这样我可以跟踪正在进入我的 API 的人?例如,如果我想知道昨天谁访问了我的 Api。
解决方案
SAML
只是您的用户信息到达的格式。例如,使用示例,以下是用户的表示方式SAML
:
<saml:AttributeStatement>
<saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xsi:type="xs:string">test</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xsi:type="xs:string">test@example.com</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xsi:type="xs:string">users</saml:AttributeValue>
<saml:AttributeValue xsi:type="xs:string">examplerole1</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
该uid
属性将是他们的用户名以及mail
属性中的电子邮件地址。eduPersonAffiliation
说明他们与组织的关系。在这种情况下,他们是在自己的组织中具有 examplerole1 角色的用户。
SAML
除了将其传送到您的 API 之外,不会记录此内容。提取这些属性并从中创建自己的审计系统将由您决定。
许多SAML
身份提供者 (IdP) 发布 eduPerson 属性。最新的架构在这里。
推荐阅读
- firebase - 使用颤振从 Firestore 中删除数据
- php - 如何逐列求和 MYSQL
- logging - 如何为 Windows Kubernetes API 服务器增加 Docker 中的日志详细程度?
- r - R:删除组内的所有观察
- c# - Entity Framework Core 3.0 - 更新实体导航属性,无需先删除或加载,然后再插入
- apache-spark - 从镶木地板文件中读取分区数据并将它们写回保持层次结构?
- python - 如何使用 Selenium 填写包含多行的表格?
- database - 使用 sqlAlchemy 连接到 cPanel 数据库
- angular - NgRx 无需订阅即可获取价值
- html - fromEvent 返回属性在“事件”类型上不存在