gpt4 book ai didi

非 Web 应用程序中的 Java 安全性

转载 作者:搜寻专家 更新时间:2023-10-30 20:13:47 24 4
gpt4 key购买 nike

有谁知道一个好的、开源的 java 安全框架?

我玩过 jSecurity,它看起来真的很酷,但是文档太少了,我似乎无法取得任何进展。

Spring Security 似乎是面向网络应用程序的——但我可能是错的。

我不反对自己写这个,但是好像早该这么写了,何必再造轮子呢?

所有这一切需要做的是能够为应用程序的每个级别提供细粒度的安全权限。

例子:App1 具有操作 1、2、3(如“canOpenRemoteFiles”或“canReprocessTransactions”)App2 有 Action 4、5、6、7

我最终需要做的事情是:

// -- the call may not be this declarative
boolean foo = user.getApp1().canReprocessTransactions();
// do something with foo...

// -- or something like this
boolean bar = user.getApp2().canDoAction1();
// do something with bar...

// -- or...
ArrayList < String > dirsCanAccess = user.getApp1().getAccessableDirs();

提前致谢。

最佳答案

上次我查看 Spring-Security 时,它似乎非常基于 Web。

但是... Spring 人员非常好,我怀疑他们有很多构建 block ,您可以从核心 Spring-Security 库中使用它们。

关于非 Web 应用程序中的 Java 安全性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/494860/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com