You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "symphony-enrico (via GitHub)" <gi...@apache.org> on 2024/03/11 15:01:02 UTC

[I] eTag support [directory-scimple]

symphony-enrico opened a new issue, #534:
URL: https://github.com/apache/directory-scimple/issues/534

   Hello, I see that **If-None-Match** is supported well (if etag matches, an exception is throw), but **If-Match**, very useful for consistency of PUT operation, looks like not supported. 
   
   I wondering if the version read from **If-Match** header should be passed to Repository<ScimUser>#update (to delegate the implementation to check this - now there is a version field, but it seems initialized with 'ETag' header, not with If-Match one that would be for me much more logic), or if the framework itself, in case of update, should be at first call Repository<ScimUser>#get to check the etag matching, in completely transparent way from implementation.
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Re: [I] eTag support with If-Match [directory-scimple]

Posted by "symphony-enrico (via GitHub)" <gi...@apache.org>.
symphony-enrico commented on issue #534:
URL: https://github.com/apache/directory-scimple/issues/534#issuecomment-1991911558

   Hello @bdemers IMHO there is a really simple modification to do: 
   https://github.com/symphony-enrico/directory-scimple/commit/ba16b1e66c323756f9385302ab25b5b9129321d3
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Re: [I] eTag support with If-Match [directory-scimple]

Posted by "bdemers (via GitHub)" <gi...@apache.org>.
bdemers commented on issue #534:
URL: https://github.com/apache/directory-scimple/issues/534#issuecomment-1989049735

   Thanks for the report @symphony-enrico!
   
   ETag support for updates was pushed down to the repository level (the `ETag` header maps to the `version`) in the `Repository.update(...)` method.
   
   The intent was to allow Repository implementations to make more performant checks to see if the etag/version matches. Before #411, this was not the case. Which forced a (potentially expensive) call to `repository.get(id)` that was then used to calculate the version/etag.  Now implementations optimize this how they see fit, e.g. add an index row to a database containing a `version` field.
   
   As you mentioned, the current implementation may not be accurate (doesn't match for `If-Match` headers). If you have suggestions on how to improve this please let us know! (Either in this issue, or a PR!)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org