简体   繁体   English

Java安全管理器异常

[英]Java security manager Exception

I am working on a project using the Java Authorization and Authentication Service (JAAS). 我正在使用Java授权和认证服务(JAAS)进行项目。 I am encountering a strange security exception though: 我遇到了一个奇怪的安全异常:

Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.util")

I cannot manage to understand what is the meaning of this exception. 我无法理解此异常的含义。 Besides, I am getting the same exception even if I grant the application all the permissions with 此外,即使我向应用程序授予所有权限,我也会遇到相同的异常

  permission java.security.AllPermission;

From here : 这里

The java.lang.SecurityManager.checkPermission(Permission perm, Object context) method throws a SecurityException if the specified security context is denied access to the resource specified by the given permission. 如果指定的安全上下文被拒绝访问由给定权限指定的资源,则 java.lang.SecurityManager.checkPermission(Permission perm,Object context)方法将引发SecurityException。 The context must be a security context returned by a previous call to getSecurityContext and the access control decision is based upon the configured security policy for that security context. 该上下文必须是先前对getSecurityContext的调用返回的安全上下文,并且访问控制决策基于为该安全上下文配置的安全策略。

The SecurityManager is configured by the local system and SecurityManager is responsible to protect the local system SecurityManager由本地系统配置,SecurityManager负责保护本地系统

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM