Skip to content
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
31c23a2
Move validate.php to symfony controller
ioigoume Nov 19, 2024
c497868
Fix quality errors
ioigoume Nov 19, 2024
cc0dbaf
Loggout Controller
ioigoume Nov 19, 2024
8a3aff9
LoggedOut Controller
ioigoume Nov 20, 2024
5b93932
Fix quality issues
tvdijen Nov 20, 2024
938d886
composer require checker for dev environments
ioigoume Nov 20, 2024
acc2e04
fix composer require checker version
ioigoume Nov 20, 2024
7287057
Add tests for LogoutController.php part1
ioigoume Nov 20, 2024
85bc476
psalm
ioigoume Nov 20, 2024
13db7a7
LogoutController.php tests part 2
ioigoume Nov 21, 2024
1c8b8a8
add CAS10 validate.php tests
ioigoume Nov 21, 2024
4e00a20
Add missing dependency
ioigoume Nov 21, 2024
44a3b0e
LoggedInController.php
ioigoume Nov 21, 2024
95af687
Cas10 validate improvements
ioigoume Nov 22, 2024
d9ab400
serviceValidate, proxyValidate, logoutController
ioigoume Nov 25, 2024
bd3649f
samlValidate.php controller and tests
ioigoume Nov 26, 2024
63269c8
fix psalm errors
ioigoume Nov 26, 2024
e1b3012
move proxy.php to Cas20Controller action
ioigoume Nov 27, 2024
3f3721a
Removed cas.php.Added LoginController.php
ioigoume Dec 1, 2024
ef816db
UrlTrait tests
ioigoume Dec 1, 2024
1072701
Add missing import
ioigoume Dec 1, 2024
38b43e5
LoginController Tests
ioigoume Dec 2, 2024
31cbf31
Tests for Cas20 validate
ioigoume Dec 3, 2024
31618c5
add tests for Proxy Service Validate
ioigoume Dec 4, 2024
f314472
More tests on Cas20Controller.php
ioigoume Dec 4, 2024
36c2e4e
Use TicketStore abstract class type
ioigoume Dec 15, 2024
640c7eb
Use Module::resolveClass
ioigoume Dec 15, 2024
801c4fd
Use RunnableResponse instead of redirect
ioigoume Dec 15, 2024
18e3e72
Added phpdocs
ioigoume Dec 15, 2024
dfea964
Fix run with docker instructions
pradtke Dec 5, 2024
9cc0b5c
xml response to UTF-8
ioigoume Dec 19, 2024
5ea16ac
Fix validation condition for CAS10
ioigoume Dec 19, 2024
a1780a8
review fixes #1
ioigoume Jan 2, 2025
c56cac3
Intantiate classes after we finalize the casconfig overrides. Refacto…
ioigoume Jan 2, 2025
8c9a764
fix UrlTrait::validate to handle proxy tickets
ioigoume Jan 2, 2025
7a8e7bb
fix UrlTrait::validate call test for the different methods.
ioigoume Jan 2, 2025
fb66648
user RunnableResponse
ioigoume Jan 2, 2025
7215414
preg_match better error handling
ioigoume Jan 2, 2025
4484886
Use DOMDocumentFactory instead of ext-xml to parse the SOAP message
ioigoume Jan 2, 2025
38f97d5
Refactor samlValidate, parsing postbody.
ioigoume Jan 3, 2025
de62070
Improve saml validate
ioigoume Jan 4, 2025
3d4d2ef
Improve samlValidate. Use saml11 1,2,4
ioigoume Jan 5, 2025
b659110
Move Cas20 validate function to TicketValidatorTrait
ioigoume Jan 9, 2025
d147818
Create an enum list of configuration options that are allowed to be o…
ioigoume Jan 9, 2025
1a7e2dc
Add missing enum file
ioigoume Jan 9, 2025
332a5f6
fix saml11 versioning in composer
ioigoume Jan 9, 2025
8fb020d
minor fixes
ioigoume Jan 9, 2025
416f2b1
Remove PDO as a hard dependency. It's optional when using SQLTicketStore
tvdijen Jan 9, 2025
b67bc3f
Add more hints for running with docker
pradtke Jan 22, 2025
05ea8a8
Allow `attributes` config item to be set per SP
pradtke Jan 22, 2025
ab8b39d
Add missing trait dependency
ioigoume Jan 22, 2025
ef5605b
Fix debug mode validation response rendering
ioigoume Jan 23, 2025
0bf5245
Exclude public directory from lint and documentation checks
ioigoume Jan 23, 2025
167dfe9
Remove js libraries
ioigoume Jan 23, 2025
0f31bf6
Add copy button and missing jquery dependency package
ioigoume Jan 24, 2025
68b51f6
Replace text with langauge key
ioigoume Jan 24, 2025
0961460
Remove unnecessary package
ioigoume Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,20 @@ To explore the module using docker run the below command. This will run an SSP i
of the `casserver` module mounted in the container, along with some configuration files. Any code changes you make to your git checkout are
"live" in the container, allowing you to test and iterate different things.

Sometimes when working with a dev version of the module you will need a newer version of a dependency than what SSP is
locked to. In that case you can add an additional dependency to the `COMPOSER_REQUIRE` line (e.g ="simplesamlphp/assert:1.8 ")

