Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LWM2M Security: SNI with PSK - what does this mean? #566

Closed
ghost opened this issue Jul 5, 2023 · 2 comments
Closed

LWM2M Security: SNI with PSK - what does this mean? #566

ghost opened this issue Jul 5, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 5, 2023

See

  • Document: OMA-TS-LightweightM2M_Core-V1_1_1-20190617
  • Section: E 1.-2 (Table)

The Specification describes the SNI resource 14 as follows:

"This resource holds the value of the Server Name Indication (SNI) value to be used during the TLS handshake. When this resource is present then the LwM2M Server URI acts as the address of the service while the SNI value is used for matching a presented certificate, or PSK identity."

We certainly understand what SNI resource means for the use with certificates (Security Modes 1,2 and 4): Here the SNI sent by the device allows the LWM2M server to present a matching certificate.

I can only guess what the mention of the PSK identity should mean here: Does the spec want to say that the LWM2M server should look up a matching certificate by the PSK identity internally??

If so, this doesn't actually make sense because the ciphersuites mandated for PSK (see OMA-TS-LightweightM2M_Transport-V1_1-20180710-A.pdf, Section 5.2.8.1) are TLS_PSK_WITH_AES_128_CCM_8 and TLS_PSK_WITH_AES_128_CBC_SHA256. Both of these ciphersuites only use symmetric cryptography and do not use certificates at all, which is one of the key motivations behind DTLS-PSK...

Can you elaborate here?

This emerged out of a discussion with @jakubsobolewskisag and @sbernard31 on the implementation of SNI support in eclipse-leshan/leshan#1447

@hannestschofenig
Copy link

In a scenario where there are multiple virtual server running on the IP address there is the question about how the authentication is "routed" to the right place. The PSK identity may contain this information, if you format it similar to an email address, but if you don't then you will run into a problem. There the SNI could help.

@mkgillmore
Copy link

Group agrees that this issue is resolved and can be closed 10/31/2023

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

No branches or pull requests

2 participants