Tests Specification for OSCOAP

Table of Contents

  1. Notes
  2. Security Contexts
    1. Security Context A: Client
    2. Security Context B: Server
  3. Correct OSCOAP use
    1. GET test
      1. Test 1a
      2. Test 1b
      3. Test 2a
      4. Test 2b
      5. Test 3a
      6. Test 3b
    2. POST test
      1. Test 4a
      2. Test 4b
    3. PUT test
      1. Test 5a
      2. Test 5b
    4. DELETE test
      1. Test 6a
      2. Test 6b
    5. CoAP Error
      1. Test 7a
      2. Test 7b
  4. Incorrect OSCOAP use
    1. Security Context not matching
      1. TEST_8a
      2. TEST_8b
      3. TEST_9a
      4. TEST_9b
      5. TEST_10a
      6. TEST_10b
      7. TEST_11a
      8. TEST_11b
      9. TEST_12a
      10. TEST_12b
      11. TEST_13a
      12. TEST_13b
    2. Replay of a previously sent message
      1. TEST_14a
      2. TEST_14b
      3. TEST_15a
      4. TEST_15b
      5. TEST_16a
      6. TEST_16b
    3. Accessing an OSCOAP-protected resource without OSCOAP
      1. TEST_17a
      2. TEST_17b

1. Notes

CoAP Version is 1 in all the tests.

At the current state of these test specifications, the Base Key is not used.

2. Security Contexts

Security Context A: Client

Security Context B: Server


3. Correct OSCOAP use

3.1 GET Tests

3.1.1. Identifier: TEST_1a

