Package net.jini.security

Examples of net.jini.security.AuthenticationPermission$AuthenticationPermissionCollection


  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


                   String action)
    {
  Set server = Collections.singleton(cert.getSubjectX500Principal());
  Set client = (peer == null)
      ? null : Collections.singleton(new X500Principal(peer));
  return new AuthenticationPermission(server, client, action);
    }
View Full Code Here

      this.doAsSubject = doAsSubject != null ? doAsSubject :
    Subject.getSubject(AccessController.getContext());
      if (permsToRunWith != null) {
    this.permsToRunWith = permsToRunWith;
      } else {
    AuthenticationPermission authPerm;
    if (serverPrincipal != null) {
        authPerm = new AuthenticationPermission(
      Collections.singleton(serverPrincipal), null,
      "listen");
    } else {
        authPerm = new AuthenticationPermission(
      "javax.security.auth.kerberos.KerberosPrincipal \"*\"",
      "listen");
    }
    this.permsToRunWith = new Permission[] {
        new AuthPermission("doAs"),
View Full Code Here

      if (permsToRunWith != null) {
    this.permsToRunWith = permsToRunWith;
      } else {
    Principal serverPrincipal = serverEp.getPrincipal();
    AuthenticationPermission authPerm =
        new AuthenticationPermission(
      Collections.singleton(serverPrincipal), null,
      "listen");
    this.permsToRunWith = new Permission[] {
        new SocketPermission("*:1024-", "accept,connect,listen"),
        authPerm,
View Full Code Here

      // add in the "connect/delegate" auth permissions
      int i = basePerms.length;
      for (Iterator iter = allowedSps.iterator(); iter.hasNext();) {
    Set spset = Collections.singleton(iter.next());
    clientPerms[i++] = new AuthenticationPermission(
        allowedCps, spset, action);
      }
      return clientPerms;
  }
View Full Code Here

           allowedCps.size()];
      System.arraycopy(basePerms, 0, serverPerms, 0, basePerms.length);

      // add in the "listen" auth permission
      serverPerms[basePerms.length] =
          new AuthenticationPermission(allowedSps, null, "listen");

      // add in the "accept" auth permissions
      int i = basePerms.length + 1;
      for (Iterator iter = allowedCps.iterator(); iter.hasNext();) {
    Set cpset = Collections.singleton(iter.next());
    serverPerms[i++] = new AuthenticationPermission(
        allowedSps, cpset, "accept");
      }

      return serverPerms;
  }
View Full Code Here

      this.serverEndpoint = serverEndpoint;

      if (permsToRunWith != null) {
    this.permsToRunWith = permsToRunWith;
      } else {
    AuthenticationPermission authPerm =
        new AuthenticationPermission(
      Collections.singleton(serverEndpoint.getPrincipal()),
      null, "listen");
    this.permsToRunWith = new Permission[] {
        new AuthPermission("getSubject"),
        new SocketPermission("*:1024-", "accept,connect,listen"),
View Full Code Here

      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

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.