向 WSO2 身份服务器添加具有自定义模式的 mysql 用户存储

Adding a mysql user store with custom schema to WSO2 Identity Server

目前,我正在尝试使用 WSO2 Identity Server 对来自 mysql 用户存储的用户进行身份验证,该用户存储是我使用自己的架构创建的。但是,每当我将此用户存储添加为 WSO2 中的辅助存储时,用户都不会出现在管理控制台上。

当我尝试对来自该商店的用户进行身份验证时,我收到错误消息:

[2019-05-24 10:01:15,951] ERROR{org.wso2.carbon.identity.auth.service.handler.impl.BasicAuthenticationHandler} 
-  Error occurred while trying to authenticate,
Error when handling event : PRE_AUTHENTICATION

WSO2 服务器的用户存储需要有特定的模式(模式脚本位于 dbscripts 文件夹中)。您需要使用 this from your existing schema or scim2 端点导入用户以可编程导入用户

我不能像 senthalan 解释的那样将用户存储迁移到 wso2 模式,那么你有两个选项来插入自定义模式。

  1. 从辅助用户存储配置的 高级 选项更改 SQL 查询

  2. 通过扩展 doAuthenticate、doAddUser 等必要函数编写自定义用户存储管理器 [1]

处理事件时出错:PRE_AUTHENTICATION 基本上来自下面的侦听器

org.wso2.carbon.identity.governance.listener.IdentityMgtEventListener 在 identity.xml 中处理预验证事件。您甚至可以禁用它。

[1]https://github.com/GayanM/custom-user-store