Manual tests for Security
Guidelines for documenting the manual tests:
- Summarize the elements covered in the test
- Enumerate the steps (ordered list)
- Call out test points with a TEST bullet
- Include screenshots as appropriate; many of the manual tests will be visual, so screenshots are helpful
User Service Application
Tests confirm:
- Basic functionality of the User Service Application
- Works with arbitrary context root
- Works with all supported browsers specifically IE, Firefox and Safari
Steps:
- Create a Zero application
- Edit config/ivy.xml within the application and add zero.core.webtools for the appropriate release as a dependency
- Save ivy.xml
- If you are using the CLI you will need to run
zero resolve
- Start the application
- Browse to http://localhost:8080/zero/webtools/user/
- TEST: Confirm page shows Zero styling
- TEST: Confirm able to add a new user
- TEST: Confirm able to update a user's groups (ie add a new group to existing user)
- TEST: Confirm able to update a user's password
- TEST: Confirm able to delete a user and confirm no users exist after delete
- Set a context root by adding the following to the application's
config/zero.config file:
/config/contextRoot="/foo/bar"
- Restart the application
- TEST: Confirm 400 status code error is returned when browsing to http://localhost:8080/zero/webtools/user/
- Browse to http://localhost:8080/foo/bar/zero/webtools/user/
- Revisit test bullets with changed context root.
- Revisit test bullets with another browser (try safari, firefox and ie)
File Based User Service Command (Command Line Interface)
Steps:
- Create a Zero application using CLI and run
zero resolve
- * TEST: Creation of user
todkapMAC:myApp todd$ zero user
CWPZC2114I: Entering interactive mode.
CWPZC2126I: Location of user file [default ./config/zero.users]:
CWPZC2120I: Type 'create' to create user, 'update' to update user or 'exit' when done.
create
CWPZC2121I: Creating new user.
CWPZC2127I: Enter username:
user1
CWPZC2128I: Enter password:
mypwd
CWPZC2129I: Enter group (or enter when done):
GROUP1
CWPZC2129I: Enter group (or enter when done):
CWPZC2115I: User 'user1' was successfully added to the user file.
- TEST: Confirm user is created in zero.users file for application
user1:318bcb4be908d0da6448a0db76908d78:GROUP1
- TEST: Update user password
todkapMAC:myApp todd$ zero user
CWPZC2114I: Entering interactive mode.
CWPZC2126I: Location of user file [default ./config/zero.users]:
CWPZC2120I: Type 'create' to create user, 'update' to update user or 'exit' when done.
update
CWPZC2122I: Updating user.
CWPZC2127I: Enter username:
user1
CWPZC2128I: Enter password:
newpwd
CWPZC2117I: The password of the user 'user1' was successfully updated.
CWPZC2120I: Type 'create' to create user, 'update' to update user or 'exit' when done.
exit
- TEST: Confirm user is updated in zero.users file and application password changed
user1:a5e3094ce553e08de5ba237525b106d5:GROUP1
XOREncoder Command (Command Line Interface)
Steps:
- Create a Zero application using CLI
- * TEST: Encoding of password named 'mySpecialPassword' and validate it matches below
todkapMAC:myApp todd$ zero encode
Jan 29, 2008 1:36:35 PM zero.core.security.util.EncoderCommand enterInteractiveMode
INFO: CWPZC2026I: Entering interactive mode.
Jan 29, 2008 1:36:36 PM zero.core.security.util.EncoderCommand enterInteractiveMode
INFO: CWPZC2027I: Please type encode or exit to quit.
encode
Jan 29, 2008 1:36:42 PM zero.core.security.util.EncoderCommand enterInteractiveMode
INFO: CWPZC2028I: Enter string to encode
mySpecialPassword
Jan 29, 2008 1:36:50 PM zero.core.security.util.EncoderCommand enterInteractiveMode
INFO: CWPZC2030I: Result
<xor>MiYMLzo8Nj4zDz4sLCgwLTs=
Jan 29, 2008 1:36:50 PM zero.core.security.util.EncoderCommand enterInteractiveMode
INFO: CWPZC2027I: Please type encode or exit to quit.
OpenID support
_Starting with M1 of silverstone, most of the testing for OpenID has been automated. The only area that is not tested in an automated fashion is validating against an actual OpenID Provider.
Steps:
- Create an OpenID account (for instance: myopenid.com).
- Install the application openid.demo by using the command line 'zero create openid.demo from zero:openid.demo'.
- Start application
- Type the following in the browser: http://<HOSTNAME>:8081/index.gt (note I used localhost and hostname interchangeably)
- * TEST: Verify the page is redirected to http://<HOSTNAME>:8081/openidlogin.gt
- * TEST: Type in your openID account in the first form field: for instance my id is http://todkap.myopenid.com and hit submit.
- * TEST: Verify the page is redirected to the openID provider login page
- login with the userid you created in step 1
- Select allow once or allow forever ( this may not be presented and there may be other options depending upon provider)
- * TEST: Verify the page is redirected back to http://<HOSTNAME>:8081/index.gt
- * TEST: Verify remoteUser contains your openID user for instance: http://todkap.myopenid.com
- * TEST: Verify groups is Groups: ["VALID_OPENID_USER"]
- * TEST: Verify roles is Roles: ["OPENID_ROLE"]
- * TEST: Add a comment. This is a protected XHR call that should suceed and comment should be appended at bottom of page.
- restart the tests by clicking on the logout link on the top right hand page
- * TEST: Access restricted page. Try to add a comment now and error should be appended at bottom of page.
Failure scenarios
Steps:
- Type the following in the browser: http://<HOSTNAME>:8081/index.gt
- * TEST: Verify the page is redirected to http://<HOSTNAME>:8081/openidlogin2.gt
- * TEST: Type in your openID account in the first form field: for instance my id is http://todkap.myopenid.com and hit submit.
- * TEST: Verify the page is redirected to the openID provider login page
- * TEST: Hit cancel or deny accepting (may or may not exist depending upon provider) validate error page is shown