X509Attestation Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. service. configs. Attestation - com.
microsoft. azure. sdk. iot. provisioning. service. configs. X509Attestation
- com.
- com.
public class X509Attestation
extends Attestation
Representation of a single Device Provisioning Service X509 Attestation.
The provisioning service supports Device Identifier Composition Engine, or DICE, as the device attestation mechanism. To use DICE, user must provide the X509 certificate. This class provide the means to create a new attestation for a X509 certificate and return it as an abstract interface Attestation.
An X509 attestation can contains one of the 3 types of certificate:
Client or Alias certificate:
Called on this class as clientCertificates, this certificate can authenticate a single device.
Signing or Root certificate:
Called on this class as rootCertificates, this certificate can create multiple Client certificates to authenticate multiple devices.
CA Reference:
Called on this class as X509CAReferences, this is a CA reference for a rootCertificate that can create multiple Client certificates to authenticate multiple devices.
The provisioning service allows user to create IndividualEnrollment and EnrollmentGroup. For all operations over IndividualEnrollment with DICE, user must provide a clientCertificates, and for operations over EnrollmentGroup, user must provide a rootCertificates or a X509CAReferences.
For each of this types of certificates, user can provide 2 Certificates, a primary and a secondary. Only the primary is mandatory, the secondary is optional.
The provisioning service will process the provided certificates, but will never return it back. Instead of it, getPrimaryX509CertificateInfo() and getSecondaryX509CertificateInfo() will return the certificate information for the certificates.
Constructor Summary
Constructor | Description |
---|---|
X509Attestation(X509Attestation x509Attestation) |
Constructor [COPY] |
Method Summary
Modifier and Type | Method and Description |
---|---|
static X509Attestation |
createFromCAReferences(String primary)
Factory with CAReferences with only primary reference. |
static X509Attestation |
createFromCAReferences(String primary, String secondary)
Factory with CAReferences with primary and secondary references. |
static X509Attestation |
createFromClientCertificates(String primary)
Factory with Client |
static X509Attestation |
createFromClientCertificates(String primary, String secondary)
Factory with Client |
static X509Attestation |
createFromRootCertificates(String primary)
Factory with Root |
static X509Attestation |
createFromRootCertificates(String primary, String secondary)
Factory with Root |
X509CAReferences |
getCAReferences()
Deprecated
as of provisioning-service-client version 1.3.3, please use getCAReferencesFinal()
Getter for the ca |
final X509CAReferences |
getCAReferencesFinal()
Getter for the ca |
X509Certificates |
getClientCertificates()
Deprecated
as of provisioning-service-client version 1.3.3, please use getClientCertificatesFinal()
Getter for the client |
final X509Certificates |
getClientCertificatesFinal()
Getter for the client |
X509Certificate |
getPrimaryX509CertificateInfo()
Getter for the primary X509 certificate info. |
X509Certificates |
getRootCertificates()
Deprecated
as of provisioning-service-client version 1.3.3, please use getRootCertificatesFinal()
Getter for the root |
final X509Certificates |
getRootCertificatesFinal()
Getter for the root |
X509Certificate |
getSecondaryX509CertificateInfo()
Getter for the secondary X509 certificate info. |
Methods inherited from java.lang.Object
Constructor Details
X509Attestation
public X509Attestation(X509Attestation x509Attestation)
Constructor [COPY]
Creates a new instance of the X509Attestation copping the content of the provided one.
Parameters:
Method Details
createFromCAReferences
public static X509Attestation createFromCAReferences(String primary)
Factory with CAReferences with only primary reference.
Creates a new instance of the X509Attestation using the provided primary CA reference.
Parameters:
String
with the primary CA reference. It cannot be null
or empty.
Returns:
createFromCAReferences
public static X509Attestation createFromCAReferences(String primary, String secondary)
Factory with CAReferences with primary and secondary references.
Creates a new instance of the X509Attestation with the primary and secondary CA references.
Parameters:
String
with the primary CA references. It cannot be null
or empty.
String
with the secondary CA references. It can be null
or empty (ignored).
Returns:
createFromClientCertificates
public static X509Attestation createFromClientCertificates(String primary)
Factory with ClientCertificate with only primary certificate.
Creates a new instance of the X509Attestation using the provided primary Certificate.
Parameters:
String
with the primary certificate. It cannot be null
or empty.
Returns:
createFromClientCertificates
public static X509Attestation createFromClientCertificates(String primary, String secondary)
Factory with ClientCertificates with primary and secondary certificates.
Creates a new instance of the X509Attestation with the primary and secondary certificates.
Parameters:
String
with the primary certificate. It cannot be null
or empty.
String
with the secondary certificate. It can be null
or empty (ignored).
Returns:
createFromRootCertificates
public static X509Attestation createFromRootCertificates(String primary)
Factory with RootCertificates with only primary certificate.
Creates a new instance of the X509Attestation using the provided primary Certificate.
Parameters:
String
with the primary certificate. It cannot be null
or empty.
Returns:
createFromRootCertificates
public static X509Attestation createFromRootCertificates(String primary, String secondary)
Factory with RootCertificates with primary and secondary certificates.
Creates a new instance of the X509Attestation with the primary and secondary certificates.
Parameters:
String
with the primary certificate. It cannot be null
or empty.
String
with the secondary certificate. It can be null
or empty (ignored).
Returns:
getCAReferences
public X509CAReferences getCAReferences()
Deprecated
Getter for the caReferences.
Returns:
null
.getCAReferencesFinal
public final X509CAReferences getCAReferencesFinal()
Getter for the caReferences.
Returns:
null
.getClientCertificates
public X509Certificates getClientCertificates()
Deprecated
Getter for the clientCertificates.
Returns:
null
.getClientCertificatesFinal
public final X509Certificates getClientCertificatesFinal()
Getter for the clientCertificates.
Returns:
null
.getPrimaryX509CertificateInfo
public X509CertificateInfo getPrimaryX509CertificateInfo()
Getter for the primary X509 certificate info.
This method is a getter for the information returned from the provisioning service for the provided primary certificate.
Returns:
null
.getRootCertificates
public X509Certificates getRootCertificates()
Deprecated
Getter for the rootCertificates.
Returns:
null
.getRootCertificatesFinal
public final X509Certificates getRootCertificatesFinal()
Getter for the rootCertificates.
Returns:
null
.getSecondaryX509CertificateInfo
public X509CertificateInfo getSecondaryX509CertificateInfo()
Getter for the secondary X509 certificate info.
This method is a getter for the information returned from the provisioning service for the provided secondary certificate.
Returns:
null
.Applies to
Azure SDK for Java