Skip to content
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

REPP support for stateful EPP? #56

Open
mwullink opened this issue Apr 30, 2024 · 4 comments
Open

REPP support for stateful EPP? #56

mwullink opened this issue Apr 30, 2024 · 4 comments
Labels
question Further information is requested

Comments

@mwullink
Copy link
Contributor

To help convince the EPP purists, we could look into keeping EPP stateful, the REST/HTTP layer would still be stateless.

The EPP applciation state would have to be kept by the client and NOT the server, maybe we can use JWT to encode the (limited) state that is required for an EPP session?
The EPP RFC5730 says nothing about where the state should be kept, so keeping it on the client would not be a problem.

What information is stored in an EPP session anyway?

The client could do a Login request (POST /login) and the response would be a standard greeting AND a JWT (HTTP header) the JWT would have to be sent to the server for each following request.

There is no way to invalidate a JWT, we just need recommend a sensible lifetime for it and the client must do a login again when the JWT is expired. ( Kind of an auto logout function)

@mwullink mwullink added the question Further information is requested label Apr 30, 2024
@pawel-kow
Copy link

Yes, this approach is doable, however not sure if this is not too much fitting a square peg into a round hole. There is some benefit of it that after /login the session context will be fix to the extensions in use. On the other end this was kind of interesting property of original REPP to be able to send each request with the extension set needed in the context by setting REPP-Svcs header. Not sure if super useful but I may imagine use-cases where this might be useful.

To the proposal:
Does it actually matter whether it is JWT or not? I guess this can be just any opaque value and it is an implementation detail of the server whether it is JWT. Kind alike any OAuth token.
Not sure if there are standard HTTP headers to pass on an authorization token with a response. Maybe the standard mechanism of cookies would fit better?

@mwullink
Copy link
Contributor Author

mwullink commented May 1, 2024

The reason why i'm asking the question, is because 1 of the main sticking points for the EPP folks seems to be that we change EPP from stateful to stateless. if we can convince them that EPP can remain stateful, then this might make it easier to get them to go along.

I figured a JWT would be perfect for the job of storing the application state because the JWT is designed to transmit information and authorization in a secure manner and they are easy to implement. we could use the JWT claims for static EPP session values that form the application state. The JWT is sent using the standard HTTP "Authorization" header.

What state does a EPP session normally keep anyway? besides the client session id, maybe the language?
the other stuff from the Login command does need to be saved in the session, the extensions used only need to be checked during login to see if they are supported.
https://datatracker.ietf.org/doc/html/rfc5730.html#section-2.9.1.1

Maybe cookies could also be an option, the main thing is that the state MUST be kept on the client side.

@pawel-kow
Copy link

I think there is a list of issues that would pose an incompatibility to EPP:

  • session management and login/logout incl. extension negotiation
  • XML representation for queries. Especially for GET requests using body is really not recommended if you want to stick to EPP in all request types
    • a part of this problem would be moving part of the requests to headers
    • ... and the redundancy of the data between the body and the headers and resource path
  • other media types like JSON

If you remove all this issues you will end up with Mario's proposal EPP over HTTP. So the real question is whether this is the goal of REPP.

And back to this issue - JWT can be a technical implementation, but the client does not need to interpret or introspect it in any way (it's issued by the server and processed by the server) so on the protocol level it can be opaque IMHO.

@mwullink
Copy link
Contributor Author

mwullink commented May 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants