]> eyrie.org Git - kerberos/webauth.git/log
kerberos/webauth.git
9 years agoImported Upstream version 4.6.1 upstream/4.6.1
Russ Allbery [Wed, 23 Jul 2014 22:17:42 +0000 (15:17 -0700)]
Imported Upstream version 4.6.1

9 years agoBump shared library versioning release/4.6.1
Russ Allbery [Wed, 23 Jul 2014 21:13:30 +0000 (14:13 -0700)]
Bump shared library versioning

The change in the webauth_webkdc_config struct means that some
interfaces are no longer compatible with previous releases.  Be
conservative and bump all of the library versioning.  (Normally
I wouldn't do an ABI bump in a minor release, but in this case
the effect of the changes is very minor, just still an ABI break.)

Change-Id: Ibbb515d7d9393f63751f11d05e5a135c1e3aa5dd
Reviewed-on: https://gerrit.stanford.edu/1579
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoRelease 4.6.1
Russ Allbery [Wed, 23 Jul 2014 20:00:22 +0000 (13:00 -0700)]
Release 4.6.1

Change-Id: I7dedbc66dd287269c6b48f6e665846eaaed2bad1
Reviewed-on: https://gerrit.stanford.edu/1578
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoUpdate to rra-c-util 5.5 and C TAP Harness 3.1
Russ Allbery [Wed, 23 Jul 2014 03:21:56 +0000 (20:21 -0700)]
Update to rra-c-util 5.5 and C TAP Harness 3.1

Update to rra-c-util 5.5:

* Use Lancaster Consensus environment variables to control tests.
* Use calloc or reallocarray for protection against integer overflows.
* Suppress warnings from Kerberos headers in non-system paths.
* Update warning flags when building with make warnings.
* Only pass warning suppression flags to Perl under make warnings.

Update to C TAP Harness 3.1:

* Check for integer overflow on memory allocations.
* Avoid all remaining uses of sprintf.

Change-Id: I9fcc94b072d06b7811e8d61d56b3b913ffc95056
Reviewed-on: https://gerrit.stanford.edu/1577
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoTranslate EINVAL to WA_PEC_LOGIN_FAILED
Russ Allbery [Tue, 15 Jul 2014 21:36:54 +0000 (14:36 -0700)]
Translate EINVAL to WA_PEC_LOGIN_FAILED

Translate an EINVAL error from the Kerberos libraries during password
authentication to an incorrect password error code.  Older versions of
MIT Kerberos returned EINVAL for excessively long passwords.

Change-Id: I832b23e782729e3481248ea6299ae92c7a383f00
Reviewed-on: https://gerrit.stanford.edu/1546
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoDiagnose empty RT or ST parameters to WebLogin
Russ Allbery [Tue, 15 Jul 2014 21:03:38 +0000 (14:03 -0700)]
Diagnose empty RT or ST parameters to WebLogin

Diagnose empty RT or ST parameters to WebLogin and return the same
error as when those parameters are missing entirely.

Change-Id: I73d361f734ed56c922d66bc139a5ffa974fd9ad3
Reviewed-on: https://gerrit.stanford.edu/1545
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoTranslate KRB5_KDC_UNREACH to WA_PEC_USER_REJECTED
Russ Allbery [Tue, 15 Jul 2014 20:32:33 +0000 (13:32 -0700)]
Translate KRB5_KDC_UNREACH to WA_PEC_USER_REJECTED

When translating Kerberos errors, treat KRB5_KDC_UNREACH (cannot
contact any KDC for realm) as a user rejected error instead of a
Kerberos error.  This avoids returning an internal error from WebLogin
and instead tells the user the username is invalid.  This is not
always correct, since the unreachable KDC could be the local KDC, but
it's better than the previous behavior of throwing internal errors
when users enter email addresses as their username.

Change-Id: Ie9d60370d6dc0e6878f046301e467d1965a7412b
Reviewed-on: https://gerrit.stanford.edu/1544
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAllow newlines, CR, and LF in XML from WebKDC to WebLogin
Russ Allbery [Tue, 15 Jul 2014 20:22:06 +0000 (13:22 -0700)]
Allow newlines, CR, and LF in XML from WebKDC to WebLogin

Allow newlines, carriage returns, and tabs in the XML sent from the
WebKDC to the WebLogin server rather than replacing them with periods.
This fixes the display of <user-message> elements that contain
newlines.

Change-Id: Idf03b3a9971bb4ce52e1f537602c7203e9432384
Reviewed-on: https://gerrit.stanford.edu/1543
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoSkip FAST tests if the KDC does not support FAST
Russ Allbery [Tue, 15 Jul 2014 19:59:24 +0000 (12:59 -0700)]
Skip FAST tests if the KDC does not support FAST

Attempt a basic authentication with FAST, and skip the WebKDC
tests using FAST if that authentication fails.

Change-Id: Iba11997e7a9fffd6acaaf8680545a9ecff156de3
Reviewed-on: https://gerrit.stanford.edu/1542
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAdd webauth_krb5_set_fast_armor_path to library exports
Russ Allbery [Tue, 15 Jul 2014 19:58:55 +0000 (12:58 -0700)]
Add webauth_krb5_set_fast_armor_path to library exports

Also document the addition of the new public interface in NEWS.

Change-Id: I4a565ebfe7a358e0c16ac6c1277bc95dfbe714e1
Reviewed-on: https://gerrit.stanford.edu/1541
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAdd FAST support, fix WebKdcKerberosFactors
Russ Allbery [Tue, 15 Jul 2014 06:52:23 +0000 (23:52 -0700)]
Add FAST support, fix WebKdcKerberosFactors

Add a new configuration directive, WebKdcFastArmorCache, for
mod_webkdc.  If set, this specifies the path to a Kerberos ticket
cache that can (and must) be used for FAST (Flexible Authentication
Secure Tunneling) protection of Kerberos password authentications.
The Kerberos KDC must also support FAST in order to safely enable this
option.  Based on a patch by Jakob Uhd Jepsen (One.com A/S).

Fix parsing of the WebKdcKerberosFactors configuration directive.

Change-Id: Ib2849b267e83e07d376eb4ab2dd64db75cb1e7b7
Reviewed-on: https://gerrit.stanford.edu/1540
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAdd a test for StanfordAuth
Russ Allbery [Mon, 14 Jul 2014 23:48:34 +0000 (16:48 -0700)]
Add a test for StanfordAuth

