Skip to content

Commit

Permalink
Separate critical tests from not critical ones
Browse files Browse the repository at this point in the history
  • Loading branch information
federicaagostini committed Oct 19, 2022
1 parent 9c4ab0c commit e47f102
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/audience.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Resource common/http.robot

Variables test/variables.yaml

Force Tags critical


*** Test cases ***

Expand Down
2 changes: 1 addition & 1 deletion test/basic_authz.robot
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resource common/oidc-agent.robot

Variables test/variables.yaml

Force Tags basic-authz-checks
Force Tags basic-authz-checks critical

*** Test cases ***

Expand Down
9 changes: 8 additions & 1 deletion test/path_enforced_authz.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Force Tags path-enforced-authz-checks
*** Test cases ***

Path authorization enforced on storage.read
[Tags] critical
${token} Get token scope=-s storage.read:/wlcg-jwt-compliance
${endpoint} GET SE endpoint ${se_alias}
${uuid} Generate UUID
Expand All @@ -22,6 +23,7 @@ Path authorization enforced on storage.read
Should Contain ${out} 404

Path authorization enforced on storage.modify
[Tags] critical
${token} Get token scope=-s storage.modify:/wlcg-jwt-compliance
${endpoint} GET SE endpoint ${se_alias}
${uuid} Generate UUID
Expand All @@ -33,20 +35,23 @@ Path authorization enforced on storage.modify
Should Match Regexp ${out} 20[01]

storage.read:/foobar allows to read into the /foobar directory
[Tags] critical
[Setup] Create foobar directory and file
${token} Get token scope=-s storage.read:/wlcg-jwt-compliance/${SUITE_UUID}/foobar
${rc} ${out} Curl Auth Success ${URL}
Should Contain ${out} ${file.content}
[Teardown] Delete foobar directory and file

storage.read:/foo does not allow to read into the /foobar directory
[Tags] not-critical
[Setup] Create foobar directory and file
${token} Get token scope=-s storage.read:/wlcg-jwt-compliance/${SUITE_UUID}/foo
${rc} ${out} Curl Error ${URL}
Should Contain ${out} 403
[Teardown] Delete foobar directory and file

Create directory allowed with storage.create scope
[Tags] critical
${token} Get token
${uuid} Generate UUID
${basename} Set Variable create-dir-${uuid}
Expand All @@ -58,6 +63,7 @@ Create directory allowed with storage.create scope
Should Match Regexp ${out} 20[01]

Create directory not allowed with storage.create scope and partial path
[Tags] not-critical
${token} Get token
${uuid} Generate UUID
${basename} Set Variable create-dir-${uuid}
Expand All @@ -70,6 +76,7 @@ Create directory not allowed with storage.create scope and partial path
Should Contain ${out} 403

storage.read scope with path not compliant with RFC3986 is rejected
[Tags] critical
[Setup] Create foobar directory and file
${token} Get token scope=-s storage.read:/foobar
${rc} ${out} Curl Error ${URL}
Expand All @@ -80,7 +87,7 @@ storage.read scope with path not compliant with RFC3986 is rejected
[Teardown] Delete foobar directory and file

Trailing slash allows to read into a directory
[Tags] TBD
[Tags] TBD not-critical
[Setup] Create foobar directory and file
${token} Get token scope=-s storage.read:/wlcg-jwt-compliance/${SUITE_UUID}/foobar/
${rc} ${out} Curl Auth Success ${URL}
Expand Down

0 comments on commit e47f102

Please sign in to comment.