Kevin Risden created KNOX-1961:
----------------------------------
Summary: KnoxPamRealm and KnoxCacheManager are not compatible
Key: KNOX-1961
URL: https://issues.apache.org/jira/browse/KNOX-1961
Project: Apache Knox
Issue Type: Improvement
Reporter: Kevin Risden
KnoxPamRealm uses UnixUserPrincipal which is not serializable. If you try to
use it with KnoxCacheManager you end up with
{code:java}
2019-07-31 12:49:08,963 ERROR disk.DiskStorageFactory
(DiskStorageFactory.java:call(495)) - Disk Write of guest failed:
java.io.NotSerializableException:
org.apache.knox.gateway.shirorealm.UnixUserPrincipal
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at java.util.HashSet.writeObject(HashSet.java:288)
at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1140)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
{code}
Workaround: If using PAM auth with Shiro, do not set authentication caching.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)