Error adding enforce-valid-basic-auth-credentials to config.xml

我们两清 提交于 2019-12-02 13:28:41
Val Bonn

My answer comes probably too late to help you, but it may help other people.

I met the same issue, and adding the 'enforce-valid-basic-auth-credentials' tag seems not to be enough.

Then, I added this flag via WLST :

connect('weblogicUser','weblogicPassword','t3://localhost:7001')
edit()
startEdit()
cd('SecurityConfiguration/Your_Domain')
set('EnforceValidBasicAuthCredentials','false')
save()
activate()

(Do not forget to edit with your weblogicUser, weblogicPassword, weblogic url and your domain in the 'cd' command...)

And after restarting my server, I looked in the config.xml file, and another tag has been added. Now, my config.xml file looks like that :

    .........
    <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
    <use-kss-for-demo>true</use-kss-for-demo>
</security-configuration>
............

But this use-kss-for-demo tag may depend on your weblogic configuration. So I strongly advise you to use the WSLT way to update this flag.

If you get schema validation error, add tags as in below order.

<security-configuration>
......
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-
credentials>
<use-kss-for-demo>true</use-kss-for-demo>
</security-configuration>
Inside the weblogic below path - /app/weblogic/Oracle/Middleware/Oracle_Home/oracle_common/common/bin

script cane be written like below-
disableBasicAuth.py

connect('weblogic','password','t3://localhost:7001')
edit()
startEdit()
cd('SecurityConfiguration/<domain name>')
set('EnforceValidBasicAuthCredentials','false')
save()
activate()

After save. Run the Script like - ./wlst.sh disableBasicAuth.py

Above steps will solve basic auth interception by weblogic.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!