Skip to content

[FIX] Auth/SOAP: Make SOAP authentication work again#11635

Open
mjansenDatabay wants to merge 1 commit into
ILIAS-eLearning:release_10from
mjansenDatabay:hotfix/10/auth-soap
Open

[FIX] Auth/SOAP: Make SOAP authentication work again#11635
mjansenDatabay wants to merge 1 commit into
ILIAS-eLearning:release_10from
mjansenDatabay:hotfix/10/auth-soap

Conversation

@mjansenDatabay
Copy link
Copy Markdown
Contributor

@mjansenDatabay mjansenDatabay commented Jun 2, 2026

Triggered by the issue described in https://mantis.ilias.de/view.php?id=47821 , I had a closer look at the "SOAP Authentication" in ILIAS >= 10.x, which seemed broken because of fragile PHP code in the nusoap_client library.

  • Refactored the SOAPAuth component structure to align with ILIAS 10 conventions: public demo endpoints are now exposed via public/auth/soap/example/..., classes are in src/, and namespaced under ILIAS\AuthSOAP.
  • Introduced dedicated SOAP client classes (SessionValidationClient, SessionValidationResult, SoapAuthEndpoint) to encapsulate endpoint building, SOAP request execution, and typed result handling.
  • Migrated SOAP-auth client calls from nusoap_client to native PHP SoapClient while preserving wire compatibility (RPC/encoded mode, .NET-specific parameter names/soapaction handling).
  • Reworked dummy SOAP server behavior: native SoapServer handles POST SOAP calls; nusoap remains for WSDL/non-POST handling to keep compatibility.
  • Fixed SOAP .NET configuration usage to consistently read soap_auth_use_dotnet (instead of mixed/incorrect key usage).
  • Improved SOAP debug output presentation for Request/Response XML

If approved, this has to be picked/ported to release_11 and trunk.

@mjansenDatabay mjansenDatabay requested a review from thojou June 2, 2026 08:59
@mjansenDatabay mjansenDatabay added bugfix php Pull requests that update Php code labels Jun 2, 2026
Copy link
Copy Markdown
Contributor

@thojou thojou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mjansenDatabay,

Thanks for the PR! Aside from the minor docblock type suggestions, I noticed a naming inconsistency: the component directory is components/ILIAS/SOAPAuth, but its namespace is declared as ILIAS\AuthSOAP.

Could we align these to follow a consistent convention? Let me know what you think.

Kind Regrads,
@thojou

];
}

private function buildValidationResult(string $ext_uid, string $soap_pw, bool $new_user): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I woule prefere a PHPStan return type annotation using an array shape like array{firstname: string, lastname: string, email: string, valid: bool} to this method for improved static analysis and explicit contract definition

Comment on lines +76 to +80
/**
* @param array<int|string, mixed> $arguments
* @return array<string, mixed>
*/
private function normalizeParameterKeys(array $arguments): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a more strict array type definition instead of "mixed"?

Comment on lines +52 to +56
/**
* @param mixed[] $arguments
* @return array<string, mixed>
*/
private function invokeIsValidSession(array $arguments): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a more strict array type definition instead of "mixed"?

Comment on lines +30 to +34
/**
* @param mixed[] $arguments
* @return array<string, mixed>
*/
public function __soapCall(string $function_name, array $arguments): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a more strict array type definition instead of "mixed"?


class SoapDummyAuthHandler
{
public function isValidSession(string $ext_uid, string $soap_pw, bool $new_user): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a more strict array type definition instead of "mixed"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants