question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bootstrap Server: configuring SecurityStore with X509

See original GitHub issue

Hi 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:closed
  • Created 2 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sbernard31commented, Jan 17, 2022

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.

0reactions
gerardolenskicommented, Jan 20, 2022

Many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring the OPSS Security Store - 11g Release 1 (11.1.1)
Fusion Middleware Control automatically provides bootstrap credentials in the file cwallet.sso when that tool is used to reassociate to an LDAP-based repository ...
Read more >
X.509 certificate configuration settings - IBM
X.509 certificate configuration settings · Click Servers > Server Types > WebSphere application servers > server_name . · Under Security, click JAX-WS and...
Read more >
Adding security to a running cluster | Confluent Documentation
Again, restart the clients, changing their configuration to point at the newly-opened, SASL and TLS/SSL secured port: bootstrap.servers=[broker1:9093,.
Read more >
org.eclipse.californium.scandium.DTLSConnectorConfig java ...
notNull(bsStore, "bootstrap store must not be null"); this.bsStore = bsStore; this.securityStore = securityStore; // init CoAP server coapServer = new ...
Read more >
OpenShift 4 UPI installation fails with "x509: certificate has ...
openshift-install wait-for bootstrap-complete --log-level debug DEBUG ... for the Kubernetes API: an error on the server ("") has prevented ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found