Package java.security

Examples of java.security.ProtectionDomain$Key


    validateQuery(query);
    validateSplitSize(numSplits);

    List<Query> splits = new ArrayList<Query>(numSplits);
    List<Key> scatterKeys = getScatterKeys(numSplits, query, datastore);
    Key lastKey = null;
    for (Key nextKey : getSplitKey(scatterKeys, numSplits)) {
      splits.add(createSplit(lastKey, nextKey, query));
      lastKey = nextKey;
    }
    splits.add(createSplit(lastKey, null, query));
View Full Code Here


      {
         Class iface = ifaces[i];
         results.append("\n++"+iface+"("+Integer.toHexString(iface.hashCode())+")");
         ClassLoader loader = ifaces[i].getClassLoader();
         results.append("\n++++ClassLoader: "+loader);
         ProtectionDomain pd = ifaces[i].getProtectionDomain();
         CodeSource cs = pd.getCodeSource();
         if( cs != null )
            results.append("\n++++CodeSource: "+cs);
         else
            results.append("\n++++Null CodeSource");
      }
View Full Code Here

        PolicyContext.setContextID(getContextId());

        // Build Protection Domain with a codesource and array of principal
        // Get roles.
        Principal[] principals = SecurityCurrent.getCurrent().getSecurityContext().getCallerRoles(runAsBean);
        ProtectionDomain protectionDomain = new ProtectionDomain(this.codeSource, null, null, principals);

        boolean accessOK = getPolicy().implies(protectionDomain, invocationContextToMethodPermission(invocationContext));
        if (this.logger.isDebugEnabled()) {
            this.logger.debug("Policy.implies result = {0} ", Boolean.valueOf(accessOK));
        }
View Full Code Here

        PolicyContext.setContextID(getContextId());
        this.logger.debug("roleName = {0}", roleName);

        // Build Protection Domain with a codesource and array of principals
        Principal[] principals = SecurityCurrent.getCurrent().getSecurityContext().getCallerRoles(inRunAs);
        ProtectionDomain protectionDomain = new ProtectionDomain(this.codeSource, null, null, principals);

        // TODO :add cache mechanism ?
        // See JACC 4.12
        EJBRoleRefPermission ejbRoleRefPermission = new EJBRoleRefPermission(ejbName, roleName);
        boolean isInRole = getPolicy().implies(protectionDomain, ejbRoleRefPermission);
View Full Code Here

    // Returns (and initializes) the default domain.
    private synchronized ProtectionDomain getDefaultDomain() {
  if (defaultDomain == null) {
      CodeSource cs =
    new CodeSource(null, (java.security.cert.Certificate[]) null);
      defaultDomain = new ProtectionDomain(cs, null, this, null);
  }
  return defaultDomain;
    }
View Full Code Here

                m_outDebug.println( getRes().getString( "  Implementation Vendor: {0}", pkg.getImplementationVendor() ) );
                m_outDebug.println( getRes().getString( "  Implementation Version: {0}", pkg.getImplementationVersion() ) );
                m_outDebug.println( getRes().getString( "  Is Sealed?: {0}", pkg.isSealed() ? getRes().getString( "True" ) : getRes().getString( "False" ) ) );
            }
           
            ProtectionDomain proDom = clazz.getProtectionDomain();
            m_outDebug.println( getRes().getString( "{0} protection domain:", clazz.getName() ) );
            CodeSource codeSource = proDom.getCodeSource();
            URL jarLocation = codeSource.getLocation();
            m_outDebug.println( getRes().getString( "  Location: {0}", jarLocation ) );
           
            // Try reading in the full jar so we can calculate its size and MD5 hash.
            try
View Full Code Here

{
   protected Logger log = Logger.getLogger(getClass());

   public Manifest findManifest(Class<?> clazz) throws Exception
   {
      ProtectionDomain domain = clazz.getProtectionDomain();
      CodeSource source = domain.getCodeSource();
      URL location = source.getLocation();
      return findManifest(location);
   }
View Full Code Here

      setIntegrationURLs(getURLs());
   }

   protected Set<URL> getURLs()
   {
      ProtectionDomain pd = getClass().getProtectionDomain();
      CodeSource cs = pd.getCodeSource();
      return Collections.singleton(cs.getLocation());
   }
View Full Code Here

      return DeployersUtils.checkForWeldFilesAcrossDeployment(unit);
   }

   protected Set<URL> getURLs()
   {
      ProtectionDomain pd = getClass().getProtectionDomain();
      CodeSource cs = pd.getCodeSource();
      return Collections.singleton(cs.getLocation());
   }
View Full Code Here

      for(int i = 0; i < ifaces.length; i ++)
      {
         results.append("\n++"+ifaces[i]);
         ClassLoader loader = ifaces[i].getClassLoader();
         results.append("\n++++ClassLoader: "+loader);
         ProtectionDomain pd = ifaces[i].getProtectionDomain();
         CodeSource cs = pd.getCodeSource();
         if( cs != null )
            results.append("\n++++CodeSource: "+cs);
         else
            results.append("\n++++Null CodeSource");
      }
View Full Code Here

TOP

Related Classes of java.security.ProtectionDomain$Key

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.