Unable to connect to IoT Central using X509 certificate


Lol

From this article using the sample code , I've been able to connect using the DPS IoT Center with Group Enrollment based on the X509 certificate. However, using the same code and certificate to connect to Central, the registration fails with:

ProvisioningClient RegisterAsync...Failed Custom assignment failed, status code: 401 ProvisioningClient AssignedHub:; DeviceID: Failed to register device

In both cases (DPS and Central), the root certificate was successfully uploaded and verified.

Lol

Found the problem, although the API returns 401 Device Created, it is not associated to any device template. Once the association is established ("manually"), subsequent calls work as expected.

This behavior changes with the new plug-and-play feature.

Related


Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Unable to authenticate user in Kubernetes using x509 certificate

Ajov Crowe I am using the following versions: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"g

Secure connection using x509 certificate

Zogby I created the CA certificate with the secret private key I generated and added it to each host's Trusted Root Certification Authorities. I then receive a certificate request from that host and sign it with my private key, defining an expiration date. And

Secure connection using x509 certificate

Zogby I created the CA certificate with the secret private key I generated and added it to each host's Trusted Root Certification Authorities. I then receive a certificate request from that host and sign it with my private key, defining an expiration date. And

Could not connect to server: x509: certificate pair

Barra Operating System: Mac OS 10.13.6 Terminal Kubectl for remote access When I execute the command with "--insecure-skip-tls-verify" it works fine. dev-env at balabimac in ~/kthw $ kubectl --insecure-skip-tls-verify --context=kubernetes-me get pods No resour

Could not connect to server: x509: certificate pair

Barra Operating System: Mac OS 10.13.6 Terminal Kubectl for remote access When I execute the command with "--insecure-skip-tls-verify" it works fine. dev-env at balabimac in ~/kthw $ kubectl --insecure-skip-tls-verify --context=kubernetes-me get pods No resour

Unable to extract public key from x509 certificate

Newbert Here is my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.se

Unable to extract public key from x509 certificate

Newbert Here is my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.se

Unable to extract public key from x509 certificate

Newbert Here is my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.se

Unable to extract public key from x509 certificate

Newbert Here is my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.se

Unable to import X509 v3 certificate

Immel Stone I need to verify an X509v3 certificate that comes in plain text and I'm trying to use the following code: public static bool Validate(string certText) { var bytes = new byte[certText.Length * sizeof(char)]; Buffer.BlockCopy(cert

Unable to extract X509 subject string from certificate

atb00ker I am trying to connect OpenVPN server and client. I get the following error on the client side: Thu Aug 15 12:40:02 2019 daemon.err openvpn(default)[11009]: VERIFY ERROR: depth=1, could not extract X509 subject string from certificate Thu Aug 15 12:40

Unable to extract public key from x509 certificate

Newbert Here is my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.se

Unable to extract public key from x509 certificate

Newbert Here is my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.se

Unable to import X509 v3 certificate

Immel Stone I need to verify an X509v3 certificate that comes in plain text and I'm trying to use the following code: public static bool Validate(string certText) { var bytes = new byte[certText.Length * sizeof(char)]; Buffer.BlockCopy(cert

Generate X509 certificate using Bouncy Castle Java

Reddy: I am looking for an example or tutorial for generating X509 certificates using BC in Java. Many examples have/use deprecated APIs. I looked at BC but it doesn't show which class is doing what or doesn't have proper documentation/examples. If you have an