Verify in the test suite that StanfordAuth works, and that
SU_AUTH_USER and SU_AUTH_AGE are set properly.

Change-Id: I7dfdc7e76e2c3f706549d7e130356f2ddce01b4d
Reviewed-on: https://gerrit.stanford.edu/1539
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoWarn about credential delegation to load-balanced pools
Russ Allbery [Mon, 14 Jul 2014 23:04:49 +0000 (16:04 -0700)]
Warn about credential delegation to load-balanced pools

Warn in the mod_webauth documentation that, when using credential
delegation to a load-balanced pool, all members of that pool must have
the same Kerberos identity.

Change-Id: Ib7ec41f1663d29ef8b32f28c0b39fbb4d35f256e
Reviewed-on: https://gerrit.stanford.edu/1538
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoFix various grammar and wording issues in the protocol spec
Russ Allbery [Mon, 14 Jul 2014 22:29:08 +0000 (15:29 -0700)]
Fix various grammar and wording issues in the protocol spec

Clarify the contents of the token returned to the WAS from the
WebKDC and the reason for having the session key both outside and
inside the encrypted token.  Fix various other grammar and wording
mistakes, including using a more appropriate preposition than "in"
for specifying the key used for an encryption.

Thanks to Adam Lewenberg for the review.

Change-Id: I3cdea8b61c5029684b9cd75140f113a23d3e5806
Reviewed-on: https://gerrit.stanford.edu/1537
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAdd new mp and v factors
Russ Allbery [Mon, 14 Jul 2014 20:29:12 +0000 (13:29 -0700)]
Add new mp and v factors

Add new factors mp (mobile push) and v (voice), which count as
separate classes for determining multifactor.  This means the
combination of those factors with any other factor class will result
in a synthensized multifactor factor.

Change-Id: I6911b6b70376fbab6d63445a98653f41e4a749a2
Reviewed-on: https://gerrit.stanford.edu/1536
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoSuppress Perl warning on remctl password change tests
Russ Allbery [Mon, 14 Jul 2014 20:21:14 +0000 (13:21 -0700)]
Suppress Perl warning on remctl password change tests

When remctl is supported, $error contains an undefined value,
which was producing spurious Perl warnings.

Change-Id: I99cf92d53c0a82c00570da802ba1beb817d6deb8
Reviewed-on: https://gerrit.stanford.edu/1535
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoUpdate WebKDC to WebLogin protocol for new factor information
Russ Allbery [Sun, 13 Jul 2014 18:34:20 +0000 (11:34 -0700)]
Update WebKDC to WebLogin protocol for new factor information

Add support for passing additional information about each
configured factor to enable better prompting in WebLogin.  Provide
a device ID and a mechanism for WebLogin to return it to the
WebKDC when requesting authentication.

Change-Id: I8bf0d35216e5861d0173359b992ed6f24207fd76
Reviewed-on: https://gerrit.stanford.edu/1533
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAdd NEWS entry for remctl compilation fixes
Russ Allbery [Sat, 10 May 2014 06:09:28 +0000 (23:09 -0700)]
Add NEWS entry for remctl compilation fixes

Change-Id: I62177bb1fa89fc77d8fa777f6f51ce92c1aa2216
Reviewed-on: https://gerrit.stanford.edu/1514
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoAdd NEWS entry for the WebLogin authorization change
Russ Allbery [Tue, 8 Jul 2014 23:40:35 +0000 (16:40 -0700)]
Add NEWS entry for the WebLogin authorization change

Change-Id: I725c5aef03e8cc965eb25a8c54143a8da0d524a6
Reviewed-on: https://gerrit.stanford.edu/1513
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
9 years agoNever bypass the confirm page if WebKDC lists permitted_authz
Benjamin Coddington [Tue, 8 Jul 2014 23:39:39 +0000 (16:39 -0700)]
Never bypass the confirm page if WebKDC lists permitted_authz

To: webauth-info@mailman.stanford.edu
Date: Tue, 8 Jul 2014 11:26:18 -0400 (8 hours, 12 minutes, 35 seconds ago)

Override the value of BYPASS_CONFIRM if the WebKDC returns a list
of permitted_authz identities.  Without this, users are unable to
assert an authz identity.

Change-Id: I777742aaf46b12d6fd1c8abc37b01ece68656067
Reviewed-on: https://gerrit.stanford.edu/1512
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoSkip Perl tests of remctl password change if support missing
Russ Allbery [Sat, 10 May 2014 06:00:57 +0000 (23:00 -0700)]
Skip Perl tests of remctl password change if support missing

Check if remctl-based password change is failing because the
library was not built with remctl support and skip those tests
in that case.

Change-Id: I5ea5cc962713f050bfa8ad90653f5644e6efd926
Reviewed-on: https://gerrit.stanford.edu/1487
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoBuild correctly when remctl support is disabled
Russ Allbery [Sat, 10 May 2014 05:59:42 +0000 (22:59 -0700)]
Build correctly when remctl support is disabled

The new remctl-based password change protocol broke the build of
the library when remctl support was not enabled due to an
incorrectly-named stub function.  Fix the function name and
diagnose attempting to configure remctl-based password change
without support for it earlier in the code path.

Thanks to Peter Wienemann for the report.

Change-Id: I120418bb8aaff7c6c406ef6965fcdd5e6ab1900d
Reviewed-on: https://gerrit.stanford.edu/1486
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAvoid gcc warnings when built without remctl support
Russ Allbery [Sat, 10 May 2014 05:58:36 +0000 (22:58 -0700)]
Avoid gcc warnings when built without remctl support

GCC 4.8 warns about use of uninitialized variables when the userinfo
code is built without remctl support since it doesn't realize we
never reach the problematic code.  Initialize the relevant variables
to NULL to unconfuse it.

Change-Id: I689fc1ab3c8f7d7329ad16e2bb5c3e9603bfb49d
Reviewed-on: https://gerrit.stanford.edu/1485
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate Perl module versions for 4.6.1
Russ Allbery [Tue, 29 Apr 2014 01:44:09 +0000 (18:44 -0700)]
Update Perl module versions for 4.6.1

