This file is indexed.

/usr/share/perl5/WebKDC/Config.pm is in libwebkdc-perl 4.5.5-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Configuration for the WebLogin script.
#
# Written by Russ Allbery <rra@stanford.edu>
# Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2012, 2013
#     The Board of Trustees of the Leland Stanford Junior University
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

package WebKDC::Config;

use strict;
use warnings;

our $VERSION;

# This version matches the version of WebAuth with which this module was
# released, but with two digits for the minor and patch versions.
BEGIN {
    $VERSION = '4.0505';
}

my $conf = $ENV{WEBKDC_CONFIG} || '/etc/webkdc/webkdc.conf';

our $KEYRING_PATH = "../conf/webkdc/keyring";
our $TEMPLATE_PATH = "/usr/local/share/weblogin/generic/templates";
our $TEMPLATE_COMPILE_PATH = "/usr/local/share/weblogin/generic/templates/ttc";
our $URL = "https://localhost/webkdc-service/";

our $BYPASS_CONFIRM;
our $DEFAULT_REALM;
our $FATAL_PAGE;
our $LOGIN_URL;
our @SHIBBOLETH_IDPS;
our $TOKEN_ACL;
our $WEBKDC_PRINCIPAL;

our @MEMCACHED_SERVERS;
our $RATE_LIMIT_THRESHOLD;
our $RATE_LIMIT_INTERVAL = 5 * 60;
our $REPLAY_TIMEOUT;

our $EXPIRING_PW_WARNING;
our $EXPIRING_PW_URL;
our $EXPIRING_PW_RESEND_PASSWORD = 1;

our $REMEMBER_FALLBACK = 'no';

our $MULTIFACTOR_COMMAND;
our $MULTIFACTOR_TGT;
our $MULTIFACTOR_SERVER;
our $MULTIFACTOR_PORT = 0;
our $MULTIFACTOR_PRINC = '';

our $REMUSER_ENABLED;
our $REMUSER_EXPIRES = 60 * 60 * 8;
our @REMUSER_REALMS;
our @REMUSER_PERMITTED_REALMS;
our @REMUSER_LOCAL_REALMS;
our $REMUSER_REDIRECT;

our $LOGIN_STATE_UNSERIALIZE;

our $FACTOR_WARNING  = 60 * 60 * 24 * 2;

# Obsolete variables supported for backward compatibility.
our $HONOR_REMOTE_USER;
our $REALM;
our @REALMS;
our $REMOTE_USER_REDIRECT;

if (-f $conf) {
    my $ret = do $conf;
    die "failed to parse $conf: $@" if $@;
    die "failed to read $conf: $!" if not defined $ret and $!;
}

# Merge obsolete variables into the ones we now use.
if ($HONOR_REMOTE_USER and not defined $REMUSER_ENABLED) {
    $REMUSER_ENABLED = 1;
}
if (defined ($REMOTE_USER_REDIRECT) and not defined ($REMUSER_REDIRECT)) {
    $REMUSER_REDIRECT = $REMOTE_USER_REDIRECT;
}
if (@REALMS and not @REMUSER_REALMS) {
    @REMUSER_REALMS = @REALMS;
}
if (defined ($REALM)) {
    push (@REMUSER_REALMS, $REALM);
}
if (@REMUSER_REALMS and not @REMUSER_PERMITTED_REALMS) {
    @REMUSER_PERMITTED_REALMS = @REMUSER_REALMS;
}
if (@REMUSER_REALMS and not @REMUSER_LOCAL_REALMS) {
    @REMUSER_LOCAL_REALMS = @REMUSER_REALMS;
}

1;

__END__

=for stopwords
WebAuth WebLogin Allbery

=head1 NAME

WebKDC::Config - Configuration for the WebAuth WebLogin service

=head1 SYNOPSIS

    use WebKDC::Config;
    my $keyring = $WebKDC::Config::KEYRING_PATH;

=head1 DESCRIPTION

WebKDC::Config encapsulates all the site-specific configuration for the
WebLogin component of the WebAuth web authentication system.  It is
implemented as a Perl class that declares and sets the defaults for
various configuration variables and then, if it exists, loads the file
specified by the WEBKDC_CONFIG environment variable or
F</etc/webkdc/webkdc.conf> if that environment variable isn't set.  That
file should contain any site-specific overrides to the defaults.

This file must be valid Perl.  To set a variable, use the syntax:

    $VARIABLE = <value>;

where VARIABLE is the variable name (always in all-capital letters) and
<value> is the value.  If setting a variable to a string and not a number,
you should normally enclose <value> in C<''>.  For example, to set the
variable KEYRING_PATH to C</var/lib/webkdc/keyring>, use:

    $KEYRING_PATH = '/var/lib/webkdc/keyring';

There are some settings that take arrays instead of strings or numbers;
for those, see the description of the setting for its syntax.

It is also possible to customize WebLogin by defining some Perl functions
in the configuration file.

All the configuration settings are documented in F<docs/weblogin-config>
in the WebAuth source tree.  This is also available on-line at
L<http://webauth.stanford.edu/weblogin-config.html>.

=head1 AUTHORS

Roland Schemers and Russ Allbery <rra@stanford.edu>.

=head1 SEE ALSO

WebKDC(3), WebLogin(3)

This module is part of WebAuth.  The current version is available from
L<http://webauth.stanford.edu/>.

=cut