Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Resources should be Serializable #129

Closed
thomasdarimont opened this issue Jul 29, 2015 · 9 comments
Closed

Resources should be Serializable #129

thomasdarimont opened this issue Jul 29, 2015 · 9 comments

Comments

@thomasdarimont
Copy link

Just played a bit with the osiam docker image.

After a restart of the tomcat server I see some exceptions in the log indicating that scim Users or Resources in general cannot be serialized which makes tomcat bark when it tries to serialize HttpSession contents.

I'd suggest that you make Resources serializable to avoid such problems.

SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.osiam.resources.scim.User
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.osiam.resources.scim.User
@wallner
Copy link
Member

wallner commented Jul 30, 2015

Hello Thomas,

we are aware of this problem but have so far refrained from implementing Serializable in our Resources because we are not yet sure if we are completely happy with them as they are, see for example the, well, problematic UpdateUser. We know that we have to make them serializable in the not so far future since we want to store them in a session, however implementing Serializable would add the binary representation to the public API of the classes. We had a few on and off discussions about that but never came to a final conclusion. Maybe now is the point to just go ahead and do it.

What do the others think?

@tkrille
Copy link
Member

tkrille commented Aug 2, 2015

we are aware of this problem but have so far refrained from implementing Serializable in our Resources because we are not yet sure if we are completely happy with them as they are

IMHO the current implementations of the classes are fine, with one exception: org.osiam.client.oauth.AccessToken. At this time OSIAM's access tokens are quite simple, maybe too simple for more advanced use cases. Moreover we are still planning to sign tokens, which would at least add a new field (signature). I don't know whether adding a field is considered safe in respect of @Serializable or not.

see for example the, well, problematic UpdateUser

I think we can neglect org.osiam.resources.scim.UpdateUser and org.osiam.resources.scim.UpdateGroup, because there's no sense in storing them in session or other datastore. They're only used when updating the corresponding resources with HTTP PATCH.

We know that we have to make them serializable in the not so far future since we want to store them in a session

We are already doing this: see addon-administration.

Maybe now is the point to just go ahead and do it.

For org.osiam.resources.scim.User and org.osiam.resources.scim.Group: 👍 let's do it!

For org.osiam.client.oauth.AccessToken: Should be discussed in another issue? At least @thomasdarimont only mentioned User and Resource in this issue.

@tkrille
Copy link
Member

tkrille commented Aug 4, 2015

@sputnik27 @dacrome ping

@tkrille
Copy link
Member

tkrille commented Aug 13, 2015

@osiam/owners Anyone got an opinion about this?

@fwilhe
Copy link
Contributor

fwilhe commented Aug 13, 2015

For org.osiam.resources.scim.User and org.osiam.resources.scim.Group: 👍 let's do it!

Since no one objected to this, I will do it.

@tkrille tkrille added this to the v1.5 milestone Aug 13, 2015
@fwilhe
Copy link
Contributor

fwilhe commented Aug 13, 2015

Shall we move the debate about org.osiam.client.oauth.AccessToken to another issue, merge #145 and close this one? Goes without saying that I'm in favor.

@tkrille
Copy link
Member

tkrille commented Aug 14, 2015

We should definitely create an issue for making org.osiam.client.oauth.AccessToken serializable: osiam/connector4java#155

@tkrille
Copy link
Member

tkrille commented Aug 14, 2015

For now, I don't see a consensus emerging. So let's wait until monday when @wallner is back and discuss this then.

@wallner
Copy link
Member

wallner commented Aug 17, 2015

I'm fine with makin the resources Serializable. I think they have proven stable by now. Please consider my comment on #145.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants