Package org.apache.geronimo.common

Examples of org.apache.geronimo.common.GeronimoSecurityException


        refreshGroups();
        try {
            groups.remove(groupPrincipal);
            store(groups, serverInfo.resolve(getGroupsURI()).toURL());
        } catch (Exception e) {
            throw new GeronimoSecurityException(
                    "Cannot remove group principal: " + e.getMessage());
        }
    }
View Full Code Here


        try {
            groups.setProperty((String) properties.get("GroupName"),
                    (String) properties.get("Members"));
            store(groups, serverInfo.resolve(getGroupsURI()).toURL());
        } catch (Exception e) {
            throw new GeronimoSecurityException("Cannot add group principal: "
                    + e.getMessage());
        }
    }
View Full Code Here

        }
    }

    public void addToGroup(String userPrincipal, String groupPrincipal)
            throws GeronimoSecurityException {
        throw new GeronimoSecurityException(
                "Not implemented for properties file security realm...");
    }
View Full Code Here

                "Not implemented for properties file security realm...");
    }

    public void removeFromGroup(String userPrincipal, String groupPrincipal)
            throws GeronimoSecurityException {
        throw new GeronimoSecurityException(
                "Not implemented for properties file security realm...");
    }
View Full Code Here

                }
            }

        } catch (Exception e) {
            log.error("Properties File Login Module - data load failed", e);
            throw new GeronimoSecurityException(e);
        }
    }
View Full Code Here

                }
            }

        } catch (Exception e) {
            log.error("Properties File Login Module - data load failed", e);
            throw new GeronimoSecurityException(e);
        }
    }
View Full Code Here

                }
            }

        } catch (Exception e) {
            log.error("Properties File Login Module - data load failed", e);
            throw new GeronimoSecurityException(e);
        }
    }
View Full Code Here

    private Subject generateDefaultRealmSubject(String argument) {
        Subject defaultSubject = new Subject();

        String[] tokens = argument.substring(DEFAULT_REALM_PRINCIPAL.length()).split(":");
        if (tokens.length != 4) throw new GeronimoSecurityException("Unable to create primary realm principal");

        String realm = tokens[0];
        String domain = tokens[1];
        String className = tokens[2];
        String principalName = tokens[3];

        if (realm.length() == 0 || domain.length() == 0 || className.length() == 0 || principalName.length() == 0) {
            throw new GeronimoSecurityException("Unable to create primary realm principal");
        }

        RealmPrincipal realmPrincipal = ConfigurationUtil.generateRealmPrincipal(realm, domain, className, principalName, classLoader);
        if (realmPrincipal == null) {
            throw new GeronimoSecurityException("Unable to create realm principal");
        }
        PrimaryRealmPrincipal primaryRealmPrincipal = null;
        try {
            primaryRealmPrincipal = ConfigurationUtil.generatePrimaryRealmPrincipal(realm, domain, className, principalName, classLoader);
        } catch (DeploymentException e) {
            throw new GeronimoSecurityException("Unable to create primary realm principal", e);
        }

        defaultSubject.getPrincipals().add(realmPrincipal);
        defaultSubject.getPrincipals().add(primaryRealmPrincipal);
View Full Code Here

    private Subject generateDefaultDomainSubject(String argument) {
        Subject defaultSubject = new Subject();

        String[] tokens = argument.substring(DEFAULT_DOMAIN_PRINCIPAL.length()).split(":");
        if (tokens.length != 3) throw new GeronimoSecurityException("Unable to create primary domain principal");

        String realm = tokens[0];
        String className = tokens[1];
        String principalName = tokens[2];

        if (realm.length() == 0 || className.length() == 0 || principalName.length() == 0) {
            throw new GeronimoSecurityException("Unable to create primary domain principal");
        }

        DomainPrincipal domainPrincipal = ConfigurationUtil.generateDomainPrincipal(realm, className, principalName, classLoader);
        if (domainPrincipal == null) {
            throw new GeronimoSecurityException("Unable to create domain principal");
        }
        PrimaryDomainPrincipal primaryDomainPrincipal = null;
        try {
            primaryDomainPrincipal = ConfigurationUtil.generatePrimaryDomainPrincipal(realm, className, principalName, classLoader);
        } catch (DeploymentException e) {
            throw new GeronimoSecurityException("Unable to create primary domain principal", e);
        }

        defaultSubject.getPrincipals().add(domainPrincipal);
        defaultSubject.getPrincipals().add(primaryDomainPrincipal);
View Full Code Here

    private Subject generateDefaultSubject(String argument) {
        Subject defaultSubject = new Subject();

        String[] tokens = argument.substring(DEFAULT_PRINCIPAL.length()).split(":");
        if (tokens.length != 2) throw new GeronimoSecurityException("Unable to create primary principal");

        String className = tokens[0];
        String principalName = tokens[1];

        if (className.length() == 0 || principalName.length() == 0) {
            throw new GeronimoSecurityException("Unable to create primary principal");
        }

        Principal domainPrincipal = ConfigurationUtil.generatePrincipal(className, principalName, classLoader);
        if (domainPrincipal == null) {
            throw new GeronimoSecurityException("Unable to create principal");
        }
        PrimaryPrincipal primaryDomainPrincipal = null;
        try {
            primaryDomainPrincipal = ConfigurationUtil.generatePrimaryPrincipal(className, principalName, classLoader);
        } catch (DeploymentException e) {
            throw new GeronimoSecurityException("Unable to create primary principal", e);
        }

        defaultSubject.getPrincipals().add(domainPrincipal);
        defaultSubject.getPrincipals().add(primaryDomainPrincipal);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.common.GeronimoSecurityException

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.