Bootstrap Server: configuring SecurityStore with X509
See original GitHub issueHi guys,
I’m using Leshan v 2.0.0.-M5
. I have the correct configuration of the DTLS-based security with X509 Certificate mode in Bootstrap Server - meaning I configured only the possibility of using X509 certificates, not PSK which I don’t want to support, and also with disabled unsecured COAP endpoints.
Now I’m trying to add the SecurityStore
to the configuration to enable validation if the endpoint client name matches the X509 certificate common name. Unfortunately, after adding this component I got the exception:
Caused by: java.lang.IllegalStateException: All CoAP enpoints are deactivated, at least one endpoint should be activated
at org.eclipse.leshan.server.californium.bootstrap.LeshanBootstrapServerBuilder.build(LeshanBootstrapServerBuilder.java:554)
at com.redbend.lwm2mbs.domain.server.BootstrapServerConfig.bootstrapServer(BootstrapServerConfig.java:62)
I checked that the problem is in the LeshanBootstrapServerBuilder.class
in line 257:
DtlsConnectorConfig incompleteConfig = this.dtlsConfigBuilder.getIncompleteConfig();
if (incompleteConfig.getAdvancedPskStore() != null) {
LOG.warn("PskStore should be automatically set by Leshan. Using a custom implementation is not advised.");
} else if (this.securityStore != null) {
this.dtlsConfigBuilder.setAdvancedPskStore(new LwM2mBootstrapPskStore(this.securityStore));
}
To be honest I quite don’t get why you are trying to set AdvancedPskStore
always when the SecurityStore was added to the configuration. Can you please help with that?
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (6 by maintainers)
Top GitHub Comments
Thx @gerardolenski 🙏
So, I will release the 2.0.0-M6 in the week does that sounds good to you ? Let me know if you find any problem until that.
Many thanks!