Skip to content

Commit

Permalink
Support also legacy response
Browse files Browse the repository at this point in the history
  • Loading branch information
federicaagostini committed Apr 4, 2024
1 parent fb0cb4b commit 769f602
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/iam-dev.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
continue-on-error: true

env:
ROBOT_OPTIONS: --variable vo1:test.vo --variable vo1_host:voms-dev.cloud.cnaf.infn.it --variable vo1_issuer:'/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-dev.cloud.cnaf.infn.it' --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:/C=IT/O=IGI/CN=*.test.example --exclude issue-723 --exclude issue-724 --exclude issue-726
ROBOT_OPTIONS: --variable vo1:test.vo --variable vo1_host:voms-dev.cloud.cnaf.infn.it --variable vo1_issuer:'/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-dev.cloud.cnaf.infn.it' --variable vo1_legacy_voms:False --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:/C=IT/O=IGI/CN=*.test.example --exclude issue-723 --exclude issue-724 --exclude issue-726

steps:
- name: Checkout
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Use the `italiangrid/voms-testsuite` docker image to run the testsuite.
| `vo2_issuer` | VOMS subject DN for the second VO | DC=org/DC=terena/DC=tcs/C=IT/L=Frascati/O=Istituto Nazionale di Fisica Nucleare/OU=CNAF/CN=vgrid02.cnaf.infn.it |
| `vo1_legacy_fqan_enabled` | Encode FQANs released by first VO as per legacy VOMS | True |
| `vo2_legacy_fqan_enabled` | Encode FQANs released by second VO as per legacy VOMS | True |
| `vo1_legacy_voms` | First VO is served by a legacy VOMS server | True |
| `vo2_legacy_voms` | Second VO is served by a legacy VOMS server | True |

For other parameters, see the [variables file](./lib/variables.robot).

Expand Down Expand Up @@ -93,7 +95,7 @@ $ docker compose --file docker-compose.ci.yml up --detach testsuite
Run the testsuite. Some variables will be overridden using the `ROBOT_OPTIONS` environment variable

```
$ export ROBOT_OPTIONS="--variable vo1:test.vo --variable vo1_host:voms-dev.cloud.cnaf.infn.it --variable vo1_issuer:'/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-dev.cloud.cnaf.infn.it' --variable vo1_legacy_fqan_enabled:False --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:/C=IT/O=IGI/CN=*.test.example"
$ export ROBOT_OPTIONS="--variable vo1:test.vo --variable vo1_host:voms-dev.cloud.cnaf.infn.it --variable vo1_issuer:'/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-dev.cloud.cnaf.infn.it' --variable vo1_legacy_fqan_enabled:False --variable vo1_legacy_voms:False --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:/C=IT/O=IGI/CN=*.test.example"
$ docker compose --file docker-compose.ci.yml exec -T -e ROBOT_OPTIONS="${ROBOT_OPTIONS}" testsuite bash /scripts/ci-run-testsuite.sh
```

