首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >属性-使用MD5哈希密码的领域无法工作。

属性-使用MD5哈希密码的领域无法工作。
EN

Stack Overflow用户
提问于 2022-09-19 13:11:31
回答 1查看 81关注 0票数 0

我试图配置通配符23以使用带有属性-领域和表单机制的elytron身份验证只在users.properties中的密码为纯文本时才能工作,当我尝试使用MD5哈希密码时,它不起作用

独立的更改:

代码语言:javascript
复制
<security-domain name="application-security" default-realm="application-properties" permission-mapper="default-permission-mapper">
      <realm name="application-properties"/>
</security-domain>
...

<properties-realm name="application-properties" groups-attribute="Roles">
   <users-properties path="users.properties" relative-to="jboss.server.config.dir" digest-realm-name="application-properties" plain-text="true" />
   <groups-properties path="roles.properties" relative-to="jboss.server.config.dir"/>
</properties-realm>

...

<http-authentication-factory name="application-security-http" security-domain="application-security" http-server-mechanism-factory="global">
    <mechanism-configuration>
        <mechanism mechanism-name="FORM">
            <mechanism-realm realm-name="application-properties"/>
        </mechanism>
    </mechanism-configuration>
</http-authentication-factory>

...

<application-security-domains>
    <application-security-domain name="application-security" security-domain="application-security"/>
</application-security-domains>

md5散列使用"username: application-properties :password“创建,其中application-properties是领域名称。

我不知道我错过了什么

EN

回答 1

Stack Overflow用户

发布于 2022-11-02 20:25:59

在您发布的片段中,您已经在您的plain-text="true"上配置了properties-realm。尝试删除此设置以查看其是否有效。

如果此属性为真,则属性文件中的密码将以纯文本形式存储。当plain-text="false"时,预期它们将以HEX(MD5(username ':' realm ':' password))的形式预散列.如果您需要base64而不是十六进制,您可以通过属性领域的哈希编码属性来配置它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73773895

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档