Change-Id: I1a52ee531d1ad49f47c58d20c1f1b224b98d967e
Reviewed-on: https://gerrit.stanford.edu/1484
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoImprove WebLogin logic for showing password expiration warning
Russ Allbery [Tue, 29 Apr 2014 01:43:46 +0000 (18:43 -0700)]
Improve WebLogin logic for showing password expiration warning

Show the expiring password warning in WebLogin if the browser request
was a POST.  Previously, it was skipped if the user had a REMOTE_USER
preference or if the browser presented a single sign-on cookie.  This
was too conservative, not warning in cases when REMOTE_USER failed,
when the browser presented an expired single sign-on cookie (systems
that are suspended rather than shut down, for example), and when the
user has to do multifactor authentication.  Checking for a POST is a
closer match for when we can force a confirmation screen without too
much user disruption.

Change-Id: Iacfe1b3d5f5962fe303157e6d9f8ce6be47f33eb
Reviewed-on: https://gerrit.stanford.edu/1483
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix AuthType StanfordAuth
Russ Allbery [Tue, 22 Apr 2014 06:39:41 +0000 (23:39 -0700)]
Fix AuthType StanfordAuth

Support for AuthType StanfordAuth (for backward compatibility with
WebAuth 2.5) was broken in WebAuth 4.6.0, causing mod_webauth to
reject all accesses to resources protected with that AuthType.  This
has been fixed in this release.

Change-Id: I52f97f8d6a58aa512faf39934295aa93285630d3
Reviewed-on: https://gerrit.stanford.edu/1482
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoCheck the username parameter in WebLogin multifactor pages
Russ Allbery [Wed, 2 Apr 2014 04:29:10 +0000 (21:29 -0700)]
Check the username parameter in WebLogin multifactor pages

In WebLogin, verify that the username form field was sent before
attempting to do multifactor operations and return an error if it
isn't, avoiding undefined variable warnings and other errors deeper in
the WebLogin code.

Change-Id: Id137ce0ce836477e738d386b17b13122c575c6b4
Reviewed-on: https://gerrit.stanford.edu/1476
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix formatting of the WebAuthCookiePath example
Russ Allbery [Thu, 20 Mar 2014 00:29:07 +0000 (17:29 -0700)]
Fix formatting of the WebAuthCookiePath example

Change-Id: I0405b6c8306eedb69f8927090655851c3be2d863
Reviewed-on: https://gerrit.stanford.edu/1475
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd upgrade warning about keyring permissions
Russ Allbery [Thu, 20 Mar 2014 00:23:13 +0000 (17:23 -0700)]
Add upgrade warning about keyring permissions

Retroactively add a warning to NEWS about the permission change
required for the keyring when upgrading from older versions of
WebAuth.  Clarify keyring permissions in INSTALL.

Change-Id: Ifb138231f7483d87af120e94a5c5ee5c0d8f249e
Reviewed-on: https://gerrit.stanford.edu/1474
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoImported Upstream version 4.6.0 upstream/4.6.0
Russ Allbery [Wed, 19 Mar 2014 05:45:44 +0000 (22:45 -0700)]
Imported Upstream version 4.6.0

10 years agoRestructure and improve the mod_webauth tests release/4.6.0
Russ Allbery [Wed, 19 Mar 2014 05:38:56 +0000 (22:38 -0700)]
Restructure and improve the mod_webauth tests

Move the logout script up a level so that it isn't covered by the
authentication requirement (auth/logout was weird).  Adjust the
test harness so that tests can use an alternative logout path.
Move the tests for cookie path scoping to a separate directory so
that the whole directory can have the same path scope and they can
have their own logout script.  Simplify the structure of those
tests somewhat.

Change-Id: I75b6875886730442d4984bc25f35640ba1d14448
Reviewed-on: https://gerrit.stanford.edu/1473
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix logout handling
Russ Allbery [Wed, 19 Mar 2014 05:38:00 +0000 (22:38 -0700)]
Fix logout handling

When path-scoped cookies were introduced, the change broke the
cookie nuking for WebAuthDoLogout.  Correct this, and use a path
of / instead of (null) if no path was set.

Change-Id: I2e1f4ab96df55d0bcb3d8eda76110e346e8374f8
Reviewed-on: https://gerrit.stanford.edu/1472
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoImported Upstream version 4.6.0
Russ Allbery [Wed, 19 Mar 2014 04:14:32 +0000 (21:14 -0700)]
Imported Upstream version 4.6.0

10 years agoBuild with large file support unconditionally
Russ Allbery [Wed, 19 Mar 2014 03:37:21 +0000 (20:37 -0700)]
Build with large file support unconditionally

We use some non-APR disk I/O functions because APR doesn't support
fchmod and fchown, so be sure that we build with large file
support.

Change-Id: Ic7f7cda3139e352dd3ac754be82ea74899e041fa
Reviewed-on: https://gerrit.stanford.edu/1471
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoImported Upstream version 4.6.0
Russ Allbery [Wed, 19 Mar 2014 02:57:02 +0000 (19:57 -0700)]
Imported Upstream version 4.6.0

10 years agoFix syntax of xml2rfc calls in autogen
Russ Allbery [Wed, 19 Mar 2014 02:51:19 +0000 (19:51 -0700)]
Fix syntax of xml2rfc calls in autogen

The new version of xml2rfc requires --html and --text arguments
to generate the appropriate output files.

Change-Id: I6d3532b9842e7a706dae739bb92814ff02033b9b
Reviewed-on: https://gerrit.stanford.edu/1470
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoRelease 4.6.0
Russ Allbery [Wed, 19 Mar 2014 02:48:30 +0000 (19:48 -0700)]
Release 4.6.0

Change-Id: I2157191ce01d188fe3efe28e7eb1dcd4736e8fbe
Reviewed-on: https://gerrit.stanford.edu/1469
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd required <rfc> parameters to the protocol documentation
Russ Allbery [Wed, 19 Mar 2014 02:47:51 +0000 (19:47 -0700)]
Add required <rfc> parameters to the protocol documentation

The current xml2rfc requires category, docName, and ipr attributes
in the <rfc> tag or it produces annoying warnings.  Add those in.

