我正在使用4.8.1。 我希望通过纯文本密码对Carbon Users进行身份验证。 如果我们使用Username-tokens签名很容易,但我的客户端有一些像
这样的其他标题 <soapenv:Header>
<mw:authentication soapenv:soa="http://schemas.xmlsoap.org/soap/soa/next" soapenv:mustUnderstand="0" xmlns:mw="http://soa.dev.com/mwoxy">
<mw:user>admin</mw:user>
<mw:password>admin</mw:password>
</mw:authentication>
</soapenv:Header>
所以我希望验证这个内部代理,以便我写这样的代理
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="authent" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<property name="username" expression="//mw:authentication/mw:user/text()" scope="default" type="STRING"/>
<property name="password" expression="//mw:authentication/mw:password/text() type="STRING"/>
<dblookup>
<connection>
<pool>
<dsName>jdbc/WSO2CarbonDB</dsName>
</pool>
</connection>
<statement>
<sql>select UM_USER_NAME from UM_USER where UM_USER_NAME=? and UM_USER_PASSWORD= ?</sql>
<parameter expression="get-property('username')" type="VARCHAR"/>
<parameter expression="get-property('password')" type="VARCHAR"/>
<result name="IsUserExisted" column="UM_USER_NAME"/>
</statement>
</dblookup>
<log level="full">
<property name="IsUserExisted" expression="get-property('IsUserExisted')"/>
</log>
</inSequence>
<outSequence/>
</target>
<description/>
</proxy>
所以我希望对主用户商店进行身份验证,因为我使用了这个查询
从UM_USER中选择UM_USER_NAME,其中UM_USER_NAME =?和UM_USER_PASSWORD =? 和在user-mgt.xml文件中完成的更改,但它不工作我怎么办,因为只有3个用户和密码是存在的。 配置就像这样
<UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
<Property name="TenantManager">org.wso2.carbon.user.core.tenant.JDBCTenantManager</Property>
<Property name="ReadOnly">false</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="IsEmailUserName">false</Property>
<Property name="DomainCalculation">default</Property>
<!-- <Property name="PasswordDigest">SHA-256</Property>-->
<Property name="StoreSaltedPassword">true</Property>
<Property name="ReadGroups">true</Property>
<Property name="WriteGroups">true</Property>
<Property name="UserNameUniqueAcrossTenants">false</Property>
<Property name="PasswordJavaRegEx">^[\S]{5,30}$</Property>
<Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
<Property name="UsernameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\<>,\'\"]{3,30}$</Property>
<Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</Property>
<Property name="RolenameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\<>,\'\"]{3,30}$</Property>
<Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
<Property name="UserRolesCacheEnabled">true</Property>
<Property name="MaxRoleNameListLength">100</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="SharedGroupEnabled">false</Property>
<Property name="SCIMEnabled">false</Property>
</UserStoreManager>
它不起作用我将如何实现这个
事先提前
答案 0 :(得分:0)
[1]。 https://docs.wso2.com/display/ESB481/Applying+Security+Policies