Skip to content

Commit 240f30e

Browse files
committed
Remove the WeBWorK SOAP service.
I don't think that anyone uses this anymore, and no one should use it. It is not secure, and there are better ways to interact with webwork, such as LTI authentication.
1 parent 65e11c7 commit 240f30e

16 files changed

Lines changed: 8 additions & 1717 deletions

Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ RUN apt-get update \
140140
libpath-tiny-perl \
141141
libperl-critic-perl \
142142
libphp-serialization-perl \
143-
libpod-wsdl-perl \
144-
libsoap-lite-perl \
145143
libsql-abstract-perl \
146144
libssl-dev \
147145
libstring-shellquote-perl \
@@ -233,18 +231,18 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg
233231
RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
234232
&& mkdir /run/webwork2 /etc/ssl/local \
235233
&& cd $APP_ROOT/webwork2/ \
236-
&& chown www-data DATA ../courses logs tmp /etc/ssl/local /run/webwork2 \
237-
&& chmod -R u+w DATA ../courses logs tmp /run/webwork2 /etc/ssl/local \
234+
&& chown www-data DATA ../courses logs tmp /etc/ssl/local /run/webwork2 \
235+
&& chmod -R u+w DATA ../courses logs tmp /run/webwork2 /etc/ssl/local \
238236
&& echo "en_US ISO-8859-1\nen_US.UTF-8 UTF-8" > /etc/locale.gen \
239-
&& /usr/sbin/locale-gen \
240-
&& echo "locales locales/default_environment_locale select en_US.UTF-8\ndebconf debconf/frontend select Noninteractive" > /tmp/preseed.txt \
241-
&& debconf-set-selections /tmp/preseed.txt \
237+
&& /usr/sbin/locale-gen \
238+
&& echo "locales locales/default_environment_locale select en_US.UTF-8\ndebconf debconf/frontend select Noninteractive" > /tmp/preseed.txt \
239+
&& debconf-set-selections /tmp/preseed.txt \
242240
&& rm -f /etc/localtime /etc/timezone && echo "Etc/UTC" > /etc/timezone \
243-
&& dpkg-reconfigure -f noninteractive tzdata \
241+
&& dpkg-reconfigure -f noninteractive tzdata \
244242
&& cd $WEBWORK_ROOT/htdocs \
245-
&& npm install \
243+
&& npm install \
246244
&& cd $PG_ROOT/htdocs \
247-
&& npm install
245+
&& npm install
248246

249247
# ==================================================================
250248
# Phase 7 - Final setup and prepare docker-entrypoint.sh

DockerfileStage1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ RUN apt-get update \
101101
libpath-tiny-perl \
102102
libperl-critic-perl \
103103
libphp-serialization-perl \
104-
libpod-wsdl-perl \
105-
libsoap-lite-perl \
106104
libsql-abstract-perl \
107105
libssl-dev \
108106
libstring-shellquote-perl \

bin/check_modules.pl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,6 @@ =head1 DESCRIPTION
427427
rhel => 'perl-Pod-Usage'
428428
}
429429
},
430-
'Pod::WSDL' => {
431-
package => {
432-
ubuntu => 'libpod-wsdl-perl'
433-
}
434-
},
435-
'SOAP::Lite' => {
436-
package => {
437-
ubuntu => 'libsoap-lite-perl',
438-
rhel => 'perl-SOAP-Lite'
439-
}
440-
},
441430
'SQL::Abstract' => {
442431
minversion => '2',
443432
package => {

conf/webwork2.mojolicious.dist.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ JSON_ERROR_LOG: 0
3838
# does not forward the server root location.
3939
#server_root_url_redirect: https://mysite.edu/mypage.html
4040

41-
# Uncomment the line below to use the WebworkSOAP handlers. Make sure that you
42-
# change the value to something more secure. Note that it must consist entirely
43-
# of digits.
44-
#soap_authen_key: 123456789123456789
45-
4641
# If a remote site is using this WW server to process WW problems and embed them
4742
# into web pages, the web browser might not permit the WW problems to be
4843
# displayed, as it violates security policy to mix content from different

lib/Mojolicious/WeBWorK.pm

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -228,23 +228,6 @@ sub startup ($app) {
228228
}
229229
);
230230

231-
if ($config->{soap_authen_key}) {
232-
# Only allow an authen key that consists entirely of digits. The WebworkSOAP module uses a numeric != for
233-
# comparison, and in perl all strings containing alphabetic characters are numerically equal. So if this is not
234-
# numeric all keys that are passed in will succeed in authentication. Very dangerous!
235-
if ($config->{soap_authen_key} =~ /^\d*$/) {
236-
$app->log->info('SOAP endpoints enabled');
237-
$WeBWorK::SeedCE{soap_authen_key} = $config->{soap_authen_key};
238-
239-
push(@{ $r->namespaces }, 'WebworkSOAP');
240-
$r->any('/webwork2_wsdl')->to('SOAP#wsdl');
241-
$r->post('/webwork2_rpc')->to('SOAP#dispatch');
242-
} else {
243-
$app->log->info(qq{Invalid soap_authen_key "$config->{soap_authen_key}". }
244-
. 'It must consist entirely of digits. SOAP endpoints NOT enabled.');
245-
}
246-
}
247-
248231
# Letsencrypt renewal route.
249232
if ($config->{enable_certbot_webroot_routes}) {
250233
$r->any(

0 commit comments

Comments
 (0)