public PermsHolder(PermissionCollection eePC, PermissionCollection declPC, PermissionCollection restrictPC) { setEEPermissions(eePC); setDeclaredPermissions(declPC); setRestrictPermissions(restrictPC); }
public Object run() throws SecurityException { if (isEEPermission) ddpl.addEEPermissions(pc); else ddpl.addDeclaredPermissions(pc); return null; } });
/** * Constructor. * * @param parent parent class loader */ public ASURLClassLoader(ClassLoader parent) { super(new URL[0], parent); permissionsHolder = new PermsHolder(); }
private AppClientSSL convert(Ssl ssl) { AppClientSSL appSSL = new AppClientSSL(); appSSL.setCertNickname(ssl.getCertNickname()); //appSSL.setClientAuthEnabled(ssl.isClientAuthEnabled()); appSSL.setSsl2Ciphers(ssl.getSsl2Ciphers()); appSSL.setSsl2Enabled(ssl.isSsl2Enabled()); appSSL.setSsl3Enabled(ssl.isSsl3Enabled()); appSSL.setSsl3TlsCiphers(ssl.getSsl3TlsCiphers()); appSSL.setTlsEnabled(ssl.isTlsEnabled()); appSSL.setTlsRollbackEnabled(ssl.isTlsRollbackEnabled()); return appSSL; }
@Override protected PermissionCollection getPermissions(CodeSource codeSource) { PermissionCollection cachedPc = permissionsHolder.getCachedPerms(codeSource); if (cachedPc != null) return cachedPc; return permissionsHolder.getPermissions( codeSource, super.getPermissions(codeSource)); }
@Override public void addDeclaredPermissions(PermissionCollection declaredPc ) throws SecurityException { if (securityManager != null) { securityManager.checkSecurityAccess( DDPermissionsLoader.SET_EE_POLICY); permissionsHolder.setDeclaredPermissions(declaredPc); } }
@Override public void addEEPermissions(PermissionCollection eePc) throws SecurityException { if (securityManager != null) { securityManager.checkSecurityAccess( DDPermissionsLoader.SET_EE_POLICY); permissionsHolder.setEEPermissions(eePc); } }
private void addPermission(String classname, String target, String actions) { try { Permission pm = PermissionCreator.getInstance(classname, target, actions); if (pm != null) { if (permissionCollectionToBeRestricted != null && permissionCollectionToBeRestricted.implies(pm)) { throw new SecurityException("Restricted Permission Declared - fail deployment!"); } else { pc.add(pm); } } } catch (ClassNotFoundException e) { throw new SecurityException(e); } catch (NoSuchMethodException e) { throw new SecurityException(e); } catch (InstantiationException e) { throw new SecurityException(e); } catch (IllegalAccessException e) { throw new SecurityException(e); } catch (InvocationTargetException e) { throw new SecurityException(e); } }
/** * Sets the virtual server parent of this web module, and passes it on to * this web module's realm adapter.. * * @param container The virtual server parent */ @Override public void setParent(Container container) { super.setParent(container); vsId = ((VirtualServer) container).getID(); // The following assumes that the realm has been set on this WebModule // before the WebModule is added as a child to the virtual server on // which it is being deployed. /*RealmAdapter ra = (RealmAdapter) getRealm(); if (ra != null) { 1 ra.setVirtualServer(container); }*/ Realm ra = getRealm(); if (ra != null && ra instanceof RealmInitializer) { ((RealmInitializer) ra).setVirtualServer(container); } }
public PermsHolder(PermissionCollection eePC, PermissionCollection declPC, PermissionCollection restrictPC) { setEEPermissions(eePC); setDeclaredPermissions(declPC); setRestrictPermissions(restrictPC); }
ddcl.addDeclaredPermissions(declPc); ddcl.addEEPermissions(eePc);
/** * Constructor. * * @param parent parent class loader */ public ASURLClassLoader(ClassLoader parent) { super(new URL[0], parent); permissionsHolder = new PermsHolder(); }
@Override protected PermissionCollection getPermissions(CodeSource codeSource) { PermissionCollection cachedPc = permissionsHolder.getCachedPerms(codeSource); if (cachedPc != null) return cachedPc; return permissionsHolder.getPermissions( codeSource, super.getPermissions(codeSource)); }
@Override public void addDeclaredPermissions(PermissionCollection declaredPc ) throws SecurityException { if (System.getSecurityManager() != null) { System.getSecurityManager().checkSecurityAccess( DDPermissionsLoader.SET_EE_POLICY); permissionsHolder.setDeclaredPermissions(declaredPc); } }
@Override public void addEEPermissions(PermissionCollection eePc) throws SecurityException { // sm on if (System.getSecurityManager() != null) { System.getSecurityManager().checkSecurityAccess( DDPermissionsLoader.SET_EE_POLICY); permissionsHolder.setEEPermissions(eePc); } }
/** * Constructor. */ public ASURLClassLoader() { super(new URL[0]); permissionsHolder = new PermsHolder(); if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "ClassLoader: " + this + " is getting created."); } }
@Override public void addDeclaredPermissions(PermissionCollection declaredPc ) throws SecurityException { if (System.getSecurityManager() != null) { System.getSecurityManager().checkSecurityAccess( DDPermissionsLoader.SET_EE_POLICY); permissionsHolder.setDeclaredPermissions(declaredPc); } }
@Override public void addEEPermissions(PermissionCollection eePc) throws SecurityException { // sm on if (System.getSecurityManager() != null) { System.getSecurityManager().checkSecurityAccess( DDPermissionsLoader.SET_EE_POLICY); permissionsHolder.setEEPermissions(eePc); } }
/** * Constructor. */ public ASURLClassLoader() { super(new URL[0]); permissionsHolder = new PermsHolder(); if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "ClassLoader: " + this + " is getting created."); } }
private void init() { this.parent = getParent(); /* SJSAS 6317864 system = getSystemClassLoader(); */ // START SJSAS 6317864 system = this.getClass().getClassLoader(); // END SJSAS 6317864 securityManager = System.getSecurityManager(); if (securityManager != null) { refreshPolicy(); } addOverridablePackage("com.sun.faces.extensions"); permissionsHolder = new PermsHolder(); }