无法使用默认用户名密码,并使jsonresourcepassword.json与apereo cas sso一起使用

发布于 2025-01-26 09:20:54 字数 1571 浏览 3 评论 0原文

这是我到目前为止所做的: 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你怎么敢 2025-02-02 09:20:54

似乎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
  • 将您的JSON文件内容更改为上面链接中给出的示例。

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:

  • Add implementation "org.apereo.cas:cas-server-support-generic" to your build.gradle.
  • Change cas.authn.pm.json.location to cas.authn.json.location.
  • Change your JSON file contents to the example given in the link above.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文