Package net.jini.security

Examples of net.jini.security.AuthenticationPermission$AuthenticationPermissionCollection


      int delegNoStepsFromSuccess = 2;
      KerberosPrincipal delegNoCp = null;

      HashMap hasPermMap = new HashMap();
      for (int i = 0; i < configs.length; i++) {
    AuthenticationPermission perm = getAuthenticationPermission(
        configs[i].clientPrincipal, configs[i].deleg);
    Boolean hasPerm = (Boolean) hasPermMap.get(perm);
    if (hasPerm == null) {
        try {
      KerberosUtil.checkAuthPermission(perm);
View Full Code Here


      } else {
    act = "connect";
      }
      Set locals = Collections.singleton(client);
      Set peers = Collections.singleton(serverPrincipal);
      return new AuthenticationPermission(locals, peers, act);
  }
View Full Code Here

    // allow the simulator, running as reggie, to authenticate as reggie
    // XXX Should the permission be obtained from the configuration???
    Security.grant(lookupProxy.getClass(),
             new Principal[]{reggie},
             new Permission[] {
           new AuthenticationPermission(
             Collections.singleton(reggie),
             Collections.singleton(reggie),
             "connect")});
    context.login();
      } catch (LoginException e) {
View Full Code Here

  Permissions permissions = new Permissions();
  for (int i = 0; i < perms.length; i++) {
      permissions.add(perms[i]);
  }
  if (isKerberos) {
      permissions.add(new AuthenticationPermission("* \"*\"", "connect"));
  }
  AccessControlContext acc = new AccessControlContext(
            new ProtectionDomain[] {
            new ProtectionDomain(null, permissions),
  });
View Full Code Here

  if (sm != null) {
      Set localps = Collections.singleton(local);
      Set peerps = null;
      if (peer != null)
    peerps = Collections.singleton(peer);
      AuthenticationPermission perm =
    new AuthenticationPermission(localps, peerps, action);
      sm.checkPermission(perm);
  }
    }
View Full Code Here

    X509Certificate serverCert =
        getAuthManager().getServerCertificate(session);
    serverPrincipal = serverCert != null
        ? serverCert.getSubjectX500Principal() : null;
    if (serverPrincipal != null) {
        authPermission = new AuthenticationPermission(
      Collections.singleton(serverPrincipal),
      (clientPrincipal != null
       ? Collections.singleton(clientPrincipal) : null),
      "accept");
    }
View Full Code Here

  X509Certificate cert)
    {
  Set client = Collections.singleton(cert.getSubjectX500Principal());
  Set server = (serverPrincipal == null)
      ? null : Collections.singleton(serverPrincipal);
  return new AuthenticationPermission(client, server, "connect");
    }
View Full Code Here

      for (Iterator iter = this.serverPrincipals.iterator();
     iter.hasNext();
     i++)
      {
    Principal p = (Principal) iter.next();
    listenPermissions[i] = new AuthenticationPermission(
        Collections.singleton(p), null, "listen");
      }
  }
  if (this.serverPrincipals == null ||
      /* Don't use current subject without any permission */
 
View Full Code Here

  if (sm != null) {
      for (Iterator iter = result.iterator(); iter.hasNext(); ) {
    Principal p = (Principal) iter.next();
    try {
        sm.checkPermission(
      new AuthenticationPermission(
          Collections.singleton(p), null, "listen"));
    } catch (SecurityException e) {
        logger.log(Levels.HANDLED,
             "compute principals for server endpoint " +
             "caught exception",
View Full Code Here

    continue;
      } else if (context.server == UNKNOWN_PRINCIPAL) {
    /* Server not known -- can't check any permissions */
    break;
      }
      AuthenticationPermission p = new AuthenticationPermission(
    Collections.singleton(context.client),
    Collections.singleton(context.server),
    "connect");
      Object value = perms.get(p);
      if (Boolean.FALSE.equals(value)) {
View Full Code Here

TOP

Related Classes of net.jini.security.AuthenticationPermission$AuthenticationPermissionCollection

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.