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

JSON format for teep protocol #7

Closed
mcd500 opened this issue Feb 19, 2020 · 3 comments
Closed

JSON format for teep protocol #7

mcd500 opened this issue Feb 19, 2020 · 3 comments

Comments

@mcd500
Copy link
Collaborator

mcd500 commented Feb 19, 2020

Feedback from the SECIoT hackathon in Berlin.

These are the format I sued in our prototype in JSON for teep protocol.
The current draft has CBOR example and this is to helping to have JSON examples.

Device -> TAM, Empty HTTP

method: POST
url: /api/tam
httpVersion: 1.1
headers: {"pragma":"no-cache","cache-control":"no-cache","host":"example.com","origin":"http://192.168.11.3","connection":"close","accept":"application/teep+json","content-length":"0","content-type":"application/teep+json"}
body: 
empy

TAM -> Device, QueryRequest

status code: 200 OK
headers: HTTP/1.1 200 OK
Content-Type: application/teep+json
Content-Length: 36
Date: Wed, 19 Feb 2020 08:21:11 GMT
Connection: close
body: 
{"TYPE":1,"REQUEST":[2],"TOKEN":"1"}

Device -> TAM, QueryResponse

method: POST
url: /api/tam
httpVersion: 1.1
headers: {"pragma":"no-cache","cache-control":"no-cache","host":"example.com","origin":"http://192.168.11.3","connection":"close","accept":"application/teep+json","content-length":"139","content-type":"application/teep+json"}
body:
{ TYPE: 2,
  TOKEN: '1',
  TA_LIST: 
   [ { Vendor_ID: 'ietf-teep-wg',
       Class_ID: '3cfa03b5-d4b1-453a-9104-4e4bef53b37e',
       Device_ID: 'teep-device' } ] }

TAM -> Device, TrustedAppInstall

status code: 200 OK
headers: HTTP/1.1 200 OK
Content-Type: application/teep+json
Content-Length: 120
Date: Wed, 19 Feb 2020 08:21:11 GMT
Connection: close
body: 
{"TYPE":3,"MANIFEST_LIST":["http://192.168.11.5:3000/TAs/8d82573a-926d-4754-9353-32dc29997f74.ta.sign.enc"],"TOKEN":"2"}

Device -> TAM, GET TA

method: GET
url: /TAs/8d82573a-926d-4754-9353-32dc29997f74.ta.sign.enc
httpVersion: 1.1
headers: {"pragma":"no-cache","cache-control":"no-cache","host":"example.com","origin":"http://192.168.11.3","connection":"close"}
body:
empy

TAM -> Device, TA binary

status code: 200 OK
headers: HTTP/1.1 200 OK
Date: Wed, 19 Feb 2020 08:21:11 GMT
Connection: close
Content-Length: 202025
body: {"protected":"eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia2lkIjoiUDR3Z0tqXzZvQ3V6VkhtdlJ5NGpGbHZDSEVRWUZfb1F4THR0Xy1NWXV2YyJ9","encrypted_key":"kEpB8793QIt-TFUk-Jq_l
...
wUQFozDQtWPPXpZIcjlN2mym3FlIgDFymcde9CwdXMPCW8NrLTdWxYdhkleqW65y31O2KG5CTrqNjec7RZrQ6zLbadRZ407MycJs7MVCWb9G7tud80d9JE_yzdH606Bg","tag":"jJJ_quUxAdZwvzr0EsloZg"}

Device -> TAM, Success

method: POST
url: /api/tam
httpVersion: 1.1
headers: {"pragma":"no-cache","cache-control":"no-cache","host":"example.com","origin":"http://192.168.11.3","connection":"close","accept":"application/teep+json","content-length":"22","content-type":"application/teep+json"}
body: 
{ TYPE: 5, TOKEN: '2' }

TAM -> Device, Ack 204

status code: 204 No Content
headers: HTTP/1.1 204 No Content
Content-Length: 0
Date: Wed, 19 Feb 2020 08:21:12 GMT
Connection: close
body:
empy
@ko-isobe
Copy link
Contributor

ko-isobe commented Feb 19, 2020

TAM -> Device, TrustedAppInstall
{"TYPE":3,"MANIFEST_LIST":["http://192.168.11.5:3000/TAs/8d82573a-926d-4754-9353-32dc29997f74.ta.sign.enc"],"TOKEN":"2"}

MANIFEST_LIST is originally described with the SUIT format.
Be careful. (current @mcd500 and my implementation doesn't support SUIT temporarily)

@mcd500 mcd500 changed the title JSON examples JSON format for teep protocol Feb 19, 2020
@hannestschofenig
Copy link
Collaborator

Based on the consenus on the mailing list to remove the JSON-based encoding (see https://mailarchive.ietf.org/arch/msg/teep/sxgUNADXEtUTPwIDwspt_k9ZR6w/) I am closing this pull request.

@hannestschofenig
Copy link
Collaborator

The PR to remove the JSON/JOSE parts can be found here: #10

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

No branches or pull requests

3 participants