Change-Id: I39de085a7ad326d25612e2404307022fad2b12bb
Reviewed-on: https://gerrit.stanford.edu/1468
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoEnsure the keyring can be loaded at module entry points
Russ Allbery [Wed, 19 Mar 2014 00:14:14 +0000 (17:14 -0700)]
Ensure the keyring can be loaded at module entry points

At each module entry point that might perform actions with the
keyring, ensure that the keyring is loaded and return an appropriate
error immediately if it's not.  Ensure there are sanity checks in
place for all places the keyring might be used.

Return HTTP_INTERNAL_SERVER_ERROR if configuring the WebKDC fails.

Change-Id: I66ca283e0d6aeb04a759519897939ba2625b2465
Reviewed-on: https://gerrit.stanford.edu/1467
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate to rra-c-util 5.3 as released
Russ Allbery [Tue, 18 Mar 2014 23:19:14 +0000 (16:19 -0700)]
Update to rra-c-util 5.3 as released

* Skip Perl critic tests with read-only source directory.

Change-Id: I5cd2d54c8c5e845c9fae93f3f8dd0c8089be2ca3
Reviewed-on: https://gerrit.stanford.edu/1466
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd documentation and NEWS for the per-virtual-host keyrings
Russ Allbery [Tue, 18 Mar 2014 06:18:47 +0000 (23:18 -0700)]
Add documentation and NEWS for the per-virtual-host keyrings

Change-Id: Ifdf72bb6b42e56a9422ebc6c11e321dd9ee3646d
Reviewed-on: https://gerrit.stanford.edu/1465
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUse separate per-virtual-host internal keyrings
Vegard Edvardsen [Tue, 18 Mar 2014 06:17:23 +0000 (23:17 -0700)]
Use separate per-virtual-host internal keyrings

mod_webauth and mod_webkdc now maintain separate in-memory keyrings
per virtual host, and the WebAuthKeyring, WebKdcKeyring, and related
directives are now correctly honored in the virtual host configuration
and can be meaningfully set to different values.  This allows the
modules to work properly with the ITK MPM with separate keyrings owned
by different users for each virtual host so that proper privilege
separation between virtual hosts is maintained.

Change-Id: I34b20bd15ee23f6ae0c78851f0a1f0bf3dc32a7c
Reviewed-on: https://gerrit.stanford.edu/1464
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoRemove stray perltidy.LOG file after critic testing
Russ Allbery [Tue, 18 Mar 2014 05:41:16 +0000 (22:41 -0700)]
Remove stray perltidy.LOG file after critic testing

This started showing up with perltidy 20130922-1 in Debian.  It's
probably a bug, but get rid of it anyway.

Change-Id: Ib3b6af048e9e6fd63e675cafc4bd8509799e18d7
Reviewed-on: https://gerrit.stanford.edu/1463
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoPreserve ownership and permissions on keyring updates
Russ Allbery [Tue, 18 Mar 2014 05:28:06 +0000 (22:28 -0700)]
Preserve ownership and permissions on keyring updates

WebAuth keyring updates via either mod_webauth's and mod_webkdc's
auto-update support or via wa_keyring now preserve the keyring
ownership and permissions where possible, with the exception that the
permissions are not preserved if the old permissions included group
access and the group ownership could not be preserved.

Change-Id: I4644f70466970a02225e0f8fa88d6a24d32c0287
Reviewed-on: https://gerrit.stanford.edu/1462
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoRename hex encode and decode functions to use wai_* naming
Russ Allbery [Wed, 12 Mar 2014 22:48:59 +0000 (15:48 -0700)]
Rename hex encode and decode functions to use wai_* naming

These are internal functions not exposed from the library, so use
the corresponding naming scheme.

Change-Id: I6f96ee9e7b035b3d092f3819d1b28eaf0f6b50b2
Reviewed-on: https://gerrit.stanford.edu/1457
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd locking to keyring updates
Russ Allbery [Wed, 12 Mar 2014 06:12:35 +0000 (23:12 -0700)]
Add locking to keyring updates

webauth_keyring_write and webauth_keyring_auto_update now lock the
keyring, using a separate lock file named by appending ".lock" to the
name of the keyring.  This applies to the keyrings used by
mod_webauth, mod_webkdc, and the wa_keyring utility and ensures that
only one process attempts to update a keyring at the same time.  These
functions continue to use atomic replacement on all writes, and no
locks are used for reading the keyring.

Change-Id: I038fbe3806a819c6df0cc2c764239f6f5fad7029
Reviewed-on: https://gerrit.stanford.edu/1456
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoChange wai_error_set* functions to return the new code
Russ Allbery [Tue, 11 Mar 2014 04:30:53 +0000 (21:30 -0700)]
Change wai_error_set* functions to return the new code

Change all library-internal wai_error_set* functions to return the
new error code.  Make use of this in various places to shorten or
simplify the code logic.

Since I'm touching every error message anyway, fix a few places
where error messages were unclear or where the wrong error code was
used.

Change-Id: I039de3c823cbfc282b147343358e8fea5bc55ff4
Reviewed-on: https://gerrit.stanford.edu/1455
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix handling of non-directive sections in module manuals
Russ Allbery [Tue, 11 Mar 2014 02:20:52 +0000 (19:20 -0700)]
Fix handling of non-directive sections in module manuals

Based on the mod_fcgid documentation, use the correct method of
labeling non-directive sections so that they get proper sidebar
links.  Remove the code from the clean-apache-manual script that
was cobbling this together.

Set the module status to External instead of Contributed, and add
a compatibility section to each module documentation page.

Change-Id: I1122b607d06be1f55328e3064820b0b1010c6a1e
Reviewed-on: https://gerrit.stanford.edu/1454
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate to rra-c-util 5.3 and C TAP Harness 3.0
Russ Allbery [Mon, 10 Mar 2014 20:51:19 +0000 (13:51 -0700)]
Update to rra-c-util 5.3 and C TAP Harness 3.0

Update to rra-c-util 5.3:

* Avoid leaking dummy symbols into shared libraries.
* Probe for libdl for OpenSSL libraries (required on AIX).
* Distinguish failure to format output in asprintf wrappers.
* Check return status of snprintf properly.
* Better remctld process management in the test suite.
* Better memory management in Kerberos tests.
* Fix syntax error when buiding portable/krb5.h with a C++ compiler.

