Package javax.security.jacc

Examples of javax.security.jacc.PolicyConfiguration.addToRole()


            for (Map.Entry<String, PermissionCollection> roleEntry : componentPermissions.getRolePermissions().entrySet()) {
                String roleName = roleEntry.getKey();
                PermissionCollection rolePermissions = roleEntry.getValue();
                for (Enumeration permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = (Permission) permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);

                }
            }
        }
View Full Code Here


                String rolename = roleRef.getRolename();
                EJBRoleRefPermission ejbrr =
                        new EJBRoleRefPermission(eName, rolename);
                String rolelink = roleRef.getSecurityRoleLink().getName();

                pc.addToRole(rolelink, ejbrr);

                if (_logger.isLoggable(Level.FINE)) {
                    _logger.fine("JACC: Converting role-ref -> " + roleRef.toString() +
                            " to permission with name(" + ejbrr.getName() +
                            ") and actions (" + ejbrr.getActions() +
View Full Code Here

                Iterator roleIt = rolePermissionsTable.keySet().iterator();

                while (roleIt.hasNext()) {
                    String roleName = (String) roleIt.next();
                    pc.addToRole(roleName,
                            (Permissions) rolePermissionsTable.get(roleName));
                }
            }
        }
    }
View Full Code Here

                Map.Entry roleEntry = (Map.Entry) roleIterator.next();
                String roleName = (String) roleEntry.getKey();
                PermissionCollection rolePermissions = (PermissionCollection) roleEntry.getValue();
                for (Enumeration permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = (Permission) permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);

                }
            }

            GeronimoPolicyConfigurationFactory roleMapperFactory = GeronimoPolicyConfigurationFactory.getSingleton();
View Full Code Here

      PolicyConfiguration policyConfiguration = factory.getPolicyConfiguration(
          getBrokerPolicyContextId(brokerSecurity.getBrokerName()), true);

      for (Iterator iter = brokerSecurity.getConnectRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSBrokerPermission(
            brokerSecurity.getBrokerName(), JMSBrokerPermission.CONNECT_ACTION));
      }

      policyConfiguration.commit();
View Full Code Here

      PolicyConfigurationFactory factory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
      PolicyConfiguration policyConfiguration = factory.getPolicyConfiguration(policyId, true);

      for (Iterator iter = destinationSecurity.getConsumeRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
            destinationSecurity.getDestination().getPhysicalName(), JMSDestinationPermission.CONSUME_ACTION));
      }
      for (Iterator iter = destinationSecurity.getProduceRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
View Full Code Here

        policyConfiguration.addToRole(role, new JMSDestinationPermission(
            destinationSecurity.getDestination().getPhysicalName(), JMSDestinationPermission.CONSUME_ACTION));
      }
      for (Iterator iter = destinationSecurity.getProduceRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
            destinationSecurity.getDestination().getPhysicalName(), JMSDestinationPermission.PRODUCE_ACTION));
      }
      for (Iterator iter = destinationSecurity.getSendRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
View Full Code Here

        policyConfiguration.addToRole(role, new JMSDestinationPermission(
            destinationSecurity.getDestination().getPhysicalName(), JMSDestinationPermission.PRODUCE_ACTION));
      }
      for (Iterator iter = destinationSecurity.getSendRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
            destinationSecurity.getDestination().getPhysicalName(), JMSDestinationPermission.SEND_ACTION));
      }
     
      policyConfiguration.commit();
View Full Code Here

      PolicyConfiguration policyConfiguration = factory.getPolicyConfiguration(
          getBrokerPolicyContextId(brokerSecurity.getBrokerName()), true);

      for (Iterator iter = brokerSecurity.getConnectRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSBrokerPermission(
            brokerSecurity.getBrokerName(), JMSBrokerPermission.CONNECT_ACTION));
      }

      policyConfiguration.commit();
View Full Code Here

      PolicyConfigurationFactory factory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
      PolicyConfiguration policyConfiguration = factory.getPolicyConfiguration(policyId, true);

      for (Iterator iter = destinationSecurity.getConsumeRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
            destinationSecurity.getDestination().getPhysicalName(), JMSDestinationPermission.CONSUME_ACTION));
      }
      for (Iterator iter = destinationSecurity.getProduceRoles().iterator(); iter.hasNext();) {
        String role = (String) iter.next();
        policyConfiguration.addToRole(role, new JMSDestinationPermission(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.