Hasini,
+1 for option 4 (ignoring read-only). I usually like to err on the side of the client being able to be dumber and the server being able to cope with this. Read-only attributes would fall into the category. Along these same lines, if the client omits read-only attributes, I don’t think the server should complain since it is in charge of these values.
Maybe servers could return an error if the id in the PUT/PATCH doesn’t match the id in the URL or if meta.version doesn’t match one of the ETag request headers. Otherwise, I think the server should be tolerant.
I’d be interested to hear if any REST purists have an opinion on this, though.
--Kelly
Great question! Let’s nail this down. 4 is easier to implement on the client side for me. I am guessing 5 is easier to implement on the server side…
-J
From: cloud-d...@googlegroups.com [mailto:cloud-d...@googlegroups.com] On Behalf Of Hasini Gunasinghe
Sent: Thursday, April 12, 2012 8:11 AM
To: cloud-d...@googlegroups.com
Subject: Sending read-only attributes in Update (PUT) request
Hi,
As a client guy I'd selfishly like to see the spec say that the server will
gracefully ignore any r-o attributes that were submitted.
-J
One thing that could be worth thinking about is, should server return
an error if client has changed a read-only attribute.
//Samuel
Hasini,
I voted -1 on the 400-Bad Request response as it complicates client response processing. I would prefer stronger language that the server MUST NOT consider the upload of read-only attributes an error and MUST NOT return a 400 or other error when this happens.
If I receive a 400 on the client side I then need to post-process the response to determine if I am getting an error on something I should be changing vs. something the server is going to ignore.
I’m wondering if anyone has strong arguments in the other direction.
-Jeremy
Could we just not decide what to do in this situation? ( ie not put it in the SCIM specs)It's up to each implementer to determine what he wants to do:- Reject the query with error- Reject the query silently (bad for data integrity and synchronization of repositories but this is the choice of an implemeter, why not).- Accept the request partially.
So if a PUT request contains read only attributes these are just
excluded in the update, and the old once are keeped. With this
solution the service provider does not need to care if the clients
includes read-only attributes or not and further do not need to care
about clients trying change read-only attributes. this feels like a
more robust solution.
In response to the thoughts on not specifying these details, I think
that this kind of details could make interop harder if not specified.
Cheers
//Samuel
Thanks Kelly for pointing out that issue.. I haven't seen that before.Added a note on issue 56 that Issue 94 is also related.Thanks,Hasini.On Thu, May 17, 2012 at 6:49 PM, Kelly Grizzle <kelly....@sailpoint.com> wrote:
Thanks, Hasini. Some of this is covered in issue 56 (http://code.google.com/p/scim/issues/detail?id=56). I don’t mind splitting this into a separate issue, though, since 56 initially just dealt with the password attribute on PUT. Probably worth making a note in issue 56 that issue 94 is related.
--Kelly
From: cloud-d...@googlegroups.com [mailto:cloud-d...@googlegroups.com] On Behalf Of Hasini Gunasinghe
Sent: Wednesday, May 16, 2012 6:15 PM
To: cloud-d...@googlegroups.com
Cc: Scott Fehrman
Subject: Re: Sending read-only attributes in Update (PUT) request
FYI..