001    /**
002     *
003     * Copyright 2003-2004 The Apache Software Foundation
004     *
005     *  Licensed under the Apache License, Version 2.0 (the "License");
006     *  you may not use this file except in compliance with the License.
007     *  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    
018    package org.apache.geronimo.security.realm;
019    
020    import org.apache.geronimo.security.jaas.server.JaasLoginModuleConfiguration;
021    import org.apache.geronimo.security.jaas.JaasLoginModuleChain;
022    
023    
024    /**
025     * @version $Rev: 391894 $ $Date: 2006-04-05 21:00:33 -0700 (Wed, 05 Apr 2006) $
026     */
027    public interface SecurityRealm extends org.apache.geronimo.management.geronimo.SecurityRealm {
028    
029        static final String BASE_OBJECT_NAME = "geronimo.security:type=SecurityRealm";
030    
031        /**
032         * Gets the JAAS configuration for this security realm.
033         */
034        public JaasLoginModuleConfiguration[] getAppConfigurationEntries();
035    
036        /**
037         * If this attribute is true, the login service will not return
038         * principals generated by this realm to clients.  If set to false (the
039         * default), the client will get a copy of all principals (except realm
040         * principals generated strictly for use within Geronimo).
041         */
042        public boolean isRestrictPrincipalsToServer();
043    
044        /**
045         * If this attribute is true, then the principals will be wrapped in
046         * realm principals.
047         */
048        public boolean isWrapPrincipals();
049    
050        /**
051         * Gets a list of the login domains that make up this security realm.  A
052         * particular LoginModule represents 0 or 1 login domains, and a realm is
053         * composed of a number of login modules, so the realm may cover any
054         * number of login domains, though typically that number will be 1.
055         */
056        public String[] getLoginDomains();
057    
058        /**
059         * Gets the first JaasLoginModuleChain node in the chain of LoginModules
060         * for this realm.
061         */
062        public JaasLoginModuleChain getLoginModuleChain();
063    }