Update to C TAP Harness 3.0:

* Reopen standard input for tests to /dev/null.
* Clean up inherited file descriptors from the test harness.

Change-Id: Ic7ba3dbcd8f5c56d37fa89548be46572720091e7
Reviewed-on: https://gerrit.stanford.edu/1453
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoRemove an unused variable in the WebAuth module
Russ Allbery [Sat, 8 Mar 2014 23:46:55 +0000 (15:46 -0800)]
Remove an unused variable in the WebAuth module

Change-Id: I9375bf47dc5b1298b2e9f4be89bdc66197ffb1eb
Reviewed-on: https://gerrit.stanford.edu/1452
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoChange my email address to eagle@eyrie.org
Russ Allbery [Thu, 6 Mar 2014 20:11:10 +0000 (12:11 -0800)]
Change my email address to eagle@eyrie.org

Change-Id: Icc6cb5d9ec843c6d975dd39e2f7b770de72392e4
Reviewed-on: https://gerrit.stanford.edu/1451
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd maintainership information to the top of README
Russ Allbery [Thu, 6 Mar 2014 20:11:02 +0000 (12:11 -0800)]
Add maintainership information to the top of README

Change-Id: If645c9103f62625d09f4dbff83bc2bb0f04d9d55
Reviewed-on: https://gerrit.stanford.edu/1450
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd test suite for remctl password change in WebLogin
Russ Allbery [Fri, 28 Feb 2014 03:37:22 +0000 (19:37 -0800)]
Add test suite for remctl password change in WebLogin

Start a remctl server and test WebLogin password change using the
remctl protocol.

Change-Id: I6ef2d2eb91005f93edf1a032a2e295580971519f
Reviewed-on: https://gerrit.stanford.edu/1445
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoSupport remctl-based password change in WebLogin
Russ Allbery [Fri, 28 Feb 2014 01:22:33 +0000 (17:22 -0800)]
Support remctl-based password change in WebLogin

The WebAuth::Krb5 change_password function now takes an optional args
parameter that can be used to set the same configuration that can be
set with webauth_krb5_change_config.

WebLogin now supports using the remctl-based password change protocol
instead of kpasswd.  This is controlled by setting
$PASSWORD_CHANGE_HOST and several other variables in the WebLogin
configuration.  See docs/weblogin-config for more information.

Change-Id: Iee294e9d4bf25c6c675ea1c7cf32ded884de09f3
Reviewed-on: https://gerrit.stanford.edu/1444
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd support for Kerberos password change via remctl
Russ Allbery [Thu, 27 Feb 2014 09:12:11 +0000 (01:12 -0800)]
Add support for Kerberos password change via remctl

The WebAuth Kerberos API now supports Kerberos password change via the
remctl protocol, which is more robust than the kpasswd protocol when
password changes can take some time.  This can be configured via the
new webauth_krb5_change_config function.  The remote remctl server
must provide a command and subcommand that takes a single argument,
the new password, and changes the password for the authenticated
principal that sent the command.

Change-Id: I5747eade47032da1aaa194d8fd2caf6a471cad5a
Reviewed-on: https://gerrit.stanford.edu/1443
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd C tests for Kerberos password change
Russ Allbery [Thu, 27 Feb 2014 08:24:12 +0000 (00:24 -0800)]
Add C tests for Kerberos password change

This was being tested as part of the Perl module test suite, but
there wasn't a C test suite.  There is now.

Change-Id: Ie97892b6d1c9735b59ec97f0e1e85eac4ca5f5ed
Reviewed-on: https://gerrit.stanford.edu/1442
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd a stopword for WebKDC::WebRequest
Russ Allbery [Thu, 27 Feb 2014 08:23:48 +0000 (00:23 -0800)]
Add a stopword for WebKDC::WebRequest

Apparently the new spell checking is pickier.

Change-Id: Ie3deba5e3f5f7cc20fbae275066aa11b2e3ad6e8
Reviewed-on: https://gerrit.stanford.edu/1441
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate Test::RRA modules from rra-c-util 5.2
Russ Allbery [Thu, 27 Feb 2014 07:58:37 +0000 (23:58 -0800)]
Update Test::RRA modules from rra-c-util 5.2

This fixes support for use_prereq with version numbers containing
underscores, adds the test_tmpdir function, and adds the
@STRICT_IGNORE configuration option for tests.  We're not using
any of this currently; the point of the import is to fix a test
suite failure in the pod-spelling test.

Change-Id: I48354fe9cf8dbaf336b411dd5c072db59b924535
Reviewed-on: https://gerrit.stanford.edu/1440
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate module versions for the next release version
Russ Allbery [Thu, 27 Feb 2014 07:58:20 +0000 (23:58 -0800)]
Update module versions for the next release version

Change-Id: Id1d6225d190244ec2556ff4a10e000a7a045ad9c
Reviewed-on: https://gerrit.stanford.edu/1439
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd more WebAuth TODO items
Russ Allbery [Thu, 27 Feb 2014 06:35:12 +0000 (22:35 -0800)]
Add more WebAuth TODO items

Change-Id: I91d2f3d5a72d11d9c68f2473a2f3a93f5e8a6260
Reviewed-on: https://gerrit.stanford.edu/1438
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd WebAuthCookiePath directive to mod_webauth
Russ Allbery [Mon, 24 Feb 2014 21:44:19 +0000 (13:44 -0800)]
Add WebAuthCookiePath directive to mod_webauth

mod_webauth supports a new configuration directive, WebAuthCookiePath,
which scopes all cookies set by mod_webauth to the given path.  This
allows separate sections of the same virtual host to be treated as
independent for authentication purposes.  This can be useful when
controlling factor restrictions via the user information service.
When using this directive with a logout link, be sure that the logout
configuration (WebAuthDoLogout) is subject to the same
WebAuthCookiePath directive or it will not work properly.  Be aware
that the current version of mod_webauth does not correctly handle
receiving multiple cookies with the same name from the browser.  When
using this directive, ensure that all WebAuth-protected portions of
the site use this directive and none of the scopes are overlapping.

