无法使用默认用户名密码,并使jsonresourcepassword.json与apereo cas sso一起使用
这是我到目前为止所做的: https://github.com /jnbdz/tutorial-baeldung-spring-security-cas-sso
在这里您可以看到我的配置: https://github.com/jnbdz/jnbdz/tutorial-baeldung-spring-security-casurity-cas-sso/tree/tree/main/main/main/config
我正在尝试要遵循本教程: https://wwwww.baeldung.com/spring-security-casurity-cas-security-cas -sso
,但似乎有点过时。我已经在readme.md文件中用自己的话重写了更新的教程。但是现在我被困了。
默认用户名密码均无效。我什至尝试了:
cas.authn.accept.users=casuser::Mellon
但也不起作用。
我验证了通往jsonresourcepassword.json的道路,这很好。
对于应用程序。当我切换端口时,它会更改它...因此正在加载它。
我也尝试添加:
cas.authn.pm.enabled=true
就像是记录的那样,但我遇到了一个错误,说它在此版本的CAS中不支持。
您还可以在我的存储库中看到我在build.gradle中拥有的东西。
所以问题。为什么不使用用户名密码加载JSON文件,为什么它不适用于values.yml中的默认用户名密码?
更新
设置:
cas.authn.accept.users=casuser::Mellon
现在似乎有效。
我这样做了:sudo sysctl -w fs.Inotify.max_user_instances = 256
:
我用 ./ gradlew exportConfigmetadata
,
但我仍然无法在JSON文件中获取He He用户名和密码工作。
因此,这个问题仍然存在。
Here is what I have done so far: https://github.com/jnbdz/tutorial-baeldung-spring-security-cas-sso
In here you can see my configs: https://github.com/jnbdz/tutorial-baeldung-spring-security-cas-sso/tree/main/config
I am trying to follow this tutorial: https://www.baeldung.com/spring-security-cas-sso
But it seems a bit out of date. I have re-written in my own words in the README.md file the updated tutorial. But now I am stuck.
None of the default username passwords work. And I even tried this:
cas.authn.accept.users=casuser::Mellon
But doesn't work either.
I verified the path to the jsonResourcePassword.json and it is good.
Same for the application.properties when I switch ports it changes it... So it is loading it.
I tried also adding:
cas.authn.pm.enabled=true
Like it is documented but I get an error saying it's not supported in this version of CAS.
You can also see in my repo what I have in the build.gradle.
So the question. Why isn't it loading the json file with the username password and why isn't it working with the default username password found in values.yml?
UPDATE
The setting:
cas.authn.accept.users=casuser::Mellon
Now seems to work.
I did this: sudo sysctl -w fs.inotify.max_user_instances=256
The value used to be 128.
I saw this in config-metadata.properties
that I generate with: ./gradlew exportConfigMetadata
But I still cannot get he username and password in the json file to work.
So that issue still persists.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎
cas.authn.pm.json.location
用于密码管理仅。您无法使用该文件的凭据登录。如果您希望在登录时使用带有用户名/密码的JSON文件,则需要使用允许身份验证: https://apereo.github.io/cas/6.5.x/authentication/permissive-authentication.html
CAS 6.5.3上测试
cas.authn.pm.json.location
cas.authn.json.location
。It seems like
cas.authn.pm.json.location
is used for password management only. You can not login with the credentials from that file.If you want a JSON file with username/passwords to use while logging in, you need to use permissive authentication: https://apereo.github.io/cas/6.5.x/authentication/Permissive-Authentication.html
Tested on CAS 6.5.3:
implementation "org.apereo.cas:cas-server-support-generic"
to yourbuild.gradle
.cas.authn.pm.json.location
tocas.authn.json.location
.