-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What value does Idempotency Fingerprint add? #36
Comments
Unsolicited thoughts on fingerprinting: My team is doing an implementation of an idempotency system targeting rich clients (mobile apps and web SPAs, which can maintain their own idempotency protocol client implementations) and while compliance with a particular spec isn't our primary motivator, we implemented idempotency fingerprints for our use case (and were pleased to see them referenced in this document) so that we could provide a better experience for customers with fewer successful network round trips. Scenario:
Our hypothesis is that idempotency fingerprints are most useful for human-in-the-loop interactions with moderate to high risk of network partition. Most server-to-server idempotency scenarios can rely on the client not to change its mind about the operation wanting to be performed - the request payload is probably baked into a background job already alongside the idempotency key. For server-to-server idempotency protocols, we do not implement request fingerprinting for simplicity and to avoid many of the security risks I described in issue #40 just now. |
I get the impression this section is just describing a best practice and providing implementation guidance. I'm not opposed to implementation guidance in specifications, but I don't see how this is useful. At the very least I suggest the normative language ought to be removed (the "MAY" doesn't make any guarantees that any party would find useful, it just seems to be descriptive), and the section moved to an appendix. |
@darrelmiller We can expand the error scenarios section to cover the two scenarios you highlighted. Lmk what you think. Thanks. |
@sdatspun2 Having pondered this for a whole lot longer, I can imagine a scenario where a server wants to protect itself against badly written clients that send the same idempotency key but not the same request. According to RFC9110
So, in my opinion, the scenario @jmileham described is out of scope because if a user changes the input values, then the subsequent requests should not expect to be idempotent. I think clarifying that a server MAY use fingerprinting to help ensure that clients are using idempotency keys appropriately is reasonable guidance. I do have some concern about this suggestion in the text
This infers that a client should be allowed to change some elements of the request. I suppose as long as the second request captures the same user intent, so that regardless of whether the first or second request succeeds the outcome for the user is the same, then all is good. |
I second this. I would not expect a client to reuse the same idempotency key if the request is significantly changed. |
The document suggests this can be optionally be implemented by the resource. What is the value that it adds to the interaction? What would be the consequences of two requests with the same idempotency-key but different fingerprints? Or different idempotency-keys and the same fingerprints?
The text was updated successfully, but these errors were encountered: