Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.SecurityService


       }
       createRealms(cfg.getSecurityService(), cfg);
   }

   private void setDefaultDigestAlgorithm() {
       SecurityService service = config.getSecurityService();
       if(service == null) {
           return;
       }
       List<Property> props = service.getProperty();
       if(props == null) {
           return;
      
       Iterator<Property> propsIterator = props.iterator();
       while(propsIterator != null && propsIterator.hasNext()) {
View Full Code Here


     * @return          a list of the file names for all files realms in the
     *                  config
     */
    public static List<String> getRealmFileNames(Config config) {
        List<String> files = new ArrayList<String>();
        SecurityService securityService = config.getSecurityService();
        for (AuthRealm authRealm : securityService.getAuthRealm()) {
            String fileRealmClassName = authRealm.getClassname();
            // skip it if it's not a file realm
            if (fileRealmClassName == null ||
                    !fileRealmClassName.equals(FileRealm.class.getName()))
                continue;
View Full Code Here

            }
        }

        if (authenticator instanceof DigestAuthenticator) {
            Config config = services.getService(Config.class, ServerEnvironment.DEFAULT_INSTANCE_NAME);
            SecurityService securityService = config.getSecurityService();
            String digestAlgorithm = null;
            if (securityService != null) {
                digestAlgorithm = securityService.getPropertyValue(DEFAULT_DIGEST_ALGORITHM);
            }
            if (digestAlgorithm != null) {
                ((DigestAuthenticator)authenticator).setAlgorithm(digestAlgorithm);
            }
        }
View Full Code Here

     * This method initializes AuditManager which load audit modules and
     * audit enabled flag
     */
    public void loadAuditModules() {
        try {
            SecurityService securityBean = serverContext.getDefaultServices().getService(SecurityService.class,
                    ServerEnvironment.DEFAULT_INSTANCE_NAME);
           
            assert(securityBean != null);
            // @todo will be removed to incorporate the new structure.
            //v3:Commented boolean auditFlag = securityBean.isAuditEnabled();
            boolean auditFlag = Boolean.parseBoolean(securityBean.getAuditEnabled());

            setAuditOn(auditFlag);
            /*V3:Commented
            com.sun.enterprise.config.serverbeans.AuditModule[] am =
                    securityBean.getAuditModule();*/
            List<com.sun.enterprise.config.serverbeans.AuditModule> am = securityBean.getAuditModule();
            for (com.sun.enterprise.config.serverbeans.AuditModule it: am) {
            //V3:Commented for (int i = 0; i < am.length; i++){
                try {
                    //V3:Commented String name = am[i].getName();
                    //V3:Commented String classname = am[i].getClassname();
View Full Code Here

     * audit enabled flag
     */
    @Override
    public void loadAuditModules() {
        try {
            SecurityService securityBean = serverContext.getDefaultServices().getService(SecurityService.class,
                    ServerEnvironment.DEFAULT_INSTANCE_NAME);
           
            assert(securityBean != null);
            // @todo will be removed to incorporate the new structure.
            //v3:Commented boolean auditFlag = securityBean.isAuditEnabled();
            boolean auditFlag = Boolean.parseBoolean(securityBean.getAuditEnabled());

            setAuditOn(auditFlag);
            /*V3:Commented
            com.sun.enterprise.config.serverbeans.AuditModule[] am =
                    securityBean.getAuditModule();*/
            List<com.sun.enterprise.config.serverbeans.AuditModule> am = securityBean.getAuditModule();
            for (com.sun.enterprise.config.serverbeans.AuditModule it: am) {
            //V3:Commented for (int i = 0; i < am.length; i++){
                try {
                    //V3:Commented String name = am[i].getName();
                    //V3:Commented String classname = am[i].getClassname();
View Full Code Here

            com.sun.enterprise.config.serverbeans.Cluster cluster = domain.getClusterNamed(target);
            if (cluster != null) {
                config = domain.getConfigNamed(cluster.getConfigRef());
            }
        }
        final SecurityService securityService = config.getSecurityService();

        // ensure we have the file authrealm
        AuthRealm fileAuthRealm = null;
       
        if (authRealmName == null)
            authRealmName = securityService.getDefaultRealm();       
       
        for (AuthRealm authRealm : securityService.getAuthRealm()) {           
            if (authRealm.getName().equals(authRealmName)) {
                fileAuthRealm = authRealm;           
                break;
            }
        }      
View Full Code Here

        }

        List <Config> configList = configs.getConfig();
        Config config = configList.get(0);

        SecurityService securityService = config.getSecurityService();
      
        AuthRealm fileAuthRealm = null;       
        for (AuthRealm authRealm : securityService.getAuthRealm()) {           
            if (authRealm.getName().equals(adminService.getAuthRealmName())) {               
                fileAuthRealm = authRealm;           
                break;
            }
        }       
View Full Code Here

            com.sun.enterprise.config.serverbeans.Cluster cluster = domain.getClusterNamed(target);
            if (cluster != null) {
                config = domain.getConfigNamed(cluster.getConfigRef());
            }
        }
        final SecurityService securityService = config.getSecurityService();

        // ensure we have the file authrealm
        if (authRealmName == null)
            authRealmName = securityService.getDefaultRealm();       
       
        AuthRealm fileAuthRealm = null;       
        for (AuthRealm authRealm : securityService.getAuthRealm()) {           
            if (authRealm.getName().equals(authRealmName))                
                fileAuthRealm = authRealm;           
        }       
        if (fileAuthRealm == null) {
            report.setMessage(localStrings.getLocalString(
View Full Code Here

            com.sun.enterprise.config.serverbeans.Cluster cluster = domain.getClusterNamed(target);
            if (cluster != null) {
                config = domain.getConfigNamed(cluster.getConfigRef());
            }
        }
        final SecurityService securityService = config.getSecurityService();

        // ensure we have the file authrealm
        if (authRealmName == null)
            authRealmName = securityService.getDefaultRealm();       

        AuthRealm fileAuthRealm = null;       
        for (AuthRealm authRealm : securityService.getAuthRealm()) {
            if (authRealm.getName().equals(authRealmName))                
                fileAuthRealm = authRealm;           
        }       
        if (fileAuthRealm == null) {
            report.setMessage(localStrings.getLocalString(
View Full Code Here

     * @return          a list of the file names for all files realms in the
     *                  config
     */
    public static List<String> getRealmFileNames(Config config) {
        List<String> files = new ArrayList<String>();
        SecurityService securityService = config.getSecurityService();
        for (AuthRealm authRealm : securityService.getAuthRealm()) {
            String fileRealmClassName = authRealm.getClassname();
            // skip it if it's not a file realm
            if (fileRealmClassName == null ||
                    !fileRealmClassName.equals(FileRealm.class.getName()))
                continue;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.SecurityService

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.