Package java.security

Examples of java.security.UnresolvedPermission


      certs = null;

        // only add if we had no signer or we had a
        // a signer and found the keys for it.
        if (certs != null || pe.signedBy == null) {
          Permission perm = new UnresolvedPermission(
               pe.permission,
               pe.name,
               pe.action,
               certs);
          entry.add(perm);
View Full Code Here


        for (Iterator i = grantedPermissions.listIterator(); i.hasNext();) {
            Permissions.Permission p = (Permissions.Permission) i.next();
            if (p.getClassName() == null) {
                throw new BuildException("Granted permission " + p + " does not contain a class.");
            } else {
                java.security.Permission perm =  new UnresolvedPermission(p.getClassName(),p.getName(),p.getActions(),null);
                granted.add(perm);
            }
        }
        // Add base set of permissions
        granted.add(new java.net.SocketPermission("localhost:1024-", "listen"));
View Full Code Here

                        pe.actions);
            }
        }
        catch (ClassNotFoundException cnfe) {}
        //maybe properly signed class will be loaded later
        return new UnresolvedPermission(pe.klass, pe.name, pe.actions, signers);
    }
View Full Code Here

                        pe.actions);
            }
        }
        catch (ClassNotFoundException cnfe) {}
        //maybe properly signed class will be loaded later
        return new UnresolvedPermission(pe.klass, pe.name, pe.actions, signers);
    }
View Full Code Here

            String actions = permission.getActions();
            Constructor<? extends java.security.Permission> ctr = clazz.getConstructor(PARAMS);
            return ctr.newInstance(new Object[] { name, actions });
        } catch (Exception e) {
            // Let the UnresolvedPermission handle it.
            return new UnresolvedPermission(permission.getClassName(),
                    permission.getName(), permission.getActions(), null);
        }
    }
View Full Code Here

      certs = null;

        // only add if we had no signer or we had a
        // a signer and found the keys for it.
        if (certs != null || pe.signedBy == null) {
          Permission perm = new UnresolvedPermission(
               pe.permission,
               pe.name,
               pe.action,
               certs);
          entry.add(perm);
View Full Code Here

  }

  public Permissions getUserPermissions() {
    Permissions permissions = new Permissions();
    for (UserPermission permission : userPermissions) {
      permissions.add(new UnresolvedPermission(permission.getClassName(),
                                               permission.getName(),
                                               permission.getActions(),
                                               null));
    }
    permissions.setReadOnly();
View Full Code Here

    permissions.add(
        new RuntimePermission("accessClassInPackage.org.jcp.xml.dsig.internal.*"));

    permissions.add(new RuntimePermission("loadLibrary.keychain"));

    permissions.add(new UnresolvedPermission("javax.jdo.spi.JDOPermission", "getMetadata", null,
        null));
    permissions.add(new UnresolvedPermission("javax.jdo.spi.JDOPermission", "setStateManager", null,
        null));
    permissions.add(new UnresolvedPermission("javax.jdo.spi.JDOPermission", "manageMetadata", null,
        null));
    permissions.add(new UnresolvedPermission("javax.jdo.spi.JDOPermission",
        "closePersistenceManagerFactory", null, null));

    permissions.add(new UnresolvedPermission("groovy.security.GroovyCodeSourcePermission", "*",
        null, null));

    permissions.add(new FilePermission(System.getProperty("user.dir") + File.separatorChar + "-",
        SecurityConstants.FILE_READ_ACTION));

View Full Code Here

    private Permission createUnresolvedPermission( final String type,
                                                   final String target,
                                                   final String actions,
                                                   final Certificate[] signers )
    {
        return new UnresolvedPermission( type, target, actions, signers );
    }
View Full Code Here

            }
        };
        Permission sp1 = new SecurityPermission("a.b.c");
        Permission sp2 = new SecurityPermission("a.b.*");
        Permission sp3 = new SecurityPermission("a.*");
        Permission up = new UnresolvedPermission(
            "java.security.SecurityPermission", "*", null, null);

        Permission[] arr = new Permission[] {
            ap, bp1, bp2, sp1, sp2, up };
        for (int i = 0; i < arr.length; i++) {
View Full Code Here

TOP

Related Classes of java.security.UnresolvedPermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.