You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "René Cordier (Jira)" <se...@james.apache.org> on 2020/03/09 08:56:00 UTC

[jira] [Updated] (JAMES-2888) Implement echo method

     [ https://issues.apache.org/jira/browse/JAMES-2888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

René Cordier updated JAMES-2888:
--------------------------------
    Description: 
https://jmap.io/spec-core.html#the-coreecho-method

In order to test that our infrastructure is correct for the new `jmap` package, you will need to implement a simple echo method that returns exactly the same arguments as it is given.

Request: 
{code:java}
{
  "using": [ "urn:ietf:params:jmap:core"],
  "methodCalls": [
    [ "Core/echo", {
      "hello": true,
      "high": 5
    }, "b3ff" ]
  ]
}
{code}



Response: 
{code:java}
{
  "methodResponses": [
    [ "Core/echo", {
      "hello": true,
      "high": 5
    }, "b3ff" ]
  ],
  "sessionState": "75128aab4b1b"
}
{code}

*DoD*: serving the echo method and add memory integration tests. 

We need to be careful also about the way we parse JSON for the echo method to not have potential attacks, and can write some tests about it as well (have a look at https://github.com/nst/JSONTestSuite for example).
You can investigate as well if it's possible to get a lazy json parsing with `JsonTransformers` of the `play-json` library.

  was:
Definition of done: The `memory-guice` application will ship a `jmap` server containing only the [core/echo|https://jmap.io/spec-core.html#the-coreecho-method] method.

A simple integration test demonstrating this will be written.

Note that 'protocol structure' (using, methodCalls) correction is **not included** in this ticket (will be fixed later).

To be performing this:

 - Create a new `server/protocols/jmap` project
 - Copy in it the minimal subset of classes from `server/protocols/jmap-draft`
 - Implement a EchoMethod
 - Implement guice bindings in `server/container/guice/protocols/jmap`
 - Load `JMAP guice module` within MemoryJamesServerMain
 - Write a simple integration test in `server/protocols/jmap-integration-testing` demonstrating the echo command behaviour.

        Summary: Implement echo method  (was: Bootstrap the JMAP server - echo command)

> Implement echo method
> ---------------------
>
>                 Key: JAMES-2888
>                 URL: https://issues.apache.org/jira/browse/JAMES-2888
>             Project: James Server
>          Issue Type: Sub-task
>          Components: JMAP
>            Reporter: Benoit Tellier
>            Assignee: Antoine Duprat
>            Priority: Major
>
> https://jmap.io/spec-core.html#the-coreecho-method
> In order to test that our infrastructure is correct for the new `jmap` package, you will need to implement a simple echo method that returns exactly the same arguments as it is given.
> Request: 
> {code:java}
> {
>   "using": [ "urn:ietf:params:jmap:core"],
>   "methodCalls": [
>     [ "Core/echo", {
>       "hello": true,
>       "high": 5
>     }, "b3ff" ]
>   ]
> }
> {code}
> Response: 
> {code:java}
> {
>   "methodResponses": [
>     [ "Core/echo", {
>       "hello": true,
>       "high": 5
>     }, "b3ff" ]
>   ],
>   "sessionState": "75128aab4b1b"
> }
> {code}
> *DoD*: serving the echo method and add memory integration tests. 
> We need to be careful also about the way we parse JSON for the echo method to not have potential attacks, and can write some tests about it as well (have a look at https://github.com/nst/JSONTestSuite for example).
> You can investigate as well if it's possible to get a lazy json parsing with `JsonTransformers` of the `play-json` library.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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