org.globus.cas.impl.service
Class CasQueryPortImpl

java.lang.Object
  extended byorg.globus.cas.impl.service.CasQueryPortImpl

public class CasQueryPortImpl
extends java.lang.Object

Implementation of CAS Query interface


Field Summary
private  int defaultAssertionLifetime
           
private static I18n i18n
           
(package private) static Log logger
           
private static java.lang.String MAX_ASSERTION_LIFETIME
           
private  int serverAssertionLifetime
           
 
Constructor Summary
CasQueryPortImpl()
           
 
Method Summary
 void CasQueryPortImpl()
           
private  void checkQueryPermissions(java.lang.String userName, java.lang.String baseErrMsg)
           
private  org.globus.cas.types.SAMLAssertion constructSAMLAssertion(int lifetimeInSeconds, java.lang.String baseErrMsg, java.util.Vector samlAuthzDecisionVector)
           
 ArrayOfCasObjectData findApplicablePolicy(CasObjectDesc desc)
          Method to get all applicable policies
 org.globus.cas.types.SAMLAssertion getAssertion(GetAssertionParam getAssertionParam)
          Method that generated an assertion with a list of AuthzDecisionStmt that represent the list of actions that are permitted.
private  SAMLAuthorizationDecisionQuery getAuthzDecisionQuery(SAMLAuthzQueryType query)
           
private  java.util.Vector getAuthzDecisionStmts(SAMLAuthorizationDecisionQuery samlQuery, java.lang.String queryUserNick)
           
 CasObjectData getCasObject(CasObjectDesc desc)
          Method to get an object given its identifier
private  java.util.Vector getCertificates(GlobusGSSCredentialImpl credential)
           
private  java.lang.String getDNofServerCA(GlobusGSSCredentialImpl credential)
           
 ArrayOfString getGroupMembers(GetGroupMembers gpMembers)
          Method that returns the group members as an array of string
private  GlobusGSSCredentialImpl getServerCredential()
           
private  java.lang.String getUserNickname(java.lang.String userDN, java.lang.String issuerDN, java.lang.String authMethod)
           
 ArrayOfString list(java.lang.String type)
          Method to get a list of objects
 java.lang.String whoami(VoidType voidType)
          Method to get nickname of the user invoking the method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Log logger

i18n

private static I18n i18n

MAX_ASSERTION_LIFETIME

private static final java.lang.String MAX_ASSERTION_LIFETIME
See Also:
Constant Field Values

defaultAssertionLifetime

private int defaultAssertionLifetime

serverAssertionLifetime

private int serverAssertionLifetime
Constructor Detail

CasQueryPortImpl

public CasQueryPortImpl()
Method Detail

CasQueryPortImpl

public void CasQueryPortImpl()
                      throws java.lang.Exception
Throws:
java.lang.Exception

whoami

public java.lang.String whoami(VoidType voidType)
                        throws CasFault
Method to get nickname of the user invoking the method

Returns:
user name of the user invoking the method
Throws:
CasFault - if any other error occurs.

findApplicablePolicy

public ArrayOfCasObjectData findApplicablePolicy(CasObjectDesc desc)
                                          throws CasFault,
                                                 NoPermissionFault
Method to get all applicable policies

Returns:
an array of PolicyData
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

list

public ArrayOfString list(java.lang.String type)
                   throws CasFault,
                          NoPermissionFault
Method to get a list of objects

Parameters:
type - type of object "user" or "userGroup" or "object" or "objectGroup" or "serviceAction" or "serviceActionGroup" or "serviceType" or "namespace" or "trustAnchor" or "policy"
Returns:
list of objects of the particular type
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

getCasObject

public CasObjectData getCasObject(CasObjectDesc desc)
                           throws CasFault,
                                  NoPermissionFault
Method to get an object given its identifier

Returns:
returns the CasObject that represents the object of type "type" and name. Returns null if such an object does not exist
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

getGroupMembers

public ArrayOfString getGroupMembers(GetGroupMembers gpMembers)
                              throws CasFault,
                                     NoPermissionFault
Method that returns the group members as an array of string

Returns:
Group member identifiers as an array of strings
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

getAssertion

public org.globus.cas.types.SAMLAssertion getAssertion(GetAssertionParam getAssertionParam)
                                                throws CasFault,
                                                       NoPermissionFault
Method that generated an assertion with a list of AuthzDecisionStmt that represent the list of actions that are permitted.

Returns:
SAMLAsssertion A SAMLAssertion object with SAMLAuthorizationDecisionStatement(s) (OpenSAML datatype is passed as xsd:any)
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any error occurs.

constructSAMLAssertion

private org.globus.cas.types.SAMLAssertion constructSAMLAssertion(int lifetimeInSeconds,
                                                                  java.lang.String baseErrMsg,
                                                                  java.util.Vector samlAuthzDecisionVector)
                                                           throws CasFault
Throws:
CasFault

getAuthzDecisionQuery

private SAMLAuthorizationDecisionQuery getAuthzDecisionQuery(SAMLAuthzQueryType query)
                                                      throws CasFault
Throws:
CasFault

getAuthzDecisionStmts

private java.util.Vector getAuthzDecisionStmts(SAMLAuthorizationDecisionQuery samlQuery,
                                               java.lang.String queryUserNick)
                                        throws CasFault
Throws:
CasFault

getServerCredential

private GlobusGSSCredentialImpl getServerCredential()
                                             throws CasFault
Throws:
CasFault

getUserNickname

private java.lang.String getUserNickname(java.lang.String userDN,
                                         java.lang.String issuerDN,
                                         java.lang.String authMethod)
                                  throws CasFault
Throws:
CasFault

getCertificates

private java.util.Vector getCertificates(GlobusGSSCredentialImpl credential)

getDNofServerCA

private java.lang.String getDNofServerCA(GlobusGSSCredentialImpl credential)
                                  throws CasFault
Throws:
CasFault

checkQueryPermissions

private void checkQueryPermissions(java.lang.String userName,
                                   java.lang.String baseErrMsg)
                            throws NoPermissionFault,
                                   CasFault
Throws:
NoPermissionFault
CasFault