Skip to content

Commit

Permalink
suggested edits from PR#2292
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Feb 14, 2024
1 parent 9f47d43 commit d9bf525
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
11 changes: 1 addition & 10 deletions conf/authen_CAS.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,7 @@ $authen{user_module} = {
# This should be a non-empty sublist of whatever is in $authen{user_module}.
# Since the admin course provides overall power to add/delete courses, access
# to this course should be protected by the best possible authentication you
# have available to you. The current default is
# WeBWorK::Authen::Basic_TheLastOption which is simple password based
# authentication for a password locally stored in your WeBWorK server's
# database. On one hand, this is necessary as the initial setting, as it is the
# only option available when a new server is being installed. However, since
# this option does not make use of multi-factor authentication or provide any
# capabilities to prevent dictionary attacks, etc. At the very least you should
# use a very strong password. If you have the option to use a more secure
# authentication approach to the admin course (one which you are confident
# cannot be spoofed) that is preferable.
# have available to you.
$authen{admin_module} = [
'WeBWorK::Authen::CAS'
];
Expand Down
11 changes: 1 addition & 10 deletions conf/authen_ldap.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,7 @@ $authen{user_module} = {
# This should be a non-empty sublist of whatever is in $authen{user_module}.
# Since the admin course provides overall power to add/delete courses, access
# to this course should be protected by the best possible authentication you
# have available to you. The current default is
# WeBWorK::Authen::Basic_TheLastOption which is simple password based
# authentication for a password locally stored in your WeBWorK server's
# database. On one hand, this is necessary as the initial setting, as it is the
# only option available when a new server is being installed. However, since
# this option does not make use of multi-factor authentication or provide any
# capabilities to prevent dictionary attacks, etc. At the very least you should
# use a very strong password. If you have the option to use a more secure
# authentication approach to the admin course (one which you are confident
# cannot be spoofed) that is preferable.
# have available to you.
$authen{admin_module} = [
'WeBWorK::Authen::LDAP'
];
Expand Down
7 changes: 6 additions & 1 deletion lib/WeBWorK/Authen.pm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ sub verify {

my $authen_ref = ref($c->authen);
if ($c->ce->{courseName} eq 'admin' && !(grep(/^$authen_ref$/, @{ $c->ce->{authen}{admin_module} }))) {
$c->stash(authen_error => maketext("Cannot authenticate into admin course using $authen_ref."));
$self->write_log_entry("Cannot authenticate into admin course using $authen_ref.");
$c->stash(
authen_error => $c->maketext(
'There was an error during the login process. Please speak to your instructor or system administrator.'
)
);
return ($self->call_next_authen_method());
}

Expand Down

0 comments on commit d9bf525

Please sign in to comment.