Objective : Perform a simple GET transaction using OSCOAP, Content-Format and Uri-Path option (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.1.2. Identifier: TEST_1b

Objective : Perform a simple GET transaction using OSCOAP, Content-Format and Uri-Path option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including:

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

3.1.3. Identifier: TEST_2a

Objective : Perform a GET transaction using OSCOAP, Content-Format, Uri-Path, Uri-Query and ETag option (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld
  • Uri-Query : first=1

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.1.4. Identifier: TEST_2b

Objective : Perform a GET transaction using OSCOAP, Content-Format, Uri-Path, Uri-Query and ETag option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-path = /helloworld
  • Uri-Query : first=1

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • ETag with value 0x2b
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

3.1.5. Identifier: TEST_3a

Objective : Perform a GET transaction using OSCOAP, Content-Format, Uri-Path, Uri-Query, ETag, Accept and Max-Age option (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-path = /helloworld
  • Uri-Query : second=2
  • Accept = 0 (text/plain;charset=utf-8)

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.1.6. Identifier: TEST_3b

Objective :Perform a GET transaction using OSCOAP, Content-Format, Uri-Path, Uri-Query, ETag, Accept and Max-Age option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-path = /helloworld
  • Uri-Query : second=2
  • Accept = 0 (text/plain;charset=utf-8)

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including

  • Object-Security option
  • ETag with value 0x2b
  • Max-Age with value 0x05

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

3.2. POST Tests

3.2.1. Identifier: TEST_4a

Objective : Perform a POST transaction using OSCOAP, Content-Format, Location-path, Location-Query and Uri-Path option, creating a resource (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP POST request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /counter
  • Content-Format = 0
  • payload = 4a4a4a4a

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.2.2. Identifier: TEST_4b

Objective : Perform a POST transaction using OSCOAP, Content-Format, Location-path, Location-Query and Uri-Path option, creating a resource (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP POST request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /counter
  • Content-Format = 0
  • payload = 4a4a4a4a

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including

  • Object-Security option
  • Location-path = /counter
  • Location-Query : first=1
  • Location-Query : second=2

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

3.3 PUT Tests

3.3.1. Identifier: TEST_5a

Objective : Perform a PUT transaction using OSCOAP, Uri-Path and If-Match option (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP PUT request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /counter
  • Content-Format = 0
  • If-Match with value 0x5b5b
  • payload = 5a5a5a5a

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.3.2. Identifier: TEST_5b

Objective : Perform a PUT transaction using OSCOAP, Uri-Path and If-Match option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP PUT request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /counter
  • Content-Format = 0
  • If-Match with value 0x5b5b
  • payload = 5a5a5a5a

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including

  • Object-Security option

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

3.4. DELETE Tests

3.4.1. Identifier: TEST_6a

Objective : Perform a DELETE transaction using OSCOAP and Uri-Path option (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP DEL request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /counter

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.4.2. Identifier: TEST_6b

Objective : Perform a DELETE transaction using OSCOAP and Uri-Path option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP DEL request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /counter

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly

  • Object-Security option

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

3.5. CoAP Error

3.5.1. Identifier: TEST_7a

Objective : Perform a DELETE transaction on an non-existing resource using OSCOAP and Uri-Path option (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP PUT request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /error

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

3.5.2. Identifier: TEST_7b

Objective : Perform a DELETE transaction on an non-existing resource using OSCOAP and Uri-Path option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP PUT request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /error

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the error 4.04 response correctly

  • Object-Security option
  • payload (error message)

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

4. Incorrect OSCOAP use

4.1. Security Context not matching

4.1.1. Identifier: TEST_8a

Objective : Perform a GET transaction with non matching Client Sender - Server Recipient Keys (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client doesn't receive a response back

5

Verify

Client displays the received packet (if any)

4.1.2. Identifier: TEST_8b

Objective : Perform a GET transaction with non matching Client Sender - Server Recipient Keys (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

The message verification [6.3] fails and the server stops processing the message

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4.1.3.Identifier: TEST_9a

Objective : Perform a GET transaction with non matching Client Sender - Server Recipient IVs(Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client doesn't receive a response back

5

Verify

Client displays the received packet (if any)

4.1.4. Identifier: TEST_9b

Objective : Perform a GET transaction with non matching Client Sender - Server Recipient Keys (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

The message verification [6.3] fails and the server stops processing the message

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4.1.5. Identifier: TEST_10a

Objective : Perform a GET transaction with non matching Client Sender - Server Recipient Ids(Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client doesn't receive a response back

5

Verify

Client displays the received packet (if any)

4.1.6 Identifier: TEST_10b

Objective : Perform a GET transaction with non matching Client Sender - Server Recipient Keys (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

The message verification [6.3] fails and the server stops processing the message

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4.1.7. Identifier: TEST_11a

Objective : Perform a GET transaction with non matching Client Recipient - Server Sender Keys (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

The message verification [6.5] fails and the client stops processing the message

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

4.1.8. Identifier: TEST_11b

Objective : Perform a GET transaction with non matching Client Recipient - Server Sender Keys (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including:

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

4.1.9. Identifier: TEST_12a

Objective : Perform a GET transaction with non matching Client Recipient - Server Sender IVs (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

The message verification [6.5] fails and the client stops processing the message

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

4.1.10. Identifier: TEST_12b

Objective : Perform a GET transaction with non matching Client Recipient - Server Sender IVs (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including:

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

4.1.11. Identifier: TEST_13a

Objective : Perform a GET transaction with non matching Client Recipient - Server Sender Ids (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

The message verification [6.5] fails and the client stops processing the message

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

4.1.12. Identifier: TEST_13b

Objective : Perform a GET transaction with non matching Client Recipient - Server Sender Ids (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

4

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including:

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

4.2. Replay of a previously sent message

4.2.1. Identifier: TEST_14a

Objective : Perform a GET transaction using OSCOAP, Content-Format and Uri-Path option, request replayed by the Client (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the sequence number in the sent message
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

Client doesn't receive a response back

5

Verify

Client displays the received packet (if any)

4.2.2. Identifier: TEST_14b

Objective : Perform a GET transaction using OSCOAP, Content-Format and Uri-Path option, request replayed by the Client (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

The message verification [6.3] fails and the server stops processing the message

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the sequence number in the received message
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4.2.3. Identifier: TEST_15a

Objective : Perform a GET transaction using OSCOAP, Content-Format and Uri-Path option, response replayed by the Server (Correct Tid) (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

The message verification [6.5] fails and the client stops processing the message

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the sequence number in the received message
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

4.2.4. Identifier: TEST_15b

Objective : Perform a GET transaction using OSCOAP, Content-Format and Uri-Path option, response replayed by the Server (Correct Tid) (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /helloworld

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including:

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the sequence number in the sent message
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

4.2.5. Identifier: TEST_16a

Objective : Perform a GET transaction using OSCOAP, Content-Format and Uri-Path option, response replayed by the Server (Wrong Tid) (Client side)

Configuration :

client security context: Security Context A, with:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path : /change-tid

2

Check

Client serializes the request

3

Verify

  • Client displays the sent packet
  • (Optional) Client displays the external_aad for the sent message
  • (Optional) Client displays the COSE object for the sent message

4

Check

The message verification [6.5] fails and the client stops processing the message

5

Verify

  • Client displays the received packet
  • (Optional) Client displays the external_aad for the received message
  • (Optional) Client displays the COSE object for the received message

4.2.6. Identifier: TEST_16b

Objective : Perform a GET transaction using OSCOAP, Content-Format and Uri-Path option, response replayed by the Server (Wrong Tid) (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request protected with OSCOAP, including:

  • Object-Security option
  • Uri-Path = /change-tid

2

Check

Server parses the request and continues the CoAP processing (OSCOAP verification succeeds)

3

Verify

  • Server displays the received packet
  • (Optional) Server displays the Tid for the received message
  • (Optional) Server displays the external_aad for the received message
  • (Optional) Server displays the COSE object for the received message

4

Check

Server serialize the response correctly, including:

  • Object-Security option
  • Content-Format = 0 (text/plain)
  • payload

5

Verify

  • Server displays the sent packet
  • (Optional) Server displays the external_aad for the sent message
  • (Optional) Server displays the COSE object for the sent message

4.3. Accessing an OSCOAP-protected resource without OSCOAP

4.3.1. Identifier: TEST_17a

Objective : Perform a GET transaction without using OSCOAP to a protected resource, Content-Format and Uri-Path option (Client side)

Configuration :

client security context: Security Context A, with:

N/A

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request, including:

  • Uri-Path : /helloworld

2

Check

Client serializes the request

3

Verify

Client displays the sent packet

4

Check

Client parses the response and continues the CoAP processing (OSCOAP verification succeeds)

5

Verify

Client displays the received packet

4.3.2. Identifier: TEST_17b

Objective : Perform a GET transaction without using OSCOAP to a protected resource, Content-Format and Uri-Path option (Server side)

Configuration :

server security context: Security Context B, with:

server resources:

Test Sequence

Step Type Description

1

Stimulus

The client is requested to send a CoAP GET request, including:

  • Uri-Path : /helloworld

2

Check

The message verification [6.3] fails

3

Verify

Server displays the received packet

4

Check

Server serialize the response correctly, including:

  • Error code 4.01 Unauthorized
  • (Optional) Content-Format = 0 (text/plain)
  • (Optional) payload

5

Verify

Server displays the sent packet