3 USP Record Test Cases
3.1 Bad request outside a session context
Purpose
The purpose of this test is to ensure the EUT correctly responds to a bad request outside a session context.
Functionality Tags
Mandatory
Test Setup
- Ensure the EUT is configured to not use a session context.
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
Test Procedure
- Send a malformed USP Record to the EUT.
Test Metrics
- The EUT either ignores the malformed record or sends a USP Record Error.
3.2 Agent Verifies Non-Payload Field Integrity
Purpose
The purpose of this test is to ensure the EUT verifies the integrity of the non-payload fields in a USP record.
Functionality Tags
‘Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)’
Test Setup
- Ensure the relevant equipment are configured to NOT provide integrity protection at the MTP layer.
- Ensure that the EUT and test equipment have the necessary information to send and receive USP records to each other.
Test Procedure
- Send a Get message to the EUT with a
payload_security
of PLAINTEXT.
Test Metrics
- After the EUT receives the USP record, it exhibits the expected ‘bad request’ behavior for the applicable MTP.
3.3 Agent rejects invalid signature starting a session context
Purpose
The purpose of this test is to ensure the EUT handles an attempt to
start a session context with an invalid mac_signature
.
Functionality Tags
‘Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)’
Test Setup
- Ensure that the EUT and test equipment have the necessary information to send and receive USP records to each other.
Test Procedure
- Send a TLS ‘client hello’ to the EUT to begin a session context as
described in ‘End to
End Message Exchange’ in TR-369 with an invalid
mac_signature
.
Test Metrics
- After the EUT receives the USP record, it exhibits the expected ‘bad request’ behavior for the applicable MTP.
3.4 Using TLS for USP Record Integrity
Purpose
The purpose of this test is to ensure the EUT uses TLS to validate
the integrity of USP records when the payload_security
is
TLS and the TLS handshake has completed.
Functionality Tags
‘Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)’
Test Setup
- Ensure the EUT and controller are configured to secure the USP record payload with TLS.
Test Procedure
Start a E2E session with the EUT using TLS to secure the payload.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.LocalAgent.' } } }
Test Metrics
- In the GetResponse sent by the EUT, the
mac_signature
in the USP Record secures the non-payload fields via the MAC mechanism. - The
mac_signature
in the USP record sent by the EUT validates the integrity of the non-payload fields.
3.5 Failure to Establish TLS
Purpose
The purpose of this test is to ensure the EUT behaves correctly when the TLS session used to encapsulate the payload cannot be established.
Functionality Tags
‘Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)’
Test Setup
- Configure the controller to use TLS12 as a
payload_security
. - Ensure
PeriodicNotifInterval
is ‘60’, and the controller used for testing is subscribed to Periodic Event Notification.
Test Procedure
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.LocalAgent.Controller.<controller instance>.E2ESession.' } } }
Attempt to establish a new secure session with the EUT using TLS payload encapsulation.
Configure the controller to send TLS alerts during the TLS handshake process.
Wait for the EUT to attempt to start a session with the controller.
Allow the controller to send a TLS alert to the EUT and for the session to terminate.
Configure the controller to not send a TLS alert.
Wait for the EUT to retry establishing a E2E session.
Test Metrics
- After sending the client certificate to the EUT, the EUT sends a TLS alert, terminating the session.
- After step 5, the EUT waits before retrying the session in accordance with the ‘SessionRetry’ parameters found in step 1.
3.6 Agent does not accept TLS renegotiation for E2E message exchange
Purpose
The purpose of this test is to ensure the EUT does not accept TLS renegotiation. frames during a E2E message exchange.
Functionality Tags
‘Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)’
Test Setup
- Ensure both the EUT and the controller are configured to use TLS payload security.
Test Procedure
Establish a E2E session with the EUT.
Send a request to renegotiate TLS in place of the payload.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Wait for a GetResponse from the EUT.
Test Metrics
- Between sending the TLS renegotiation request and receiving the
GetResponse, the EUT either sends no records, or sends a TLS alert of
type
no_renegotiation(100)
.
3.7 Use of X.509 Certificates
Purpose
The purpose of this test is to ensure the EUT correctly uses X.509 certificates to authenticate other endpoints, and in turn provides a X.509 certificate for the purpose of authentication.
Functionality Tags
‘Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)’
Test Setup
- Ensure the EUT and controller are configured to use TLS payload security.
Test Procedure
Configure the controller to provide a X.509 certificate with a
subjectAltName
that does not match the controller’s USP endpoint ID.Attempt to start a session with the EUT and send a Get message with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Test Metrics
- During the TLS handshake the EUT provides a X.509 certificate with a
subjectAltName
that matches the endpoint ID of the EUT. - During the TLS handshake the EUT requests a X.509 certificate from the controller.
- The EUT rejects the controller’s certificate.
3.8 Establishing a Session Context
Purpose
The purpose of this test is to ensure the EUT can use a session context to exchange USP messages.
Functionality Tag
Conditional Mandatory (supports USP session context)
Test Setup
- Ensure the EUT and controller have the necessary information to establish a connection and exchange USP messages.
- Ensure at the start of the test there is no existing session context between the EUT and controller.
Test Procedure
Start a session context with the EUT and send a Get message with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Test Metrics
- After step 1, the EUT responds with a USP record containing a
session context, a
sequence_number
of 1 and asession_id
that matched the session identifier sent to the EUT.
3.9 Receipt of a Record out of a Session Context
Purpose
The purpose of this test is to ensure the EUT correctly handles the receiving of a USP record outside of a session context.
Functionality Tags
Conditional Mandatory (supports USP session context)
Test Setup
- Ensure the EUT and controller have the necessary information to establish a session and exchange USP messages.
Test Procedure
Start a session with the EUT using a session context.
Send a Get message to the EUT for
Device.DeviceInfo.
using a USP Record with the following structure:Record { session_context { session_id: <new_session_id> sequence_id: 1 expected_id: 1 payload { # ... } } }
Test Metrics
- The EUT sends the GetResponse in a USP Record using the new
session_id
and asequence_id
of 1.
3.10 Session Context Expiration
Purpose
The purpose of this test is to ensure the EUT correctly adheres to
the SessionExpiration
parameter.
Functionality Tags
Conditional Mandatory (supports USP session context)
Test Setup
- Ensure the EUT and controller have the necessary information required to start a session and exchange USP records.
- Ensure the controller is subscribed to Periodic! event.
Test Procedure
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.LocalAgent.Controller.<controller instance>.E2ESession.' param_settings { param: 'SessionExpiration' value: '60' } } update_objs { obj_path: 'Device.LocalAgent.Controller.<controller instance>.' param_settings { param: 'PeriodicNotifInterval' value: '10' } } } } }
Wait for 3 Notify messages from the EUT containing a Periodic! event.
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.LocalAgent.Controller.<controller instance>.E2ESession.' param_settings: { param: 'SessionExpiration' value: '5' } } update_objs { obj_path: 'Device.LocalAgent.Controller.<controller instance>.' param_settings { param: 'PeriodicNotifInterval' value: '10' } } } } }
Wait for 3 Notify messages from the EUT containing a Periodic! event.
Test Metrics
- All three Notify messages received in step 2 use the same session context.
- None of the three Notify messages received in step 4 shared the same session context.
3.11 Use of Sequence ID and Expected ID
Purpose
The purpose of this test is to ensure the EUT correctly uses the
sequence_id
and expected_id
attributes found
in a session context.
Functionality Tags
Conditional Mandatory (supports USP session context)
Test Setup
- Ensure the EUT and controller have the necessary information to start a session and exchange USP messages.
- Ensure the controller is not subscribed to any events on the EUT.
Test Procedure
- Start a new session by sending a Get message to the EUT with
sequence_id
andexpected_id
set to 1 for ‘Device.DeviceInfo.ModelNumber’. - Send a Get message to the EUT with the
sequence_id
andexpected_id
set to 4 for ‘Device.DeviceInfo.SoftwareVersion’. - Send a Get message to the EUT with the
sequence_id
andexpected_id
set to 2 for ‘Device.DeviceInfo.HardwareVersion’. - Send a Get message to the EUT with the
sequence_id
andexpected_id
set to 3 for ‘Device.DeviceInfo.HardwareVersion’.
Test Metrics
- After step 1, the EUT returns a GetResponse with a
sequence_id
of 1 containing the parameter ‘Device.DeviceInfo.ModelNumber’. - The EUT buffers the Get message sent in step 2 and does not immediately respond.
- After step 3, The EUT sends a GetResponse with a
sequence_id
of 2 containing the parameter ‘Device.DeviceInfo.HardwareVersion’. - After step 4, the EUT sends a GetResponse with a
sequence_id
of 3 containing the parameter ‘Device.DeviceInfo.HardwareVersion’. The EUT then sends a GetResponse for the buffered Get message from step 2 with asequence_id
of 4 containing the parameter ‘Device.DeviceInfo.SoftwareVersion’.
3.12 Preservation of USP Records
The purpose of this test is to ensure the EUT preserves a sent record in the event the receiving endpoint requests a retransmission.
Functionality Tags
Conditional Mandatory (supports USP session context)
Test Setup
- Ensure the EUT and controller have the necessary information to start a session an exchange USP messages.
Test Procedures
Start a new session.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Wait 60 seconds.
Send a USP record to the EUT with a
retransmit_id
set to theexpected_id
value in the record sent in step 1.
Test Metrics
- The EUT sends the same GetResponse twice, once after step 2 and once after step 4.
3.13 Agent Rejects Records with Different Payload Security than the Established Context
Purpose
The purpose of this test is to ensure the EUT does not accept USP
Records that have a different payload_security
value than
the that of the established session context.
Functionality Tags
Conditional Mandatory (supports Secure Message Exchange using TLS for USP Record Integrity)
Test Setup
- Ensure the EUT and controller have the necessary information to start a session and exchange USP messages.
- Ensure the EUT and controller have the necessary information to secure the USP record payload using TLS.
Test Procedure
- Starts a session with the EUT using
payload_security
TLS12. - After the session is established, send the following Get message for
any valid parameter using
payload_security
PLAINTEXT and a plaintext payload.
Test Metrics
- The EUT does not send a GetResponse.
- The EUT starts a new session after step 2.
3.14 Use of retransmit_id
Purpose
The purpose of this test is to ensure the EUT correctly uses the
retransmit_id
value in a USP record and adheres to the
related parameters in the data model.
Functionality Tags
Conditionality Mandatory (supports session context)
Test Setup
- Ensure the EUT and controller have the necessary information to start a session and exchange USP messages.
Test Procedure
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.LocalAgent.Controller.<controller instance>.E2ESession.' param_settings { param: 'MaxRetransmitTries' value: '2' } } } } }
Wait for a SetResponse
Send a USP record with a
retransmit_id
set to the value of thesequence_id
found in the SetResponse in step 2.Repeat steps 2 and 3 twice more.
Test Metrics
- The first three SetResponse messages are sent in the same session context.
- On the third retransmit request, the EUT doesn’t send a SetResponse and instead starts a new session with the controller.
3.15 Handling Duplicate Records
Purpose
The purpose of this test is to ensure the EUT can correctly handle receiving duplicate records.
Functionality Tags
Conditional Mandatory (supports USP session context)
Test Setup
- Ensure the EUT and controller have the necessary information to start session and exchange USP messages.
Test Procedure
- Start a session with the EUT.
- Send a Get message to the EUT requesting a parameter that is known to exist.
- Retransmit the same USP record sent in step 2 to the EUT, using the same non-payload USP record field values.
- Repeat step 3 twice more.
Test Metrics
- The EUT send only one GetResponse.