Change-Id: I6a115ec058453b7ddd1f9e8629e2837120e0a3ab
Reviewed-on: https://gerrit.stanford.edu/1437
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate TODO for WebAuthOptional port to Apache 2.4
Russ Allbery [Mon, 3 Feb 2014 02:37:54 +0000 (18:37 -0800)]
Update TODO for WebAuthOptional port to Apache 2.4

Change-Id: I001e51221f201a38dde5582016c509419ac0ff56
Reviewed-on: https://gerrit.stanford.edu/1430
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoSynchronize TODO with other notes
Russ Allbery [Wed, 1 Jan 2014 20:18:52 +0000 (12:18 -0800)]
Synchronize TODO with other notes

Add missing JIRA ticket numbers.  Add several new to-do items.
Remove one duplicate.

Change-Id: I84dd5e94d14a5dfa4aa886c09d722800e0af3d9f
Reviewed-on: https://gerrit.stanford.edu/1350
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFree memory allocated in run_login_test
Russ Allbery [Thu, 26 Dec 2013 22:46:06 +0000 (14:46 -0800)]
Free memory allocated in run_login_test

In the TAP library for testing WebKDC logins in the libwebauth
library, free a stray bit of memory that had been missed to quiet
valgrind output.

Change-Id: I8f953369f13895aa4ae1be5762a61eca399f5db8
Reviewed-on: https://gerrit.stanford.edu/1347
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate remctld test suite handling to new API
Russ Allbery [Thu, 26 Dec 2013 20:49:46 +0000 (12:49 -0800)]
Update remctld test suite handling to new API

Update to the process_start API that will be part of rra-c-util 5.0.
This maintains the previous support for integrating remctld output
into the test output while generalizing the framework and making it
somewhat more robust.

Change-Id: I0164beb13ec22adfdc78f6992589786b6c035e58
Reviewed-on: https://gerrit.stanford.edu/1346
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate remctl TAP support to use diag_file_add
Russ Allbery [Thu, 26 Dec 2013 20:35:58 +0000 (12:35 -0800)]
Update remctl TAP support to use diag_file_add

Use diag_file_add to interleave the remctld output properly with
the test cases we're running, and to avoid having remctld output
status messages that don't properly start with #.

Use test_cleanup_register to handle the remctld_stop cleanup
function and modify its call signature accordingly.

Change-Id: Ide6c0fc9a99b8c2769feca3c7a051e7ad13edf07
Reviewed-on: https://gerrit.stanford.edu/1345
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate to C TAP Harness 2.4
Russ Allbery [Thu, 26 Dec 2013 20:35:21 +0000 (12:35 -0800)]
Update to C TAP Harness 2.4

* Add new diag_file_add and _remove API to the C TAP library.
* Add new test_cleanup_register API to the C TAP library.
* Suppress lazy plans and test summaries if the test failed with bail.
* Add warn_unused_result gcc attributes to relevant functions.

Change-Id: I288798e23ae68c7bac570f8ad6cc7893527dc835
Reviewed-on: https://gerrit.stanford.edu/1344
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUse authenticated identity for username for multifactor
Russ Allbery [Thu, 21 Nov 2013 21:01:03 +0000 (13:01 -0800)]
Use authenticated identity for username for multifactor

Use the authenticated identity returned by the WebKDC as the username
for multifactor authentication in WebLogin rather than preserving what
the user originally typed.  The WebKDC may have done Kerberos
canonicalization and aname to localname mapping.

Change-Id: I6e1f74f7c5cffb4f8510092d499331dc917388e8
Reviewed-on: https://gerrit.stanford.edu/1340
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd TODO for logging of failed OTP authentications
Russ Allbery [Tue, 19 Nov 2013 21:24:54 +0000 (13:24 -0800)]
Add TODO for logging of failed OTP authentications

Change-Id: Ia7048d5e8681562a4bda54b7687c4f32688c4229
Reviewed-on: https://gerrit.stanford.edu/1339
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd NEWS entries for WebAuthOptional and note fixes
Russ Allbery [Wed, 13 Nov 2013 00:47:58 +0000 (16:47 -0800)]
Add NEWS entries for WebAuthOptional and note fixes

Change-Id: Ie20c0b39e9eb2ff95d035756ab9e4f75aa6f52c9

10 years agoFix compilation warnings triggered by recent changes
Russ Allbery [Wed, 13 Nov 2013 00:23:57 +0000 (16:23 -0800)]
Fix compilation warnings triggered by recent changes

Make a copy of retrieved notes since we modify them in place.
Add proper #ifdef for one variable and remove another unused
variable.

Change-Id: I8c60b894842dc806cb5921a8987deec633118bcf
Reviewed-on: https://gerrit.stanford.edu/1338
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoDon't remove request notes in mod_webauth
Benjamin Coddington [Tue, 12 Nov 2013 23:51:17 +0000 (15:51 -0800)]
Don't remove request notes in mod_webauth

I found gather_tokens returns 302 in check_user_id in the subrequest
if WebAuthExtraRedirect is on, so check_user_id never gets to set the
N_SUBJECT note, but on the second pass through check_user_id (back in
the main request) the N_WEBAUTHR and N_WEBAUTHS notes are missing, so
mod_webauth thinks we need to go back to WebLogin to get them.

This can be fixed by not removing N_WEBAUTHR and N_WEBAUTHS from the
main request's notes.  Then, subrequests should behave in the same way
as the main request.

Change-Id: I2895ffa042291d8fe78ad4b53ddad51ceb2bfc9e
Reviewed-on: https://gerrit.stanford.edu/1337
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
10 years agoDrop unused mod_webauth_child_init hook
Russ Allbery [Tue, 12 Nov 2013 23:49:51 +0000 (15:49 -0800)]
Drop unused mod_webauth_child_init hook

We haven't ever done anything in this hook, so stop creating it
and calling it.

Change-Id: I76e5966f73c601c9cf9d271395d943f9d7db4f4f
Reviewed-on: https://gerrit.stanford.edu/1336
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
10 years agoCoding style cleanup of WebAuthOptional changes
Russ Allbery [Tue, 12 Nov 2013 23:40:54 +0000 (15:40 -0800)]
Coding style cleanup of WebAuthOptional changes

Clean up the coding style of the recent changes and remove some
unnecessary debugging code.  Add a couple of necessary changes to
TODO.

