KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > security > plugins > JaasSecurityManagerServiceMBean


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.security.plugins;
8
9 import java.security.Principal JavaDoc;
10 import java.util.List JavaDoc;
11 import javax.management.ObjectName JavaDoc;
12
13 import org.jboss.mx.util.ObjectNameFactory;
14 import org.jboss.security.SecurityDomain;
15 import org.jboss.system.ServiceMBean;
16
17 /**
18  * The management interface for the JaasSecurityManagerService mbean.
19  *
20  * @author Scott.Stark@jboss.org
21  * @version $Revision: 1.14.6.1 $
22  */

23 public interface JaasSecurityManagerServiceMBean
24    extends ServiceMBean, SecurityManagerMBean
25 {
26    ObjectName JavaDoc OBJECT_NAME = ObjectNameFactory.create("jboss.security:service=JaasSecurityManager");
27
28    /**
29     * Get the name of the class that provides the security manager implementation.
30     */

31    String JavaDoc getSecurityManagerClassName();
32    
33    /**
34     * Set the name of the class that provides the security manager implementation.
35     *
36     * @exception ClassNotFoundException thrown if the className cannot be found
37     * using the thread context class loader.
38     * @exception ClassCastException thrown if the className does not implement the
39     * org.jboss.security.AuthenticationManager interface.
40     */

41    void setSecurityManagerClassName(String JavaDoc className)
42       throws ClassNotFoundException JavaDoc, ClassCastException JavaDoc;
43    
44    /**
45     * Get the name of the class that provides the SecurityProxyFactory implementation.
46     */

47    String JavaDoc getSecurityProxyFactoryClassName();
48    
49    /**
50     * Set the name of the class that provides the SecurityProxyFactory implementation.
51     */

52    void setSecurityProxyFactoryClassName(String JavaDoc className)
53       throws ClassNotFoundException JavaDoc;
54    
55    /** Get the default CallbackHandler implementation class name
56     *
57     * @return The fully qualified classname of the
58     */

59    public String JavaDoc getCallbackHandlerClassName();
60    /** Set the default CallbackHandler implementation class name
61     * @see javax.security.auth.callback.CallbackHandler
62     */

63    public void setCallbackHandlerClassName(String JavaDoc className)
64       throws ClassNotFoundException JavaDoc;
65
66    /**
67     * Get the jndi name under which the authentication CachePolicy implenentation
68     * is found
69     */

70    String JavaDoc getAuthenticationCacheJndiName();
71    
72    /**
73     * Set the location of the security credential cache policy. This is first treated
74     * as a ObjectFactory location that is capable of returning CachePolicy instances
75     * on a per security domain basis by appending a '/security-domain-name' string
76     * to this name when looking up the CachePolicy for a domain. If this fails then
77     * the location is treated as a single CachePolicy for all security domains.
78     *
79     * @param jndiName the name to the ObjectFactory or CachePolicy binding.
80     */

81    void setAuthenticationCacheJndiName(String JavaDoc jndiName);
82
83    /**
84     * Get the default timed cache policy timeout.
85     * @return the default cache timeout in seconds.
86     */

87    int getDefaultCacheTimeout();
88    
89    /**
90     * Set the default timed cache policy timeout. This has no affect if the
91     * AuthenticationCacheJndiName has been changed from the default value.
92     * @param timeoutInSecs the cache timeout in seconds.
93     */

94    void setDefaultCacheTimeout(int timeoutInSecs);
95    
96    /**
97     * Get the default timed cache policy resolution.
98     */

99    int getDefaultCacheResolution();
100    
101    /**
102     * Set the default timed cache policy resolution. This has no affect if the
103     * AuthenticationCacheJndiName has been changed from the default value.
104     *
105     * @param resInSecs resolution of timeouts in seconds.
106     */

107    void setDefaultCacheResolution(int resInSecs);
108
109    /** Set the indicated security domain cache timeout. This only has an
110     * effect if the security domain is using the default jboss TimedCachePolicy
111     * implementation.
112      
113     @param securityDomain the name of the security domain cache
114     @param timeoutInSecs - the cache timeout in seconds.
115     @param resInSecs - resolution of timeouts in seconds.
116     */

117    public void setCacheTimeout(String JavaDoc securityDomain, int timeoutInSecs, int resInSecs);
118
119    /** Flush the authentication cache associated with the given securityDomain.
120     *
121     * @param securityDomain the name of the security domain cache
122     */

123    void flushAuthenticationCache(String JavaDoc securityDomain);
124
125    /** Flush a principal's authentication cache entry associated with the
126     * given securityDomain.
127     *
128     * @param securityDomain the name of the security domain cache
129     * @param user the principal of the user to flush
130     */

131    void flushAuthenticationCache(String JavaDoc securityDomain, Principal JavaDoc user);
132
133    /** The the list of active Principls for the given security domain
134     * @param securityDomain
135     * @return List<Princpals> of active users, may be null.
136     */

137    List JavaDoc getAuthenticationCachePrincipals(String JavaDoc securityDomain);
138
139    /**
140     * Register a SecurityDomain implmentation
141     */

142    void registerSecurityDomain(String JavaDoc securityDomain, SecurityDomain instance);
143
144    /**
145     * Get the default unauthenticated principal.
146     * @return The principal name
147     */

148    String JavaDoc getDefaultUnauthenticatedPrincipal();
149
150    /**
151     * Set the default unauthenticated principal.
152     * @param principal The principal name
153     */

154    void setDefaultUnauthenticatedPrincipal(String JavaDoc principal);
155 }
156
Popular Tags