|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.test.universal.soa.SimpleTesting
public class SimpleTesting
This class is designed as the ancester class for universal soa testing and oblgiation testing based on plain text policies and credentials.
Subclass might reimplemented constructSubject and prepareTestCases functions to suite the testing requirement.
constructSubject is where we construct a permis subject based on the credentials held by the requesters. The default one use plain text to specify the credentials.
The prepareTestCases is the function where test cases are specified. Test cases care stored in 5 arrays, which are m_users, m_roles,m_issuers, m_actions, m_targets.
test funciton is actually the function that is responsible for implementing the test control flow, where it control the system to read from the input, write results into the output, and control every individual testing case.
Field Summary | |
---|---|
protected java.lang.String[] |
m_actions
array to hold action names |
protected java.lang.String[] |
m_issuers
array to hold the issuer ldap dn names of attributes |
protected java.lang.String[] |
m_roles
array to hold roles |
protected java.lang.String[] |
m_targets
array to hold target ldap dn names |
protected java.lang.String[] |
m_users
array to hold the user ldap dn names |
Constructor Summary | |
---|---|
SimpleTesting()
Creates a new instance of SimpleTesting |
Method Summary | |
---|---|
boolean |
constructAction(java.lang.String actionName)
|
boolean |
constructADF()
Contruct the Authorization Decision Function object. |
boolean |
constructSubject(java.lang.String userDN,
java.lang.String roleValue,
java.lang.String issuerLDAPDN)
Construct a permis subject object that represents the subject who is going to perform the action |
boolean |
constructTarget(java.lang.String targetDN)
|
Response |
consult()
|
boolean |
loadPolicy(java.lang.String pathNameofPolicy)
This function loads the specified policy from an plain xml file. |
void |
prepareTestCases(java.lang.String[] users,
java.lang.String[] roles,
java.lang.String[] issuers,
java.lang.String[] actions,
java.lang.String[] targets)
|
void |
test(java.lang.String policyfileName,
java.lang.String outputResult)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String[] m_users
protected java.lang.String[] m_roles
protected java.lang.String[] m_issuers
protected java.lang.String[] m_actions
protected java.lang.String[] m_targets
Constructor Detail |
---|
public SimpleTesting()
Method Detail |
---|
public boolean loadPolicy(java.lang.String pathNameofPolicy)
pathNameofPolicy
- - The Full file name of the policy file. The file name shall include
the path to allow java vm to locate the file.public boolean constructADF()
public boolean constructSubject(java.lang.String userDN, java.lang.String roleValue, java.lang.String issuerLDAPDN)
userDN
- user's DNroleValue
- the value of user's permisRole attributeissuerLDAPDN
- the DN of the issuer of the rolepublic boolean constructAction(java.lang.String actionName)
public boolean constructTarget(java.lang.String targetDN)
public Response consult() throws PbaException
PbaException
public void prepareTestCases(java.lang.String[] users, java.lang.String[] roles, java.lang.String[] issuers, java.lang.String[] actions, java.lang.String[] targets)
public void test(java.lang.String policyfileName, java.lang.String outputResult)
policyfileName
- the file name of the policy file. It must be suffice for the system to locate the file on the file system, either in relative path format or in full path format.outputResult
- the finle name of the output file. It must be suffice for the system to locate the file on the file system, either in relative path format or in full path format. All testing outputs are writting to this file. If the file exists before this testing, the content of the file will be wipped off.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |