org.jboss.jms.server.security
Interface SecurityMetadataStoreMBean

All Known Implementing Classes:
SecurityMetadataStore

public interface SecurityMetadataStoreMBean

The SecurityMetadataStore mbean interface

Version:
$Revision: 4986 $
Author:
Scott.Stark@jboss.org

Method Summary
 javax.security.auth.Subject authenticate(java.lang.String user, java.lang.String password)
          Authenticate the specified user with the given password.
 boolean authorize(java.lang.String user, java.util.Set rolePrincipals, CheckType checkType)
          Authorize that the subject has at least one of the specified roles.
 void clearSecurityConfig(boolean isQueue, java.lang.String name)
           
 org.w3c.dom.Element getDefaultSecurityConfig()
           
 java.lang.String getSecurityDomain()
           
 SecurityMetadata getSecurityMetadata(boolean isQueue, java.lang.String destName)
           
 void setDefaultSecurityConfig(org.w3c.dom.Element conf)
           
 void setSecurityConfig(boolean isQueue, java.lang.String destName, org.w3c.dom.Element conf)
           
 void setSecurityDomain(java.lang.String securityDomain)
           
 void setSuckerPassword(java.lang.String password)
           
 void start()
           
 void stop()
           
 

Method Detail

getSecurityDomain

java.lang.String getSecurityDomain()

setSecurityDomain

void setSecurityDomain(java.lang.String securityDomain)

setDefaultSecurityConfig

void setDefaultSecurityConfig(org.w3c.dom.Element conf)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultSecurityConfig

org.w3c.dom.Element getDefaultSecurityConfig()

setSuckerPassword

void setSuckerPassword(java.lang.String password)

start

void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

getSecurityMetadata

SecurityMetadata getSecurityMetadata(boolean isQueue,
                                     java.lang.String destName)
Returns:
the security meta-data for the given destination.

setSecurityConfig

void setSecurityConfig(boolean isQueue,
                       java.lang.String destName,
                       org.w3c.dom.Element conf)
                       throws java.lang.Exception
Throws:
java.lang.Exception

clearSecurityConfig

void clearSecurityConfig(boolean isQueue,
                         java.lang.String name)
                         throws java.lang.Exception
Throws:
java.lang.Exception

authenticate

javax.security.auth.Subject authenticate(java.lang.String user,
                                         java.lang.String password)
                                         throws JMSSecurityException
Authenticate the specified user with the given password. Implementations are most likely to delegates to a JBoss AuthenticationManager. Successful authentication will place a new SubjectContext on thread local, which will be used in the authorization process. However, we need to make sure we clean up thread local immediately after we used the information, otherwise some other people security my be screwed up, on account of thread local security stack being corrupted.

Throws:
JMSSecurityException - if the user is not authenticated

authorize

boolean authorize(java.lang.String user,
                  java.util.Set rolePrincipals,
                  CheckType checkType)
Authorize that the subject has at least one of the specified roles. Implementations are most likely to delegates to a JBoss AuthenticationManager.

Parameters:
rolePrincipals - - The set of roles allowed to read/write/create the destination.
Returns:
true if the subject is authorized, or false if not.


Copyright © 2006 JBoss Inc. All Rights Reserved.