KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > config > SecurityServiceConfig


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23  
24 /*
25  * $Header: /cvs/glassfish/admin-core/mbeanapi/src/java/com/sun/appserv/management/config/SecurityServiceConfig.java,v 1.7.2.1 2006/09/21 22:49:13 ne110415 Exp $
26  * $Revision: 1.7.2.1 $
27  * $Date: 2006/09/21 22:49:13 $
28  */

29
30
31 package com.sun.appserv.management.config;
32
33 import java.util.Map JavaDoc;
34
35 import javax.management.AttributeList JavaDoc;
36
37 import com.sun.appserv.management.base.XTypes;
38 import com.sun.appserv.management.base.Container;
39
40 /**
41      Configuration for the <security-service> element.
42  */

43 public interface SecurityServiceConfig extends
44             PropertiesAccess, ConfigElement, Container
45 {
46 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
47     public static final String JavaDoc J2EE_TYPE = XTypes.SECURITY_SERVICE_CONFIG;
48     
49     public String JavaDoc getAnonymousRole();
50     public void setAnonymousRole( String JavaDoc value );
51
52     public boolean getAuditEnabled();
53     public void setAuditEnabled( boolean value );
54
55     public String JavaDoc getAuditModules();
56     public void setAuditModules( String JavaDoc value );
57
58     public String JavaDoc getDefaultPrincipalPassword();
59     public void setDefaultPrincipalPassword( String JavaDoc value );
60
61     public String JavaDoc getDefaultPrincipal();
62     public void setDefaultPrincipal( String JavaDoc value );
63
64     public String JavaDoc getDefaultRealm();
65     public void setDefaultRealm( String JavaDoc value );
66
67     public String JavaDoc getJACC();
68     public void setJACC( String JavaDoc value );
69
70     /**
71         This attribute is used to customize the
72         java.security.Principal implementation class used in the
73         default principal to role mapping. This attribute is
74         optional. When it is not specified,
75         com.sun.enterprise.deployment.Group implementation of
76         java.security.Principal is used. The value of this attribute
77         is only relevant when the activate-default
78         principal-to-role-mapping attribute is set to true.
79         @since AppServer 9.0
80      */

81     public String JavaDoc getMappedPrincipalClass();
82     
83     /**
84         @see #getMappedPrincipalClass
85         @since AppServer 9.0
86      */

87     public void setMappedPrincipalClass( String JavaDoc theClass );
88     
89     /**
90         Causes the appserver to apply a default principal to role
91         mapping, to any application that does not have an application
92         specific mapping defined. Every role is mapped to a
93         same-named (as the role) instance of a
94         java.security.Principal implementation class (see
95         mapped-principal-class). This behavior is similar to that of
96         Tomcat servlet container. It is off by default.
97         @since AppServer 9.0
98      */

99     public boolean getActivateDefaultPrincipalToRoleMapping();
100     /**
101         @see #getActivateDefaultPrincipalToRoleMapping
102         @since AppServer 9.0
103      */

104     public void setActivateDefaultPrincipalToRoleMapping( boolean enabled );
105
106 // -------------------- Operations --------------------
107

108     /**
109         Calls Container.getContaineeMap( XTypes.JACC_PROVIDER_CONFIG ).
110
111         @return Map of JACCProviderConfig MBean proxies , keyed by name.
112         @see com.sun.appserv.management.base.Container#getContaineeMap
113      */

114     public Map JavaDoc<String JavaDoc,JACCProviderConfig> getJACCProviderConfigMap();
115     
116     /**
117         Create a new &lt;jacc-provider>
118         
119         @param name name of the &lt;jacc-provider>
120         @param policyProvider a classname
121         @param policyConfigurationFactoryProvider a classname
122         @param reservedForFutureUse reserved for future use
123         @return A proxy to the JACCProviderConfig MBean.
124      */

125     public JACCProviderConfig createJACCProviderConfig(
126                             String JavaDoc name,
127                             String JavaDoc policyProvider,
128                             String JavaDoc policyConfigurationFactoryProvider,
129                             Map JavaDoc reservedForFutureUse );
130
131     /**
132         Removes a jacc-provider element.
133
134         @param name The name (id) of the jacc-provider to be removed.
135      */

136     public void removeJACCProviderConfig( String JavaDoc name );
137     
138     
139     /**
140         Calls Container.getContaineeMap( XTypes.AUTH_REALM_CONFIG ).
141
142         @return Map of AuthRealmConfig MBean proxies, keyed by name.
143         @see com.sun.appserv.management.base.Container#getContaineeMap
144      */

145     public Map JavaDoc<String JavaDoc,AuthRealmConfig> getAuthRealmConfigMap();
146     
147     
148     /**
149         Create a new AuthRealmConfig. If you are creating a File Realm using
150         {@link AuthRealmConfig#DEFAULT_REALM_CLASSNAME}, you will also want to specify the
151         property {@link AuthRealmConfig#KEY_FILE_PROPERTY_KEY}, typically with a template String
152         such as {@link AuthRealmConfig#KEY_FILE_PREFIX}my-key-file.
153
154         @param name name of the &lt;auth-realm>
155         @param classname implementing class, eg {@link AuthRealmConfig#DEFAULT_REALM_CLASSNAME}
156         @param optional optional parameters (properties)
157         @return Returns a proxy to the created AuthRealmConfig MBean.
158     */

159     public AuthRealmConfig createAuthRealmConfig( String JavaDoc name,
160             String JavaDoc classname, Map JavaDoc<String JavaDoc,String JavaDoc> optional );
161             
162     /**
163         Removes an auth-realm element.
164
165         @param name name of the auth-realm
166      */

167     public void removeAuthRealmConfig( String JavaDoc name );
168
169
170     /**
171         Calls Container.getContaineeMap( XTypes.AUDIT_MODULE_CONFIG ).
172
173         @return Map of AuditModuleConfig MBean proxies, keyed by name.
174         @see com.sun.appserv.management.base.Container#getContaineeMap
175      */

176     public Map JavaDoc<String JavaDoc,AuditModuleConfig> getAuditModuleConfigMap();
177     
178     
179     /**
180         Create a new &lt;audit-module>
181         
182         @param name name of the &lt;audit-module
183         @param className implementing class
184         @param auditOn true if auditing is on (property)
185         @param reservedForFutureUse reserved for future use
186      */

187     public AuditModuleConfig createAuditModuleConfig( String JavaDoc name, String JavaDoc className,
188                                      boolean auditOn, Map JavaDoc<String JavaDoc,String JavaDoc> reservedForFutureUse );
189
190     /**
191         Removes an &lt;audit-module&gt element.
192
193         @param name name of the audit-module
194      */

195     public void removeAuditModuleConfig( String JavaDoc name );
196     
197     /**
198         Calls Container.getContaineeMap( XTypes.MESSAGE_SECURITY_CONFIG ).
199
200         @return Map of MessageSecurityConfig MBean proxies, keyed by name.
201         @see com.sun.appserv.management.base.Container#getContaineeMap
202      */

203     public Map JavaDoc<String JavaDoc,MessageSecurityConfig> getMessageSecurityConfigMap();
204     
205     /**
206     could never have worked; removing
207         Create a new &lt;message-security-config&gt;
208
209         @param authLayer
210         @param reserved
211         @return A proxy to the MessageSecurityConfig MBean.
212         @see MessageSecurityConfigKeys
213         @deprecated use the form which takes providerID, etc.
214     public MessageSecurityConfig createMessageSecurityConfig(
215         String authLayer,
216         Map<String,String> reserved );
217     */

218         
219     /**
220         Create a new &lt;message-security-config&gt;. Because there must exist at least one
221         {@link ProviderConfig}, you must specify the parameters for one such item. Additional
222         providers may be created using {@link MessageSecurityConfig#createProviderConfig}.
223         <p>
224         Optional values include {@link MessageSecurityConfigKeys#DEFAULT_PROVIDER_KEY} and
225         {@link MessageSecurityConfigKeys#DefaultClientProvider}.
226         <p>
227         See {@link MessageSecurityConfig#createProviderConfig} for more details on parameters
228
229         @param authLayer eg {@link MessageLayerValues#SOAP} or {@link MessageLayerValues#HTTP_SERVLET}
230         @param providerID choose a self-explanatory name for the provider
231         @param providerType either {@link ProviderConfig#PROVIDER_TYPE_CLIENT} or {@link ProviderConfig#PROVIDER_TYPE_SERVER}
232         @param providerClassname classname for the provider
233         @param optional
234         @return A proxy to the MessageSecurityConfig MBean.
235         @see MessageSecurityConfigKeys
236     */

237     public MessageSecurityConfig createMessageSecurityConfig(
238         String JavaDoc authLayer,
239         String JavaDoc providerID,
240         String JavaDoc providerType,
241         String JavaDoc providerClassname,
242         Map JavaDoc<String JavaDoc,String JavaDoc> optional );
243
244     /**
245         Removes message-security-config element.
246
247         @param authLayer
248      */

249     public void removeMessageSecurityConfig( String JavaDoc authLayer );
250 }
251
252
253
254
255
Popular Tags