Expand Down
12 changes: 10 additions & 2 deletions compose/assets/db/dump-voms_vo_0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,11 @@ CREATE TABLE `certificate` (

LOCK TABLES `certificate` WRITE;
/*!40000 ALTER TABLE `certificate` DISABLE KEYS */;
INSERT INTO `certificate` VALUES (1,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test0','\0',NULL,NULL,1,1),(2,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test1','\0',NULL,NULL,1,2),(3,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=(Parenthesis)','\0',NULL,NULL,1,3);
INSERT INTO `certificate` VALUES
(1,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test0','\0',NULL,NULL,1,1),
(2,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test1','\0',NULL,NULL,1,2),
(3,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=(Parenthesis)','\0',NULL,NULL,1,3),
(4,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test2','\1',NULL,NULL,1,4);
/*!40000 ALTER TABLE `certificate` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -1086,7 +1090,11 @@ CREATE TABLE `usr` (

LOCK TABLES `usr` WRITE;
/*!40000 ALTER TABLE `usr` DISABLE KEYS */;
INSERT INTO `usr` VALUES (1,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test0','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),(2,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test1','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),(3,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=(Parenthesis)','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL);
INSERT INTO `usr` VALUES
(1,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test0','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),
(2,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test1','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),
(3,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=(Parenthesis)','(Parenthesis)@cnaf.infn.it','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),
(4,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test2','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\1',NULL,NULL,NULL);
/*!40000 ALTER TABLE `usr` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down
12 changes: 10 additions & 2 deletions compose/assets/db/dump-voms_vo_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,11 @@ CREATE TABLE `certificate` (

LOCK TABLES `certificate` WRITE;
/*!40000 ALTER TABLE `certificate` DISABLE KEYS */;
INSERT INTO `certificate` VALUES (1,'2022-12-29 15:55:43','/C=IT/O=IGI/CN=test0','\0',NULL,NULL,1,1),(2,'2022-12-29 15:55:44','/C=IT/O=IGI/CN=test1','\0',NULL,NULL,1,2),(3,'2022-12-29 15:55:44','/C=IT/O=IGI/CN=(Parenthesis)','\0',NULL,NULL,1,3);
INSERT INTO `certificate` VALUES
(1,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test0','\0',NULL,NULL,1,1),
(2,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test1','\0',NULL,NULL,1,2),
(3,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=(Parenthesis)','\0',NULL,NULL,1,3),
(4,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test2','\1',NULL,NULL,1,4);
/*!40000 ALTER TABLE `certificate` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -1086,7 +1090,11 @@ CREATE TABLE `usr` (

LOCK TABLES `usr` WRITE;
/*!40000 ALTER TABLE `usr` DISABLE KEYS */;
INSERT INTO `usr` VALUES (1,NULL,'2022-12-29 15:55:43','/C=IT/O=IGI/CN=test0','[email protected]','2023-12-29 15:55:43',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),(2,NULL,'2022-12-29 15:55:44','/C=IT/O=IGI/CN=test1','[email protected]','2023-12-29 15:55:44',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),(3,NULL,'2022-12-29 15:55:44','/C=IT/O=IGI/CN=(Parenthesis)','[email protected]','2023-12-29 15:55:44',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL);
INSERT INTO `usr` VALUES
(1,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test0','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),
(2,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test1','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),
(3,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=(Parenthesis)','(Parenthesis)@cnaf.infn.it','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\0',NULL,NULL,NULL),
(4,NULL,'2022-12-29 15:55:35','/C=IT/O=IGI/CN=test2','[email protected]','2023-12-29 15:55:35',NULL,NULL,NULL,NULL,NULL,'\1',NULL,NULL,NULL);
/*!40000 ALTER TABLE `usr` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down
2 changes: 2 additions & 0 deletions lib/variables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ${vo2_issuer} /DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fis
${vo1_legacy_fqan_enabled} True
${vo2_legacy_fqan_enabled} True
${vo1CorePort} 15001
${vo1_legacy_voms} True
${vo2_legacy_voms} True

${myproxy_server} omii001.cnaf.infn.it
${myProxyPassPhrase} 123456
Expand Down
4 changes: 2 additions & 2 deletions tests/clients/init/errors.robot
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ See if voms-proxy-init -pwstdin fails correctly when no password is provided
[Teardown] Stop using certificate

See if suspended users can get a proxy
[Tags] legacy dbg
[Tags] legacy
[Setup] Use certificate test2
${output} Create proxy failure -voms ${vo1}
${expected} Set Variable User 'CN=test2,O=IGI,C=IT, CN=Test CA,O=IGI,C=IT' is not active.
${expected} Set Variable If ${vo1_legacy_voms} User is currently suspended! User 'CN=test2,O=IGI,C=IT, CN=Test CA,O=IGI,C=IT' is not active.
Should Contain ${output} ${expected}
[Teardown] Stop using certificate

0 comments on commit 769f602

Please sign in to comment.