Running the code in Listing 6 under a SecurityManager gives the following output.
在SecurityManager下运行清单6中的代码会得到以下输出。
The responsibility of enforcing a system security policy lies with a class called SecurityManager.
由一个名为SecurityManager 的类负责实施系统安全策略。
In Listing 2, we see the example INI configuration we will use to configure the SecurityManager instance.
在清单2中,我们看到了用于配置SecurityManager实例的INI配置例子。
The purpose of this class is the same as that of SecurityManager; namely, it is responsible for making access decisions.
这个类的目的与SecurityManager是一样的,即它负责做出访问决定。
The iniRealm object, which is a component used by the SecurityManager to represent user accounts defined in the INI format.
iniRealm对象,它被SecurityManager用来表示以INI格式定义的用户帐户。
Therefore, any application requiring custom logic for making access decisions had to implement and install a custom SecurityManager.
因此,任何需要自定义逻辑进行访问决定的应用程序都必须实现并安装一个自定义的SecurityManager。
While the Subject represents security operations for the current user, the SecurityManager manages security operations for all users.
Subject代表了当前用户的安全操作,SecurityManager则管理所有用户的安全操作。
Use a custom SecurityManager or ClassLoader that prevents loading of anonymous classes or other classes not under your direct control.
使用定制的SecurityManager或ClassLoader阻止加载匿名类或其他无法直接控制的类。
Create the SecurityManager instance based on the configuration (using Shiro’s Factory concept that represents the Factory Method design pattern).
根据配置创建SecurityManager实例(使用Shiro的工厂概念,它表述了 工厂方法设计模式);
We'll discuss the use of policy files and permissions, and also talk about the relationship between the SecurityManager and the AccessController.
我们将讨论策略文件和许可权的使用,并讨论SecurityManager和AccessController之间的关系。
So far, this simple example has covered starting the Shiro SecurityManager, getting the current user, and logging that the user isn't authenticated yet.
至此,这个简单的示例涵盖的内容包括:启动ShiroSecurityManager、获得当前用户并记录下用户未经身份验证。
The SecurityManager class has, of course, been retained for backward compatibility, but its newer implementation delegates to the underlying AccessController.
当然,为了向后兼容性保留了securitymanager类,但是其更新的实现委派给了底层的AccessController。
You'll also see that with a simple understanding of object graph navigation, INI can be used effectively to configure simple object graph like the SecurityManager.
你还能看到,只要简单地理解对象导航,INI可被有效地用于配置像SecurityManager那样简单的对象图。
You'll also see that with a simple understanding of object graph navigation, INI can be used effectively to configure simple object graph like the SecurityManager.
你还能看到,只要简单地理解对象导航,INI可被有效地用于配置像SecurityManager那样简单的对象图。
应用推荐