Package javax.security.jacc

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


            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here


            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (final Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (final ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here

            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

                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);

                }
            }
        }
View Full Code Here

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

            role.add(new Role(rolename));
            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

            _logger.log(Level.FINE,"JACC: Converting role-ref: Looking at Role =  "+r.getName());
          }
          if (!role.contains(r)) {
            String action = r.getName();
            EJBRoleRefPermission ejbrr = new EJBRoleRefPermission(eName, action);
            pc.addToRole(action, ejbrr);
            if (_logger.isLoggable(Level.FINE)) {
              _logger.fine("JACC: Converting role-ref: Role =  " + r.getName() +
                  " is added as a permission with name(" + ejbrr.getName() +
                  ") and actions (" + ejbrr.getActions() +
                  ")" + "mapped to role (" + action + ")");
View Full Code Here

         */
        if ((!role.contains(anyAuthUserRole)) && !rolesetContainsAnyAuthUserRole) {
            String rolename = anyAuthUserRole.getName();
            EJBRoleRefPermission ejbrr =
                    new EJBRoleRefPermission(eName, rolename);
            pc.addToRole(rolename, ejbrr);
            if (_logger.isLoggable(Level.FINE)) {
                _logger.fine("JACC: Converting role-ref: Adding any authenticated user role-ref " +
                        " to permission with name(" + ejbrr.getName() +
                        ") and actions (" + ejbrr.getActions() +
                        ")" + "mapped to role (" + rolename + ")");
View Full Code Here

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

            while (roleIt.hasNext()) {
                Map.Entry entry = (Map.Entry)roleIt.next();
                pc.addToRole((String) entry.getKey(),
                        (Permissions) entry.getValue());
            }
        }
    }
View Full Code Here

            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here

            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
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.