Page MenuHomePhabricator

Allow #get_soap_data to work with private services
Closed, ResolvedPublicFeature

Description

Feature summary
I would like to be able to use the External Data extension to fetch records from a SOAP service that is authenticated. Currently it only works with public (open) services. So, I want to add Authentication to the #get_soap_data parser function of ExternalData.

Use case(s)
Our company maintains a SOAP service for accessing sensitive personnel data. Due to the sensitive nature of the data, any client access to the service must authenticate first. The native PHP SOAP module (php-soap) provides mechanisms for authentication, however those are not present in the External Data get_soap_data methods.

Benefits
Despite the maturity of the SOAP protocol, it's probably still fairly common in the enterprise environment where Java is used and where the security and standards approach of SOAP makes sense. Giving the extension the capability to work in these environments - enabling application integration - would be great for enterprise users and maybe foster greater MediaWiki penetration into the corporate IT market.

Technical summary
I believe all we need to do is add an $options parameter in the constructor includes/EDUtils.php#L1260

The constructor is referenced from includes/EDParserFunctions.php#L276

Of course we also need to handle everything in the $options parameter.

Reference
PHP SOAP module constructor
https://www.php.net/manual/en/soapclient.construct.php

Event Timeline

alex-mashin changed the task status from Open to In Progress.Mar 9 2023, 12:02 PM
alex-mashin claimed this task.

Change 896064 had a related patch set uploaded (by Alex Mashin; author: mashin):

[mediawiki/extensions/ExternalData@master] Pass 'options' to SOAP connections

https://gerrit.wikimedia.org/r/896064

Change 896064 merged by jenkins-bot:

[mediawiki/extensions/ExternalData@master] Pass 'options' to SOAP connections

https://gerrit.wikimedia.org/r/896064

Yaron_Koren subscribed.

I assume this can be closed now. Great new feature!

I'll try to add docs when I get to develop an implementation.

Could this be back-ported to the REL1_35 branch? There's been quite some refactoring between these branches, so I am not sure how easy this will be.

EDIT: Sorry for this comment, ExternalData-master is backwards-compatible with MW1.35