From 27c2a8ad11afa3ac9ae88a67d03d32ec6b3c1e9d Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:05:23 -0700 Subject: [PATCH] Add Serializable Compatibility to Web Authentication Exceptions Issue gh-16276 --- ...ingSecurityCoreVersionSerializableTests.java | 16 ++++++++++++++++ ...catedCredentialsNotFoundException.serialized | Bin 0 -> 16420 bytes ...n.rememberme.CookieTheftException.serialized | Bin 0 -> 10859 bytes ...rememberme.InvalidCookieException.serialized | Bin 0 -> 10861 bytes ...RememberMeAuthenticationException.serialized | Bin 0 -> 16357 bytes ...on.SessionAuthenticationException.serialized | Bin 0 -> 10753 bytes ...ication.www.NonceExpiredException.serialized | Bin 0 -> 16338 bytes ...thenticatedCredentialsNotFoundException.java | 7 ++++++- .../rememberme/CookieTheftException.java | 7 ++++++- .../rememberme/InvalidCookieException.java | 7 ++++++- .../RememberMeAuthenticationException.java | 7 ++++++- .../session/SessionAuthenticationException.java | 7 ++++++- .../www/NonceExpiredException.java | 5 +++++ 13 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFoundException.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.rememberme.CookieTheftException.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.rememberme.InvalidCookieException.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.session.SessionAuthenticationException.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.www.NonceExpiredException.serialized diff --git a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java index ecc30bd446a..5072da9f5c4 100644 --- a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java +++ b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java @@ -128,6 +128,12 @@ import org.springframework.security.saml2.provider.service.authentication.TestSaml2RedirectAuthenticationRequests; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken; +import org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFoundException; +import org.springframework.security.web.authentication.rememberme.CookieTheftException; +import org.springframework.security.web.authentication.rememberme.InvalidCookieException; +import org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException; +import org.springframework.security.web.authentication.session.SessionAuthenticationException; +import org.springframework.security.web.authentication.www.NonceExpiredException; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -328,6 +334,16 @@ class SpringSecurityCoreVersionSerializableTests { token.setDetails(details); return token; }); + generatorByClassName.put(PreAuthenticatedCredentialsNotFoundException.class, + (r) -> new PreAuthenticatedCredentialsNotFoundException("message", new IOException("fail"))); + generatorByClassName.put(CookieTheftException.class, (r) -> new CookieTheftException("message")); + generatorByClassName.put(InvalidCookieException.class, (r) -> new InvalidCookieException("message")); + generatorByClassName.put(RememberMeAuthenticationException.class, + (r) -> new RememberMeAuthenticationException("message", new IOException("fail"))); + generatorByClassName.put(SessionAuthenticationException.class, + (r) -> new SessionAuthenticationException("message")); + generatorByClassName.put(NonceExpiredException.class, + (r) -> new NonceExpiredException("message", new IOException("fail"))); } @ParameterizedTest diff --git a/config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFoundException.serialized b/config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFoundException.serialized new file mode 100644 index 0000000000000000000000000000000000000000..6d7a94c295056eecba83fa32183d38fbf96d17f0 GIT binary patch literal 16420 zcmeHOU5p&X5$-+Phix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`mr8&X!Y{XfuAOGDXU)P1dl_ncg-#RytQc(vyX6Yy$nK>augASt&A0^v> zko=bfhWf$}^lQfb>`(mIV=>p>O!vFvP literal 0 HcmV?d00001 diff --git a/config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.rememberme.InvalidCookieException.serialized b/config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.rememberme.InvalidCookieException.serialized new file mode 100644 index 0000000000000000000000000000000000000000..b4f3a5f6acc8e3b98177c470d27a6a4f79d5f1ea GIT binary patch literal 10861 zcmeGiTWlRib?hWg;x>sB@@kScB)v_bQ8!MVXX88^+esXpIQ4Z*X+zL>@A!J-y}O&; zxv?Ek1+*2SyxJnQs6_>dM*)>D3XMP@KAH-NA3*8{A0UK;Dv*$n_(KZeoSE6#*~h)U zCJ{g6XYTCGnRCvZbLPxBXYQMSCrhG`Jnn~8D+)r#t4@Zr#%BC*+KQN64;?;d&9DiJ z*7+3kxMNf9_?{KA8mmpPu*R$*?<#ejO26+)W&uLH_^p4uv*mj~pKd2)HY68s z1OKQZb(Zy|c+jNi^G|e)*x&e_Bz34MDccX3)d0_y#gBLY`JU>S#Ixx#y-F>YdR1$* z4jZo}dwcy89j7|?KJym|_<;mav-F#rTaRu!yycx7#Mo5m&(H~%z4z|Eorh+w|9TNw zJWQ6@v>q`|)(s=B-AHt|hCDn>R#X_Lj(e6x5v>B;8UwD(QEP{vBApSZ_VidtZGd>- zsT4>&G3bIYJq{?>M)e>F0U@hst|LymFy*IZX!p#SSkZ*&5ZBB%gTR@lJcy-7AKRnk?mYpCSlYUsEe28?qj>pc` z(a46$D%+(|H0;v~3(tXlB2P<)$;t|Y3EY1_&a2U7la9*_sLmSWQ+_2i;#cY^m=!fK zGS0#Xj8`C<4cZ848|7pX4FXP1HMOgQ0HST;vnPQtpi&q zHqeSoYZDb(0u93nEbZ$F0^o7M8)zT!&ROiSwavgDD~1 z2b%*Z9@c=#>(!$ys=M6eX20U5_rK!iwB(hOZH2t3X~oHM;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PfCrbP>m8|tZIz&{81FM#e zib|ET(hF`F}WqgMHW1-;HPP}VUg?bsfmCHulH%^SC zO*E70V&=dPVGc>vVAU6}>I)A?O2y7A*Et=_?$;`4LFhwrXHtSmi?Jo?rbsJ=MBV8K ztS0wZa4j697l25Kk~jfd9cP*JPDMc?EcR6ELS|c^d4Jiv``>!~FLXZ|ty4j2R+S7$ zFB}`7IgcjthIx%qkX3tmhf|MQfU?-0^o~dnwiI8>0G8VbMpCu{eJcSHkEzsQ63ur5 zAnvj?HihTVB4t>IFL^vpP)I+=0@iwqLfaKX0l|-L0=U;g$UL6{LgG!7Om9gUVhRa_ zb2%&=n}vEF1*{H$tpM9>1fD}7@e1jxL69ojjh_hwnZuJp#t3%pF7reQ6!t|jsL+U} z2jJy#%tZBMYPLICCHj327#s$WIe;UP3|L0{(JW`thp(dmiI)YjKb%0{BN>D^`Jo=2 z0O6F);$^f*7BRx3Hp1B)gvV_Jb%+MmlK^J`p0W|lU4X@p3chF~#11ov!P!~JvxO8= zW;wD5_hDQLVaR5&J_jN3utAC~Da1l15KbEkO%Ogd2&&|dpH*9i33EIjmKR(>)PF><^#aGz}CbBd0WXlf=R`qsb=4k;8lF35Bn|U_oq&#mMFD^)QaFO)f}i`3dOu-^z?R)o?1%X-{gu4 zl{g{k&jEe`@MfOi*Co;7Zj%Tbd%k8+APxrK{^jlSkK1JowsWyw$Xy#urnbZW1HE4dFy0Lc z^4>2k`YH7lSO!5A&(PNfFe8I7^+hi5nH8PzA*8t@#4;4-*a&8tF+y^h=Js7^QekSb z1O?IN14xw_O_GdMJVN^-fW-hyA_3897iQ48%y>I5WdQaG5Ps(_K$m8vM zJX(-;EbIg@X;G;6c{#@9wF@Tuh0YsEdV|vg0J4OW@RTvhGbbkuo-HJdLA3_}C8Bsb RSScoVY9So1OMXX2{|6t~g*E^H literal 0 HcmV?d00001 diff --git a/config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.session.SessionAuthenticationException.serialized b/config/src/test/resources/serialized/6.4.x/org.springframework.security.web.authentication.session.SessionAuthenticationException.serialized new file mode 100644 index 0000000000000000000000000000000000000000..5b627fb9c7a5b8ec33d00805b3af38c331b5982b GIT binary patch literal 10753 zcmeGiTZ|k>vG;7B?Q{IZulNzi&g4w6GCuqKj1Sw(-Pt~K_Bpp_15OB16KqMX#NC{ZjLVV%~2_eBpKKS4vP>6)Y7k@}5RCV|C^gMQN z51TK%AH6f()m7D1)zwwi^P_)|Wl>13_+ibAg3$456QNb7vwk>jM$~SE4x2Y;>9}b% z*d+CsV_VGeJs683{I7`ra%yyN&ZYr^{pr--_WkD7m%2L$nG4DBmPBknq-GO5JC;7( z^Ose%F@a~>lr>|SuI1It(FU+or;6a4pX)r^b?C}4mEAPC~edG@> zc90dHAe|F_Shv^^>2e*9UToCIX*f*Q+O8Ev!@gCe;YF|<Z(&V=~q)dezlQ;SzYHnS7?X^#}Um1B|=JLj4ZK&fRVE;?W)49x*~14AFNEG zs?gA}T<1FKe2hj6WW2w9U=zg#T5+xVc-1mM!>~7u!-s=_FLpI>NDd*lYZ*C)3_2db zc(&ui6QiMLxn_-eG_;r>nsq0#&9m|A0ENwf{funMcS_1D~ObO{e)*3+aumMb7%^syu!(}=*Ma40<)#TEIr8M=o-8OeIT!yrDRH9G|)wdB_f_#puZR6tz=Ixt#&U z*C+JVO=SQW*(z|2`aTo*hNK1S)5?4rSWXjJ4~C&1DxI#^U*+;P+rC$I@Z7N6GvHK5 zJPxE2;qGNEQi|8PF3Xz^en;~3NE4pQfiqMOT#%N0Qu;oqqq(Uh!gusxMmhym4X9)* zpmq4P9y~qlG45e#ec-$fg5{rsydzchLBFUpt;y7(CP*5D$BOm zp$B0?r{m4|)5_Aosgr%seV`D}0Ci~%e3Vy9BNFT1-D+3~rH_%7{InRi@J#GHaMbKE zdxgIP>K(^``qtz)iI*Sp+W)SFP6Y6K4WW|Q)LXwo@2HF&rq zW)Fe9Mf?K+LAFbhTOObjrB$6$?1o0$pp?+yn+yXfKkT2h9M6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z+`bDO$rAsstOp1jj8Z?fK&|tO%8xGg~>XY zEL35u)FYCHg>8vMJX(-;EbIg@X;G;6IXTAUwF@Tuh0g0qdV|yb0J4OW@RSM3Gbbku do^2$ILA4hEC8BsbSScoVY9So1OMXYj{|6jyeq{gv literal 0 HcmV?d00001 diff --git a/web/src/main/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedCredentialsNotFoundException.java b/web/src/main/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedCredentialsNotFoundException.java index d18e7c0cc2b..57767d815c5 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedCredentialsNotFoundException.java +++ b/web/src/main/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedCredentialsNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,15 @@ package org.springframework.security.web.authentication.preauth; +import java.io.Serial; + import org.springframework.security.core.AuthenticationException; public class PreAuthenticatedCredentialsNotFoundException extends AuthenticationException { + @Serial + private static final long serialVersionUID = 2026209817833032728L; + public PreAuthenticatedCredentialsNotFoundException(String msg) { super(msg); } diff --git a/web/src/main/java/org/springframework/security/web/authentication/rememberme/CookieTheftException.java b/web/src/main/java/org/springframework/security/web/authentication/rememberme/CookieTheftException.java index dabaedd8954..3a477e0c504 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/rememberme/CookieTheftException.java +++ b/web/src/main/java/org/springframework/security/web/authentication/rememberme/CookieTheftException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,16 @@ package org.springframework.security.web.authentication.rememberme; +import java.io.Serial; + /** * @author Luke Taylor */ public class CookieTheftException extends RememberMeAuthenticationException { + @Serial + private static final long serialVersionUID = -7215039140728554850L; + public CookieTheftException(String message) { super(message); } diff --git a/web/src/main/java/org/springframework/security/web/authentication/rememberme/InvalidCookieException.java b/web/src/main/java/org/springframework/security/web/authentication/rememberme/InvalidCookieException.java index 00668e06d88..d434bbc47b4 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/rememberme/InvalidCookieException.java +++ b/web/src/main/java/org/springframework/security/web/authentication/rememberme/InvalidCookieException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ package org.springframework.security.web.authentication.rememberme; +import java.io.Serial; + /** * Exception thrown by a RememberMeServices implementation to indicate that a submitted * cookie is of an invalid format or has expired. @@ -24,6 +26,9 @@ */ public class InvalidCookieException extends RememberMeAuthenticationException { + @Serial + private static final long serialVersionUID = -7952247791921087125L; + public InvalidCookieException(String message) { super(message); } diff --git a/web/src/main/java/org/springframework/security/web/authentication/rememberme/RememberMeAuthenticationException.java b/web/src/main/java/org/springframework/security/web/authentication/rememberme/RememberMeAuthenticationException.java index dc727efa921..a1fc8c4ee89 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/rememberme/RememberMeAuthenticationException.java +++ b/web/src/main/java/org/springframework/security/web/authentication/rememberme/RememberMeAuthenticationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ package org.springframework.security.web.authentication.rememberme; +import java.io.Serial; + import org.springframework.security.core.AuthenticationException; /** @@ -27,6 +29,9 @@ */ public class RememberMeAuthenticationException extends AuthenticationException { + @Serial + private static final long serialVersionUID = 7028526952590057426L; + /** * Constructs a {@code RememberMeAuthenticationException} with the specified message * and root cause. diff --git a/web/src/main/java/org/springframework/security/web/authentication/session/SessionAuthenticationException.java b/web/src/main/java/org/springframework/security/web/authentication/session/SessionAuthenticationException.java index db1650b3a9e..6ec0835f758 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/session/SessionAuthenticationException.java +++ b/web/src/main/java/org/springframework/security/web/authentication/session/SessionAuthenticationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ package org.springframework.security.web.authentication.session; +import java.io.Serial; + import org.springframework.security.core.AuthenticationException; /** @@ -31,6 +33,9 @@ */ public class SessionAuthenticationException extends AuthenticationException { + @Serial + private static final long serialVersionUID = -2359914603911936474L; + public SessionAuthenticationException(String msg) { super(msg); } diff --git a/web/src/main/java/org/springframework/security/web/authentication/www/NonceExpiredException.java b/web/src/main/java/org/springframework/security/web/authentication/www/NonceExpiredException.java index 8ac38137d03..6628a9e27a2 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/www/NonceExpiredException.java +++ b/web/src/main/java/org/springframework/security/web/authentication/www/NonceExpiredException.java @@ -16,6 +16,8 @@ package org.springframework.security.web.authentication.www; +import java.io.Serial; + import org.springframework.security.core.AuthenticationException; /** @@ -25,6 +27,9 @@ */ public class NonceExpiredException extends AuthenticationException { + @Serial + private static final long serialVersionUID = -3487244679050681257L; + /** * Constructs a NonceExpiredException with the specified message. * @param msg the detail message