-
Notifications
You must be signed in to change notification settings - Fork 10
/
NEWS
2305 lines (1777 loc) · 109 KB
/
NEWS
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
User-Visible WebAuth Changes
WebAuth 4.7.0 (2014-12-10)
Recognize KRB5_BAD_ENCTYPE, KRB5_GET_IN_TKT_LOOP, KRB5_PREAUTH_FAILED,
and KRB5KRB_AP_ERR_MODIFIED as additional synonyms for a failed login
error code. Various combinations of recent MIT and Heimdal with
different KDCs return these error codes if the password is incorrect.
Added new fields to the userinfo service parsing and the WebLogin
handling. These allow for a more complicated multifactor
configuration to be passed along from the user information service,
with multiple possible multifactor devices and one default.
Give a validation remctl command its own timeout error, so that a
failure to respond to validation is handled differently than any
other timeout failure. This is done so that we can handle
out-of-band multifactor methods, such as a phone call. Previously
that would show up in WebLogin as a generic
WK_ERR_UNRECOVERABLE_ERROR.
Ability to use JSON rather than XML for the user information service's
return values. This is activated with the WebKdcUserInfoJSON
configuration directive.
Refactored the userinfo code to separate remctl support, XML parsing,
and JSON parsing into separate source files for readability.
WebAuth 4.6.1 (2014-07-23)
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.
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.
Add a new webauth_krb5_set_fast_armor_path interface to libwebauth
that allows configuring a path to a FAST armor ticket cache before
authenticating with a password.
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.
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.
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.
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.
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.
If a user may switch to a different authorization identity, force
display of the confirmation page in WebLogin even if this is normally
disabled. Otherwise, there is no opportunity for the user to change
identities.
Diagnose empty RT or ST parameters to WebLogin and return the same
error as when those parameters are missing entirely.
Fix compilation when remctl support is not enabled.
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.
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.
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.
WebAuth 4.6.0 (2014-03-18)
WARNING: When upgrading to this release, you will need to change the
ownership of the mod_webauth keyring file (named in the WebAuthKeyring
Apache directive) to the user and group the Apache child processes run
as. (This is controlled by the User and Group Apache directives and
is often something like www-data.) Previous versions would create
this file readable only by root, but, as of this release, it must be
readable and writable by the Apache child processes.
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.
WebAuthOptional should now work properly with Apache 2.4. Thanks to
Benjamin Coddington for the patches.
Don't delete notes in mod_webauth after using them for authentication
in case the authentication is happening in a subrequest and the parent
request has not yet completed. Deleting the note could cause two
redirects to WebLogin due to an ordering issue when processing notes
and subrequests. Patch from Benjamin Coddington.
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. When using the
modules in this configuration, configure each virtual host with
WebAuthKeyring or WebKdcKeyring directives pointing to separate
keyring files writable by the user that virtual host will use. Thanks
to Vegard Edvardsen for the patch.
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.
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.
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.
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.
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.
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.
Set the correct template variable when the code field is left blank on
the WebLogin multifactor form.
Map unknown realm and invalid principal errors during Kerberos
authentication in mod_webkdc to WA_PEC_USER_REJECTED instead of a
generic Kerberos error. This will display a more accurate error
message to the user of WebLogin instead of a generic internal error
message.
Correct a bug in the workaround for parsing of invalid XML from the
WebKDC in WebLogin that caused it to not be effective.
Log a more detailed error message on WebAuth exceptions during
WebLogin password change.
Fix configure probes for OpenSSL on platforms without transitive
shared library dependencies.
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.
* Skip Perl critic tests with read-only source directory.
Update to C TAP Harness 3.0:
* 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.
* Reopen standard input for tests to /dev/null.
* Clean up inherited file descriptors from the test harness.
WebAuth 4.5.5 (2013-08-28)
Fix replay detection in WebLogin to use the same memcached object
naming convention when registering authentications and when checking
for a previous authentication.
If the login is rejected by the user information service, WebLogin now
displays a more specific error instead of the generic "something went
wrong" error page.
If a multifactor authentication is rejected by the validation service,
the user is now returned to the multifactor authentication screen and
the error message is provided to the template, rather than taking the
user to a dead-end error page with a generic error.
If enabled, rate limiting and replay detection are also applied to the
multifactor login page in addition to the password login page.
Support remembering that the user has been sent an SMS message already
when redisplaying the multifactor login page after an error. For this
to work properly, local templates will have to be updated to set the
form parameter multifactor_sentauth if an SMS message has already been
sent. See the sample multifactor.tmpl file for an example.
WebAuth 4.5.4 (2013-08-16)
If the user presents a login token for one user and a webkdc-proxy
token for a different user, or, more generally, mismatched
webkdc-proxy tokens, ignore and log the mismatched webkdc-proxy token
rather than rejecting the authentication with a fatal error. While
this case ideally should not happen, in practice it's not uncommon for
users sharing devices to attempt authentication (due to session factor
requirements or forced login) while still possessing webkdc-proxy
tokens for another user, and rejecting the authentication instead of
replacing the older webkdc-proxy token does nothing to improve the
situation.
Fix handling of non-password session factors. Requiring any session
factor other than password, for users using password authentication,
resulted in the user being repeatedly presented with the password
login page because mod_webkdc did not notice the password session
factor and continue to asking for a multifactor authentication. The
logic is still not entirely correct for users who use non-password
initial authentication factors; that will be fixed in a subsequent
release.
Improve handling of required initial factors when users have a way to
establish initial credentials that don't include password. mod_webkdc
now returns a forced login error instead of multifactor required if
the user's initial factors don't satisfy the request and don't contain
a password factor.
If a password authentication is required in order to obtain a Kerberos
authenticator, return that error in preference to a multifactor
required error. This ensures that the password authentication page
happens first, preserving expected user page flow, and fixes various
errors and loops caused by detecting this problem after the successful
second factor authentication.
If the WebLogin post to the WebKDC fails, retry once. It's common for
the POST to be interrupted by a signal from the FastCGI process
manager trying to shut down the login.fcgi process, in which case
retrying will succeed and allow completion of the request before
shutting down.
Produce more succinct and hopefully still useful error messages when
WebLogin cannot POST to the WebKDC.
Ignore SIGPIPE signals in the WebLogin scripts, fixing unexpected
failures and subsequent FastCGI problems when run under mod_fastcgi.
mod_webkdc now requires that the return URL in a request token be
absolute URL and not contain any non-ASCII characters. The latter
check avoids error messages and later problems with WebLogin template
processing.
Fix the WebLogin replay detection logic to not attempt to trigger
during password changes, which do not have request tokens.
Work around problems with WebLogin parsing of the XML returned from
the WebKDC when a user attempts an authentication using a non-ASCII
principal name. This results in invalid XML that XML::Parser cannot
parse. The proper fix is to catch this on the WebKDC side, but, as an
interim measure, replace non-ASCII characters in the WebKDC reply with
periods so that reply processing can continue.
Improve error reporting of unparsable XML received by the WebLogin
server from the WebKDC.
Fix logging of mod_webkdc <requestTokenRequest> failures.
Fix the webauth/webkdc.h header prototype for webauth_user_validate to
correctly allow the user state parameter to be NULL.
Log (at the info level) whenever mod_webkdc ignores expired
webkdc-factor or webkdc-proxy tokens passed to <requestTokenRequest>.
Display more correct errors after less common failures during the
second step of a multifactor login.
Correctly diagnose a missing service token in a WebLogin request and
return the correct error page rather than an internal error.
All Perl modules now have a version that matches the release of
WebAuth from which they came, with zeroes added so that the version
numbers will sort properly. For example, the version number of each
Perl module included in WebAuth 4.5.4 is 4.0504.
Update to rra-c-util 4.9:
* Improve robustness of the Perl test scripts.
Update to C TAP Harness 2.2:
* bail and sysbail now exit with status 255 to match Test::More.
WebAuth 4.5.3 (2013-05-15)
SECURITY: Reset all header contents between WebLogin requests, fixing
problems introduced in WebAuth 4.4.1 when WebLogin began using a
persistent CGI::Application object with FastCGI. WebLogin
installations that used FastCGI and the $REMUSER_REDIRECT setting in
webkdc.conf could fail with infinite redirect loops or leak security
information, such as single sign-on cookies, from one authenticated
user to another. (CVE-2013-2106)
WebAuth 4.5.2 (2013-05-14)
WebLogin now supports preserving the remember_login setting on the
login page after a failed authentication, instead of resetting the
checkbox to the default. Taking advantage of this support requires
local template changes. See the sample login.tmpl file for an example
of how to write the template.
Fix clearing of account authentication attempts (for lockout)
following a successful authentication.
Fix setting cookies on the WebLogin error page so that single sign-on
cookies are still correctly created.
WebLogin no longer erroneously clears single sign-on and persistent
factor cookies when redirecting the user to test for session cookie
support.
WebAuth 4.5.1 (2013-05-01)
Fix bugs in the remember_login feature introduced in WebAuth 4.5.0
that would cause WebLogin to discard all single sign-on cookies in the
default configuration and many other common situations. WebLogin
should now reliably respect the value sent by the form, and should
retain single sign-on and persistent factor cookies in situations
where there is no opportunity for local templates to send a default
setting.
Sites that wish to add the new UI element to the login page that
allows the user to control whether single sign-on cookies are created
will need to preserve the remember_login setting as a hidden form
variable in any local confirm, multifactor, and pwchange templates.
See the sample templates for examples.
The remember_login setting is now preserved through a forced password
change due to an expired password. This, as with all the
remember_login changes, requires updates to any local templates.
WebLogin now passes any user information message returned by the user
information service to the confirm template as well as the multifactor
authentication template. This allows the <userinfo> element in the
user information service reply to be used to pass arbitrary
information to the end user through the WebKDC and WebLogin
components.
Avoid re-creating WebAuth cookies other than single sign-on cookies
during WebLogin cookie processing, which fixes some corner-case bugs
when the WebLogin server and WAS are on the same host.
Fix a few minor bugs in the installable mod_webauth test suite.
WebAuth 4.5.0 (2013-04-26)
The change in interpretation of WebAuthForceLogin introduced in 4.4.0
has been reverted, and WebAuthForceLogin once again requires that the
user perform an authentication that results in a login token (either
password or OTP). This seems more generally useful than making this
directive largely redundant with WebAuthRequireSessionFactor. Add a
caution in the documentation explaining that this will not work well
with authorization identities in most environments.
WebLogin now supports login form templates that allow the user (or the
template) to indicate whether single sign-on cookies (and any
persistent factor cookies) should be retained after authentication.
The fallback, if the HTML form doesn't send a value, is controlled by
the new $REMEMBER_FALLBACK configuration option. The default is to
not do single sign-on, but the default login template sets the form
parameter to enable single sign-on. This will require template
updates when upgrading. If configured not to set single sign-on
cookies, WebLogin will only retain single sign-on cookies and
persistent factor cookies long enough to complete the login process
and will then discard them, reducing the risk of theft of
authentication tokens when someone walks away from an untrusted
computer.
Fix password change handling in WebLogin, which has been broken since
4.4.0 due to code changes for handling account lockout. Also fix
reporting of the reason for a rejected password change, which has been
broken since WebAuth 4.3.0.
Apache 2.4 error logging has been fixed for all modules to properly
indicate the module name originating the message.
mod_webauth and mod_webkdc will now produce significantly better
Apache error log messages with more context and details about the
failure.
Initial multifactor no longer satisfies a random session multifactor
requirement, correcting a long-standing bug in random multifactor
handling.
mod_webauthldap supports a new WebAuthLdapOperationalAttribute
directive that is the same as WebAuthLdapAttribute but searches the
directory for operational attributes and adds them to the environment.
Patch from William Orr.
WebLogin no longer supports obtaining the password expiration from a
kadmin-remctl backend with a direct remctl call. Instead, it uses the
password expiration time returned by the WebKDC, which in turn gets it
from the user information service.
A new WebAuth confirmation page template variable is available,
expire_timestamp, which includes the timestamp (in seconds since UNIX
epoch) when the password will expire. This should be used instead of
the old (and now deprecated) expire_date variable since it allows the
time information to be localized. See the example confirm.tmpl file
to see how to format this using Perl's Time::Duration module.
The WebKDC and WebLogin now support persistent cookies that add
additional authentication factors to a successful authentication.
This can be used to require multifactor authentication only from
browsers that have not previously completed a multifactor
authentication (similar to "remember this device" in various web
services). The additional factors are stored in a new webkdc-factor
token type and a new webauth_wft cookie. A persistent factor cookie
is created when the user information service validation call for an
OTP authentication returns a list of persistent factors. The
validation service can indicate the lifetime of the cookie. The
cookies will be re-encrypted in the current WebKDC private key on each
interaction with WebLogin to prevent them from becoming invalid due to
key rotation (although this does mean that they will become invalid
over long periods of inactivity).
The user information service can invalidate all persistent factor
tokens created before a particular timestamp by including an
<valid-threshold> element in the userinfo reply.
WebLogin supports optionally warning the user when persistent factor
tokens are about to expire. See the generic confirmation page
template for an example of how to do this. The warning threshold can
be configured in /etc/webkdc/webkdc.conf.
When the WebKDC calls the user information service, it now provides,
as an additional parameter, the current initial authentication factors
for the user. This can be used by the user information service to
decide whether or not to require a multifactor authentication. This
is most useful in combination with persistent factors; for example,
the user information service can require multifactor authentication if
the user didn't present a persistent factor token for the "d" (device)
factor, indicating that device had previously authenticated with
multifactor.
In addition to requiring a multifactor authentication, the user
information service can now add a specific list of factors that will
be required for this authentication. The user will be required to
provide the union of this list and the list of factors requested by
the WebAuth Application Server. Contributed by Benjamin Coddington.
The user information service can return a message to WebLogin for
display in the multifactor authentication page. One possible use is
for the user information service to tell the user why a multifactor
authentication is required. Contributed by Benjamin Coddington.
The user information service (with both the userinfo and validate
calls) can return an opaque login state string, which is passed to
WebLogin and from there to the multifactor login template. The
template can set the login state as a form variable and pass it back
to the user information service validate function. This allows for
multistep multifactor authentication using serialized data, allowing
implementation of (for example) resynchronization of a hardware token.
Contributed by Benjamin Coddington.
The user information service can now add factors to the user's
authentication if the user successfully completed an interactive
authentication (defined as one that involved WebLogin sending a login
token, which in practice means an OTP or password authentication).
The new "h" (human verification) factor has been added to the factor
list for this purpose and counts as an additional factor for the
purposes of satisfying multifactor. The intended use of this feature
is to allow a local support desk to verify someone's identity out of
band and then bless their authentications for a certain length of time
as satisfying multifactor even if they've forgotten their second
factor.
WebLogin and the multifactor authentication template now receive a
list of which factors the user must provide but has not already
provided, rather than a complete list of required factors. This is
used to provide a better value for the factor_type template parameter
for the multifactor login template. Contributed by Benjamin
Coddington.
WebLogin can now tell the WebKDC what type of OTP was used for a
multifactor authentication, if it knows, and the WebKDC will pass that
information to the user information service validate call.
Contributed by Benjamin Coddington.
The user information service can now indicate the expiration time of a
webkdc-proxy token created via an OTP authentication by including an
<expiration> element in its reply.
Errors contacting the user information service are now logged to the
Apache error log by mod_webkdc even if it is configured to ignore
those errors and continue as if no user information service is
availabe.
webauth_factors is now a private data structure with a much richer C
API for manipulating sets of factors. Several other internal APIs,
particularly the ones related to the WebKDC login process or the user
information service, take opaque webauth_factors structs instead of
APR lists of factors.
mod_webkdc no longer supports obtaining proxy tokens with
<getTokenRequest>. This was never used by WebAuth code and is
conceptually useless.
The WebKDC login API now expects encrypted token strings rather than
decrypted token structs as input and returns the error code, whether a
protocol error or an internal error, rather than using a separate
field in the response struct.
Diagnose undef arguments to various Perl WebAuth module functions
implemented in XS and throw exceptions rather than segfaulting from a
NULL pointer dereference.
Fix compilation error with Heimdal Kerberos libraries, introduced in
WebAuth 4.4.0.
Update to C TAP Harness 2.1:
* runtests now treats the command line as a list of tests by default.
* The full test executable path can now be passed to runtests -o.
* Improved harness output for tests with lazy plans.
* Improved harness output to a terminal for some abort cases.
* Flush harness output after each test even when not on a terminal.
WebAuth 4.4.3 (2013-03-12)
Fix a coding error in the WebAuthTrustAuthzIdentity directive parsing
that also enabled WebAuthDoLogout for the same scope.
If the user asserts an authorization identity equal to their
authentication identity, discard the authorization identity in the
WebKDC login process and continue as if they did not choose an
authorization identity. This fixes a previously fatal error when the
user selects their default identity in WebLogin (if, for example, they
are trying to undo a previous choice of authorization identity).
Thanks to Benjamin Coddington for the report.
Remove an arbitrary limit in mod_webauthldap on the number of values
from a multivalued LDAP attribute that are put in the environment.
Previous versions would only add the first 127 values, but there are
some cases where one may want to see more values than that. This
opens the possibility of overflowing the allowed size of the
environment, but the maximum environment size is quite large on most
modern operating systems.
Fix syntax error in the replay condition in the default WebLogin error
template.
Ignore empty app cookies rather than logging an error saying they
cannot be parsed. These are created internally by mod_webauth to
remove expired cookies and may be seen by subqueries.
Log a more informative message in mod_webauth when the user's app
cookie has expired instead of a generic parse error and downgrade it
to the info level from error.
Stop logging the raw binary app token in mod_webauth when it cannot be
decoded. This was old debugging code left over from fixing a problem
in a much earlier version of WebAuth.
WebAuth 4.4.2 (2013-02-05)
Fix an occasional WebKDC crash (introduced in 4.4.0) when attempting
to determine if an authentication is interactive.
Fix out-of-tree builds with --enable-webkdc. Some of the logic to
ensure the Perl modules could build when the build directory was not
the source directory had not been tested for a while.
WebAuth 4.4.1 (2013-01-31)
Add a new authenticate callback to the WebLogin configuration. If
this function is present in webkdc.conf, it will be called for every
user visit to WebLogin and may return the user's authentication
information or an empty list to defer to normal handling. This can be
used to extract authentication information from the full WebLogin
environment; for example, it could map information about a successful
client-side certificate authentication to an authentication identity.
When run under FastCGI, the WebLogin scripts now use a persistent
CGI::Application object instead of recreating it for each query. This
avoids reinitializing the Template Toolkit and reopening memcached
connections for each query.
WebLogin and the WebAuth Perl bindings are now built with
Module::Build instead of ExtUtils::MakeMaker. This should be
transparent to anyone not working with the source code, but
Module::Build and ExtUtils::CBuilder are now required to build the
WebLogin code. They are included in Perl 5.10 or later and can be
installed separately for older versions of Perl.
WebAuth 4.4.0 (2012-12-19)
The WebKDC and WebLogin server now support allowing a user to assert
an authorization identity other than their own identity. This can be
used to allow a user to access a test account on a particular WebAuth
Application Server, pretend to be another user for testing or
administrative reasons, or otherwise use an identity other than their
own. This support is disabled by default; to enable it, set the
WebKdcIdentityAcl Apache directive to the path to an ACL file
describing acceptable combinations of authentication and authorization
identities for each site. See the WebKdcIdentityAcl documentation in
the mod_webkdc manual for more information. Updates to the confirm
and possibly the login templates in WebLogin will also be required.
See the sample templates for the new parameters and fields.
mod_webauth by default ignores the new authorization identities (and
old versions will always ignore them) except for recording the
authorization identity in the new environment variable
WEBAUTH_AUTHZ_USER. There is a new mod_webauth Apache directive,
WebAuthTrustAuthzIdentity, which can be enabled to set REMOTE_USER to
the authorization identity instead of the authentication identity and
to use the authorization identity for access control (such as
mod_webauthldap privilege group lookups). WEBAUTH_USER will always be
set to the authentication identity. This directive is allowed in
.htaccess files (if authentication overrides are allowed) as well as
anywhere in the main Apache configuration. Authorization identities
will still be ignored if WebAuthSubjectAuthType is set to krb5.
Add new mod_webkdc Apache directive WebKdcLoginTimeLimit, which
controls the time limit for completing a multi-step login process
(such as with multifactor authentication) and how recently
authentication must have occurred to count for session factors and
forced login. The default value is five minutes, matching the
previous default behavior for multifactor logins.
WebAuthForceLogin no longer forces re-entry of the user's password if
the user has done an interactive authentication within the
WebKdcLoginTimeLimit interval (five minutes by default). Initial
authentication factors also count as session factors for single
sign-on authentications within that time interval. This allows
WebAuthForceLogin to work in combination with other features such as
multi-step authentication processes and authorization identities and
improves the user experience when simultaneously visiting multiple
sites with forced login set. To disable this behavior and always
force reauthentication, WebKdcLoginTimeLimit can be set to 0s, but
this will make multi-stage login processes, such as multifactor,
impossible.
Add replay detection to WebLogin. When enabled, only one username and
password authentication is permitted with a given request token, and
further authentications with the same request token are rejected as
replays. This can protect against an attacker using the back button
in an abandoned browser to replay the form submission on the WebLogin
server. This support requires a memcached server be available for
data storage and the Perl modules Cache::Memcached and Digest::SHA.
The latter is available as part of Perl since 5.9.3.
Add rate limiting of login attempts in WebLogin. If enabled, after a
configured number of failed login attempts, all password
authentications for a given username will be rejected (valid or not)
until a configurable interval of time has passed. This support also
requires a memcached server for data storage and the Perl module
Cache::Memcached.
The WebLogin error template has two new parameters: err_lockout and
err_replay, corresponding to a replayed authentication and an account
that was locked out due to too many login failures. Local templates
should be updated to handle those parameters, particularly if either
of these features are in use.
In WebLogin, set single sign-on cookies if present even when
displaying an error. This establishes single sign-on when errors are
returned after authentication, such as authentication rejected errors
from the user information service. Without this behavior, if the
custom error sent the user to another page that also required
authentication, the user would have to log in again and may given up,
thinking that authentication was looping.
Support two additional WebLogin configuration settings:
@REMUSER_LOCAL_REALMS and @REMUSER_PERMITTED_REALMS. These provide
the equivalent of WebKdcLocalRealms and WebKdcPermittedRealms for
Apache REMOTE_USER authentication handled by the WebLogin front-end
(such as when using Negotiate-Auth with mod_auth_kerb). Previously,
there was only a @REMUSER_REALMS setting, which combined both
meanings. @REMUSER_REALMS continues to be supported for backward
compatibility, but will only be used if the more-specific variable is
not set. Patch from Tom Jones.
Fix encoding of Kerberos credentials containing addresses or authdata
when built against MIT Kerberos. WebAuth 4.3.0 and later would fail
to encode those credentials properly. This bug only affects people
using credential delegation with either Active Directory or with
Kerberos configured to add addresses to tickets, which are relatively
rare configurations.
Fix encoding of ticket flags with Heimdal Kerberos and tolerate the
old, incorrect encoding. All previous versions of WebAuth, when built
with Heimdal, encoded the ticket flags on the wire with the flag bits
reversed (matching the in-memory Heimdal format). Prior to this
version, flags would be lost when reading credentials encoded via MIT
Kerberos with Heimdal or vice versa. As of this release, the portable
flag encoding used for ticket caches is used when writing credentials
with both MIT and Heimdal, and the flag order is detected when
decoding credentials and fixed if necessary. If you use delegated
credentials and link with Heimdal Kerberos, upgrade mod_webauth prior
to upgrading the WebKDC to ensure the ticket flags are conveyed
correctly.
Fix mapping of WebKDC error codes to names when reporting errors in
WebLogin, fixing mostly cosmetic Perl warnings in the WebLogin server
logs.
Document the WebAuthRequireSSL configuration directive. Under normal
circumstances, this directive should always be left on (the default)
to avoid serious security vulnerabilities, but there are some specific
situations where it may be necessary to turn it off.
Add webauth_token_encrypt and webauth_token_decrypt to the public API,
including the Perl API. These functions provide access to the
low-level token encryption and decryption routines. Normally, the
high-level webauth_token_{encode,decode} functions will be used
instead, but these functions are useful for constructing low-level
tests.
The webauth_base64_* functions have been removed from libwebauth, as
have the corresponding Perl bindings. For C programs, use the
apr_base64_* functions from APR-Util instead. For Perl programs, use
MIME::Base64.
The webauth_attr_*, webauth_attrs_*, and webauth_hex_* functions have
been removed from libwebauth, as have the corresponding Perl bindings.
These functions provided a low-level interface to internal WebAuth
data structures that is no longer necessary.
Remove webauth.h. The only remaining contents of interest to clients
were the WebAuth protocol error constants, which have now moved to
webauth/tokens.h.
Add public webauth_keyring_encode and webauth_keyring_decode functions
that encode and decode keyrings into the serialization format used for
storing them in files. These are useful for sending WebAuth keyrings
over other protocols. Add a corresponding keyring_decode method to
the Perl WebAuth class and encode and decode methods to the
WebAuth::Keyring class.
The WA_TK_*, WA_TT_*, and WA_SA_* preprocessor constants are no longer
provided by webauth.h. These contained a subset of the encoding rules
for the WebAuth wire protocol, but were not really useful to clients
of the library.
The WA_ERR_KEYRING_* error codes have changed to WA_ERR_FILE_* and
will be used for any errors inside the WebAuth library when reading or
writing to files. Now that WebAuth can report rich error messages,
there is no need for the codes to be this specific. Add new
WA_ERR_FILE_NOT_FOUND error, which replaces WA_ERR_KEYRING_OPENREAD
when the error is due to the file not existing.
Update to rra-c-util 4.7:
* Fix probing for Heimdal's libroken to work with older versions.
* Checked asprintf variants are now void functions and cannot fail.
* Include a replacement strndup for systems that don't have it.
WebAuth 4.3.3 (2012-11-05)
Fix a memory initialization issue in the WebKDC that could cause
incorrect handling of random multifactor verification, including
requiring random multifactor when the WebAuth Application Server
didn't request it.
Fix a memory allocation error in the WebAuth Perl module that could
cause memory corruption in the WebLogin server.
WebAuth 4.3.2 (2012-09-27)
Fix a pool management bug when mod_webauth requested a service token
from the WebKDC. A premature release of an APR memory pool could
result in a corrupted Kerberos authenticator, resulting in an
inability to obtain new service tokens.
WebAuth 4.3.1 (2012-08-08)
Allow WebAuthDoLogout in .htaccess files with AllowOverride
AuthConfig. Previously, WebAuthDoLogout could only be set in the
Apache server configuration.
Fix invalid free in webauth_webkdc_login when there are permitted
realms configured.
Add a replacement for krb5_cc_get_full_name for Kerberos libraries
that don't have this function. Fixes compilation against MIT Kerberos
1.8 and earlier.
Fix incorrect Perl module includes in pwchange.fcgi that prevented the
WebLogin password change component from starting properly.
Add an overloaded cmp operator for WebAuth::Exception, primarily to
make testing easier.
Document that while WebAuthLdapKeytab can be set in either the main
server configuration or in a virtual host, separate configurations for
different virtual hosts are not supported due to the way the module is
currently implemented.
WebAuth 4.3.0 (2012-08-06)
mod_webauth now sets the HttpOnly flag on all WebAuth session cookies
by default. This can be turned off at the server or virtual host
level with the new WebAuthHttpOnly Apache directive. (Although be
aware that the structure of the WebAuth cookies is an internal
implementation detail; if this directive is needed, the web site is
probably doing something unsupported.)
WebLogin now sets the HttpOnly flag on the single sign-on cookie, and
on the test cookie used to probe whether cookies are supported.
Add a new optional <userMessage> element to the specification of the
<requestTokenResponse> reply from the WebKDC and a new error code.
These are used to indicate a rejected authentication and to return an
HTML error that should be displayed to the user.
Support a new <error> return element inside the <authdata> reply from
the user information service during WebLogin authentication. Presence
of this element indicates that the user information service has
rejected this authentication. The content is raw HTML content (which
should be protected by a CDATA block in the XML) to display to the
user. Make appropriate changes to the webauth_user_info and
webauth_webkdc_login APIs and to mod_webkdc to return this information
via the new <userMessage> element and the new protocol error code.
Add a new parameter, err_html, to the error page template in WebLogin.
When this parameter is set, the contents should be used as the entire
error message to display to the user. Local WebLogin error templates
should be updated to support this parameter.
Fix wa_keyring compilation error when older versions of the WebAuth
headers are installed in the APR header path.
Change all Kerberos functions in the WebAuth library API to take the
WebAuth context and use APR memory management and new-style error
message handling. There is a new include file, webauth/krb5.h, for
the Kerberos functions. Remove webauth_krb5_error_code and
webauth_krb5_error_message in favor of the new-style error handling.
Call the proper Kerberos error reporting functions to get more
information than was available via com_err.
Replace webauth_krb5_export_ticket and webauth_krb5_export_tgt with a
new webauth_krb5_export_cred function that is parallel to
webauth_krb5_import_cred and can do either operation. Similarly,
merge webauth_krb5_init_via_cred and webauth_krb5_import_cred into
webauth_krb5_import_cred.
Rename webauth_krb5_rd_req to webauth_krb5_read_auth and
webauth_krb5_mk_req to webauth_krb5_make_auth. Rename the _with_data
variations of both to _data.
Remove webauth_krb5_keep_cred_cache. This was no longer used anywhere
in the WebAuth source.
Revise the Perl API for Kerberos-related functions to match the
changes to libwebauth, including changes of method names and removal
of now-unused functions, and complete the conversion to an
object-oriented interface. A WebAuth::Krb5 object is now returned by
the krb5_new method, and all other Kerberos functions are now
implemented as methods on that object.
Fix decoding of Kerberos credentials that include a second ticket when
built with MIT Kerberos.
Kerberos realm names are no longer escaped before matching them
against the Apache configuration. This only affects handling realm
names with unusual characters.
WebAuth 4.2.2 (2012-07-19)
Fix WebKDC::WebRequest error introduced in 4.2.0 that broke WebLogin
functionality.
Fix Kerberos context cleanup bug after storing delegated credentials
in a file cache, introduced in 4.2.0. This bug would cause segfaults
in the child Apache process after completion of the request.
WebAuth 4.2.1 (2012-07-18)
Fix error decoding keyrings from files on 64-bit systems, preventing
all use of keyring files. Reported by Kai Lanz.
Fix compilation with Apache 2.0, which does not have the mod_auth.h
header. Reported by Kai Lanz.
WebAuth 4.2.0 (2012-07-13)
Port to Apache 2.4 (tested with Apache 2.4.1).
Support for AuthType StanfordAuth has been deprecated and will be
removed from mod_webauth and mod_webauthldap in a subsequent release.
Support for AuthType StanfordAuth in mod_webauthldap is not available
when built with Apache 2.4. This includes treating "require group"
directives where the group contains a colon as "require privgroup" and
setting the SU_AUTH_DIRMAIL, SU_AUTH_DIRNAME, and SU_AUTH_UNIVID
environment variables. This behavior is currently still supported for
now when built with Apache 2.2 or earlier, but is deprecated as
mentioned above.
Support Kerberos keyring ticket caches for passing delegated
credentials from mod_webauth to CGI and embedded code. Set possessor
permissions on Kerberos keyring tickets so that other processes
running as the same UID should not have access. Patch from Benjamin
Coddington.
Fix merging of mod_webkdc Apache directives in some corner cases where
the directive has a default value or is explicitly set to off.
WebLogin now only sets a SIGTERM handler to defer exit while
processing a request. This will hopefully fix orphaned login.fcgi and
pwchange.fcgi processes due to SIGTERM arriving while waiting in the
FastCGI listen loop and then never being woken up again.
The WebAuth Perl module API now requires creating a WebAuth object
first and passing that object as the first argument to all other
functions except the krb5_* functions. This is the first step in
making the API more object-oriented. The only export groups provided
are :const and :krb5, and all other export requests should be removed.
All users will need code changes to work with the new API.
WebAuth::Krb5 has not yet been converted, but will be in a subsequent
release. This means that the WebKDC and WebLogin Perl modules in this
release require the WebAuth module from this release and vice versa,
so be careful of partial upgrades.
webauth_token_encode now correctly allows id tokens of type krb5 to
omit the subject attribute. The receiver is supposed to determine the
subject via the Kerberos authenticator.
All key and keyring functions in the WebAuth library API have changed
to take the WebAuth context and use APR memory management and
new-style error message handling. All the *_free functions have
therefore been removed. Keyrings are now represented by an APR array;
callers that want to walk through the keyring entries will need the
relevant APR headers. Functions that could only fail if memory
allocation failed now either return new objects directly or are
declared void, since APR code assumes memory allocation does not fail.
The API now uses named structs instead of typedefs.
webauth_key_create will now create a random key if passed NULL for the
key material. It also now returns a status code so that better error