Change-Id: I2f491f74a2abe3c2da6be6d5c1588fc03a37f8a6
Reviewed-on: https://gerrit.stanford.edu/1335
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix WebAuthOptional on httpd 2.4
Benjamin Coddington [Tue, 24 Sep 2013 19:19:01 +0000 (15:19 -0400)]
Fix WebAuthOptional on httpd 2.4

By moving the gather_tokens portion of check_user_id into
ap_hook_check_access_ex, we can have the server bypass
check_user_id for the WebAuthOptional case.

Change-Id: Id81c572e751c39cc80f2fb979756a940bea0c545
Reviewed-on: https://gerrit.stanford.edu/1334
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUse r->request_config for mod_webauth's context
Benjamin Coddington [Tue, 24 Sep 2013 14:44:53 +0000 (10:44 -0400)]
Use r->request_config for mod_webauth's context

Using the per-request config allows mod_webauth to persist context
between hook functions.  Because the context keeps references to
the directory config and server config, set those as soon in the
request as we can (as soon as we have a per_dir_config).  In the
httpd 2.2 server this is done in access_checker; in the httpd 2.4
server this is moved to post_perdir_config.

Change-Id: I8fbfa7bb54c169dbc83d18ee26fc494a5d0e884e
Reviewed-on: https://gerrit.stanford.edu/1333
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoDocument more details of the token encryption
Russ Allbery [Sun, 10 Nov 2013 00:09:33 +0000 (16:09 -0800)]
Document more details of the token encryption

In the protocol specification and in the token encryption code,
document more details of the cryptography.

Change-Id: Ifa6e242ab3e2b493e35b6e0481d460dd40d870da
Reviewed-on: https://gerrit.stanford.edu/1332
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAdd additional crypto and security-related TODO tasks
Russ Allbery [Sun, 10 Nov 2013 00:09:15 +0000 (16:09 -0800)]
Add additional crypto and security-related TODO tasks

Change-Id: I3e20c9a6103f8d1ea35bf594b6947981e91c0b7e
Reviewed-on: https://gerrit.stanford.edu/1331
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoWork around a Module::Build bug in RHEL 5
Russ Allbery [Sat, 2 Nov 2013 04:57:20 +0000 (21:57 -0700)]
Work around a Module::Build bug in RHEL 5

Work around a bug in the Module::Build version that comes with RHEL 5
in passing compiler and linker flags to the Perl module build.

Change-Id: I65aa9b1dafe102b74b466cbe204053d3e0bb7148
Reviewed-on: https://gerrit.stanford.edu/1330
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFlesh out TODO with more new work
Russ Allbery [Sat, 2 Nov 2013 00:29:12 +0000 (17:29 -0700)]
Flesh out TODO with more new work

Change-Id: If86f61427950580b19959ea837a4f4c667370cf8
Reviewed-on: https://gerrit.stanford.edu/1329
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoRemove autom4te.cache and config.h.in~ on make distclean
Russ Allbery [Sat, 5 Oct 2013 23:22:03 +0000 (16:22 -0700)]
Remove autom4te.cache and config.h.in~ on make distclean

This isn't strictly correct by the GNU coding standards, but I don't
want those files hanging around.

Change-Id: I0bbe6598e2e60999f8c51de3fbdb249cbb29a23b
Reviewed-on: https://gerrit.stanford.edu/1323
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate URL for NIST Special Publication 800-63
Russ Allbery [Sat, 5 Oct 2013 19:50:52 +0000 (12:50 -0700)]
Update URL for NIST Special Publication 800-63

Change-Id: I55ef6cb7d0c4e5c0b8a6eb49fce33ce00314bf2e
Reviewed-on: https://gerrit.stanford.edu/1322
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate to new OpenSSL Autoconf probes from rra-c-util 4.10
Russ Allbery [Sat, 5 Oct 2013 19:04:13 +0000 (12:04 -0700)]
Update to new OpenSSL Autoconf probes from rra-c-util 4.10

Change-Id: I5098653ecdb5aca90bdb3d8bcb701c4fe13c8034
Reviewed-on: https://gerrit.stanford.edu/1321
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix reversed logic in SSL probes for --enable-reduced-depends
Russ Allbery [Fri, 27 Sep 2013 05:35:25 +0000 (22:35 -0700)]
Fix reversed logic in SSL probes for --enable-reduced-depends

Fix configure probes for OpenSSL on platforms without transitive
shared library dependencies.

Change-Id: Idcaf2d9fe7043095f1017e3b227e7481c6719be7
Reviewed-on: https://gerrit.stanford.edu/1320
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoBe explicit about the encryption method in the protocol spec
Russ Allbery [Thu, 26 Sep 2013 20:00:18 +0000 (13:00 -0700)]
Be explicit about the encryption method in the protocol spec

Change-Id: I9995acba7de58bd9c2f133de128db17a91f974be
Reviewed-on: https://gerrit.stanford.edu/1319
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoFix Perl warning in WebLogin when expiring cookies
Russ Allbery [Tue, 24 Sep 2013 20:00:41 +0000 (13:00 -0700)]
Fix Perl warning in WebLogin when expiring cookies

When the WebKDC says to delete a cookie by returning the cookie
with no value, the check for the value being empty was assuming
it was defined.  Change to a truth check, which correctly handles
the undefined case without a warning.

Change-Id: I073a0396a3beb6e428ebab5ddda2c6d42bdf1ede
Reviewed-on: https://gerrit.stanford.edu/1318
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoBe even more aggressive about disabling browser caching
Russ Allbery [Mon, 23 Sep 2013 17:29:19 +0000 (10:29 -0700)]
Be even more aggressive about disabling browser caching

Be even more thorough in telling browsers not to cache responses from
WebLogin, redirects and logout pages from mod_webauth, and any page
marked with WebAuthDontCache.  Add private and max-age=0 to the
existing Cache-Control headers, add Vary: *, and (for WebLogin pages)
set an expiration time in the past.

Change-Id: I83c1107623f131edff3f4043e4d97793639da25b
Reviewed-on: https://gerrit.stanford.edu/1317
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoAlphabetize settings in docs/weblogin-config
Russ Allbery [Wed, 18 Sep 2013 20:37:33 +0000 (13:37 -0700)]
Alphabetize settings in docs/weblogin-config