```bash
# Note: this currently errors on this module requiring a newer version of `simplesamlphp/xml-common` than what is in the base image
docker run --name ssp-casserver-dev \
--mount type=bind,source="$(pwd)",target=/var/simplesamlphp/staging-modules/casserver,readonly \
-e STAGINGCOMPOSERREPOS=casserver \
-e COMPOSER_REQUIRE="simplesamlphp/simplesamlphp-module-casserver:@dev simplesamlphp/simplesamlphp-module-preprodwarning"
-e COMPOSER_REQUIRE="simplesamlphp/simplesamlphp-module-casserver:@dev simplesamlphp/simplesamlphp-module-preprodwarning" \
-e SSP_ADMIN_PASSWORD=secret1 \
--mount type=bind,source="$(pwd)/docker/ssp/module_casserver.php",target=/var/simplesamlphp/config/module_casserver.php,readonly \
--mount type=bind,source="$(pwd)/docker/ssp/authsources.php",target=/var/simplesamlphp/config/authsources.php,readonly \
--mount type=bind,source="$(pwd)/docker/ssp/config-override.php",target=/var/simplesamlphp/config/config-override.php,readonly \
--mount type=bind,source="$(pwd)/docker/apache-override.cf",target=/etc/apache2/sites-enabled/ssp-override.cf,readonly \
-p 443:443 cirrusid/simplesamlphp:v2.3.2
-p 443:443 cirrusid/simplesamlphp:v2.3.5
```

Visit [https://localhost/simplesaml/](https://localhost/simplesaml/) and confirm you get the default page.
Expand Down
30 changes: 20 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,48 @@
},
"require": {
"php": "^8.1",
"ext-ctype": "*",
"ext-dom": "*",
"ext-filter": "*",
"ext-libxml": "*",
"ext-SimpleXML": "*",
"ext-session": "*",

"simplesamlphp/assert": "^1.1",
"simplesamlphp/composer-module-installer": "^1.3",
"simplesamlphp/simplesamlphp": "^2.2",
"simplesamlphp/xml-cas": "^v1.3",
"simplesamlphp/xml-common": "^v1.17",
"simplesamlphp/xml-soap": "^v1.5"
"simplesamlphp/simplesamlphp": "^2.3",
"simplesamlphp/xml-cas": "^1.3",
"simplesamlphp/xml-common": "^1.17",
"simplesamlphp/xml-soap": "^1.5",
"symfony/http-foundation": "^6.4",
"symfony/http-kernel": "^6.4",
"simplesamlphp/saml11": "~1.2.4"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "^1.7",
"phpunit/phpunit": "^10",
"psalm/plugin-phpunit": "^0.19.0",
"squizlabs/php_codesniffer": "^3.7"
"squizlabs/php_codesniffer": "^3.7",
"maglnet/composer-require-checker": "4.7.1",
"vimeo/psalm": "^5",
"icanhazstring/composer-unused": "^0.8.11"
},
"support": {
"issues": "https://github.com/simplesamlphp/simplesamlphp-module-casserver/issues",
"source": "https://github.com/simplesamlphp/simplesamlphp-module-casserver"
},
"suggest": {
"ext-pdo": "*"
},
"scripts": {
"validate": [
"vendor/bin/phpunit --no-coverage --testdox",
"vendor/bin/phpcs -p"
"vendor/bin/phpcs -p",
"vendor/bin/composer-require-checker check --config-file=tools/composer-require-checker.json composer.json",
"vendor/bin/psalm -c psalm-dev.xml",
"vendor/bin/composer-unused"
],
"tests": [
"vendor/bin/phpunit --no-coverage"
],
"propose-fix": [
"vendor/bin/phpcs --report=diff"
]
}
}
5 changes: 4 additions & 1 deletion config/module_casserver.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ $config = [
'https://host2.domain:5678/path2/path3',
// So is regex
'|^https://.*\.domain.com/|',
// Some configuration options can be overridden
// ONLY the FOLLOWING configuration options can be overridden. See OverrideConfigPropertiesEnum.
'https://override.example.com' => [
'attrname' => 'uid',
'attributes_to_transfer' => ['cn'],
//'attributes' => false,
//'authproc' => [],
//'service_ticket_expire_time' => 5,
],
],

Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
bootstrap="tests/bootstrap.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false"
displayDetailsOnTestsThatTriggerWarnings="true"
cacheDirectory=".phpunit.cache">
<coverage>
<report>
Expand Down
4 changes: 4 additions & 0 deletions psalm-dev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
name="SimpleSAMLphp testsuite"
useDocblockTypes="true"
errorLevel="4"
resolveFromConfigFile="true"
autoloader="vendor/autoload.php"
findUnusedCode="false"
findUnusedBaselineEntry="true"
reportMixedIssues="false"
hideExternalErrors="true"
allowStringToStandInForClass="true"
Expand Down
7 changes: 6 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
useDocblockTypes="true"
errorLevel="2"
reportMixedIssues="false"
resolveFromConfigFile="true"
autoloader="vendor/autoload.php"
findUnusedCode="false"
findUnusedBaselineEntry="true"
hideExternalErrors="true"
allowStringToStandInForClass="true"
>
<projectFiles>
<directory name="config" />
<directory name="public" />
<directory name="src" />
</projectFiles>

Expand Down
Empty file added public/.keep
Empty file.
51 changes: 0 additions & 51 deletions public/cas.php

This file was deleted.

32 changes: 0 additions & 32 deletions public/loggedIn.php

This file was deleted.

36 changes: 0 additions & 36 deletions public/loggedOut.php

This file was deleted.

Loading
Loading