The configuration variables were out of alphabetical order, making
them harder to find.

Change-Id: Ia0c0eb3034d35eb9f2d045f1e819e0b66d17a6cf
Reviewed-on: https://gerrit.stanford.edu/1316
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoTranslate malformed principal names into WA_PEC_USER_REJECTED
Russ Allbery [Mon, 16 Sep 2013 17:30:30 +0000 (10:30 -0700)]
Translate malformed principal names into WA_PEC_USER_REJECTED

Malformed principal names were being rejected with a generic
Kerberos error, which is then translated into an internal error.
Catch this case and map them to WA_PEC_USER_REJECTED instead for
better user error message presentation.

Change-Id: If46516d91d1466faa17a25b48c512b0796c0fdb4
Reviewed-on: https://gerrit.stanford.edu/1315
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoTest failed Kerberos authentictions
Russ Allbery [Mon, 16 Sep 2013 17:04:13 +0000 (10:04 -0700)]
Test failed Kerberos authentictions

Add support to the test infrastructure for error messages that
may contain context that we can't easily reproduce.  Use that to
test an authentication failure due to an incorrect password.

Change-Id: Icd1965b0c39ae446265df892f9f171cfa507888f
Reviewed-on: https://gerrit.stanford.edu/1314
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoHold a reference to WebAuth objects in WebAuth::Krb5 objects
Russ Allbery [Sun, 15 Sep 2013 20:11:20 +0000 (13:11 -0700)]
Hold a reference to WebAuth objects in WebAuth::Krb5 objects

Ensure that the underlying WebAuth context is not freed until the
WebAuth::Krb5 objects created from it are freed.  This avoids
awkward object lifespan handling where the WebAuth context going
out of scope invalidates all the WebAuth::Krb5 objects, at the
cost of possibly hanging on to more memory than intended.

Change-Id: Ic4dc6a113314e8d311b9a8615999a8eb68727809
Reviewed-on: https://gerrit.stanford.edu/1313
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUse an example IP address for Kerberos address testing
Russ Allbery [Sun, 15 Sep 2013 19:53:08 +0000 (12:53 -0700)]
Use an example IP address for Kerberos address testing

Rather than using a valid IP address from Stanford's network, use
one of the IP addresses reserved for testing and documentation when
testing handling of address-locked tickets.

Change-Id: Ie37767d7400fdfef889681f0590b5314769abd1e
Reviewed-on: https://gerrit.stanford.edu/1312
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoSkip change password tests if Kerberos password change fails
Russ Allbery [Sun, 15 Sep 2013 19:50:01 +0000 (12:50 -0700)]
Skip change password tests if Kerberos password change fails

If the test is being run behind NAT, the Kerberos password change
protocol will fail.  Skip the tests that require contacting the
server in that case.  Undo the password change just in case it
succeeded despite the error message.

Change-Id: I7934ebd65dd43cd179ab4a91155833b8b0cdb3d0
Reviewed-on: https://gerrit.stanford.edu/1311
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoSkip Kerberos address tests if we can't request an address
Russ Allbery [Sun, 15 Sep 2013 19:49:07 +0000 (12:49 -0700)]
Skip Kerberos address tests if we can't request an address

If the KDC is checking the addresses requested for tickets, we won't
be able to get an address-locked ticket to the IP address hard-coded
in the test.  Detect this situation and skip the test in that case.

Change-Id: I92179a03ebeff382d5e78563c6b52b6debb7f0b0
Reviewed-on: https://gerrit.stanford.edu/1310
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoUpdate copyright and group name in README
Russ Allbery [Sat, 14 Sep 2013 18:10:41 +0000 (11:10 -0700)]
Update copyright and group name in README

Change-Id: I641fcba6da2da119070c74387a182db902e30489
Reviewed-on: https://gerrit.stanford.edu/1308
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoCorrect the fix for invalid XML from the WebKDC
Russ Allbery [Fri, 13 Sep 2013 17:04:00 +0000 (10:04 -0700)]
Correct the fix for invalid XML from the WebKDC

Correct a bug in the workaround for parsing of invalid XML from the
WebKDC in WebLogin that caused it to not be effective.

Change-Id: I35344ca1fbdaee6c54b0825c5be5a5c18d8148aa
Reviewed-on: https://gerrit.stanford.edu/1307
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoSilence remctld debugging output and drop valgrind support
Russ Allbery [Mon, 9 Sep 2013 05:01:34 +0000 (22:01 -0700)]
Silence remctld debugging output and drop valgrind support

Drop the special support for running only remctld under valgrind.
We now have a much more comprehensive way of doing valgrind
testing.  Restructure the remctl TAP add-on to make it a bit
easier to read.  Remove the -d flag so that remctld isn't quite so
verbose.

Change-Id: Ia90f6885e08ec82078e738cd26b711edb5ae5929
Reviewed-on: https://gerrit.stanford.edu/1306
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoMake generation of protocol docs dependent on xml2rfc
Russ Allbery [Mon, 9 Sep 2013 04:45:56 +0000 (21:45 -0700)]
Make generation of protocol docs dependent on xml2rfc

If xml2rfc doesn't exist, skip generating the protocol documentation
in autogen and print out a warning.

Change-Id: I714872fb0e573c50f0d6912275324f483468499e
Reviewed-on: https://gerrit.stanford.edu/1305
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoIncrease the time tolerance for cookie expirations
Russ Allbery [Mon, 9 Sep 2013 04:44:39 +0000 (21:44 -0700)]
Increase the time tolerance for cookie expirations

On some slow hosts, such as the Debian m68k builder, the Perl
code may take long enough to run that the cookie expiration time
won't be exactly what we want.  Allow a couple of seconds of
tolerance.

Change-Id: Ief89593fdfbc9dc3a23232b89adf5f15eb806000
Reviewed-on: https://gerrit.stanford.edu/1304
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
10 years agoKeep the autoconf cache directory after autogen
Russ Allbery [Mon, 9 Sep 2013 04:44:14 +0000 (21:44 -0700)]
Keep the autoconf cache directory after autogen

My new standard is to keep the cache rather than forcibly deleting
it on every run.

Change-Id: I9b661cf47e27bf3d4e290a1aa402652a7588c90b
Reviewed-on: https://gerrit.stanford.edu/1303
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>