id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
---|---|---|
4051c2b1c41c-1 | "certificateAuthorityConfiguration":{
"keyType":"RSA2048",
"signingAlgorithm":"SHA256WITHRSA",
"subject":{
"country":"US",
"organization":"Example Company",
"organizationalUnit":"Corp",
"state":"WA",
"commonName":"www.example.com",
"locality":"Seattle"
}
},
"revocationConfiguration":{
"crlConfiguration":{
"enabled":true,
"expirationInDays":3650,
"customCname":"your-custom-name",
s3BucketName:"your-bucket-name"
}
},
"certificateAuthorityType":"SUBORDINATE",
"idempotencyToken":"98256344"
},
"responseElements":{
"certificateAuthorityArn":"arn:aws:acm-pca:region:account:certificate-authority/ac5a7c2e-19c8-4258-b74e-351c2b791fe1"
}, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-CreateCA.md |
4051c2b1c41c-2 | },
"requestID":"332b0c69-8779-4625-bdef-2e95a4a18265",
"eventID":"cd27c874-ae6e-4585-9c1b-5abf5537ec39",
"eventType":"AwsApiCall",
"recipientAccountId":"account"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-CreateCA.md |
79962059eb3a-0 | You can use the AWS CLI or ACM Private CA API to revoke a certificate\. The certificate will be included in the certificate revocation list \(CRL\), if it exists, of the issuing private CA\. Revoked certificates are always recorded in the audit report\.
**Note**
Cross\-account certificate issuers cannot revoke the certificates that they issue\. The CA owner must perform revocation\.
**To revoke a certificate**
Use the [RevokeCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevokeCertificate.html) API action or [revoke\-certificate](https://docs.aws.amazon.com/cli/latest/reference/acm-pca/revoke-certificate.html) command to revoke a private PKI certificate\. The serial number must be in hexadecimal format\. You can retrieve the serial number by calling the [get\-certificate](https://docs.aws.amazon.com/cli/latest/reference/acm-pca/get-certificate.html) command\. The `revoke-certificate` command does not return a response\.
```
aws acm-pca revoke-certificate \
--certificate-authority-arn arn:aws:acm-pca:region:account:\
certificate-authority/12345678-1234-1234-1234-123456789012 \ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
79962059eb3a-1 | certificate-authority/12345678-1234-1234-1234-123456789012 \
--certificate-serial 67:07:44:76:83:a9:b7:f4:05:56:27:ff:d5:5c:eb:cc \
--revocation-reason "KEY_COMPROMISE"
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
f1520bee17a7-0 | The following example shows a revoked certificate in a certificate revocation list \(CRL\)\. A CRL is typically updated approximately 30 minutes after a certificate is revoked\. If for any reason the CRL update fails, ACM PCA attempts makes further attempts every 15 minutes\. With Amazon CloudWatch, you can create alarms for the metrics `CRLGenerated` and `MisconfiguredCRLBucket`\. For more information, see [Supported CloudWatch Metrics](https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaCloudWatch.html)\. For more information about creating and configuring CRLs, see [Creating a Private CA and CRL](PcaCreateCa.md)\.
```
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: /C=US/ST=WA/L=Seattle/O=Examples LLC/OU=Corporate Office/CN=www.example.com
Last Update: Jan 10 19:28:47 2018 GMT
Next Update: Jan 8 20:28:47 2028 GMT
CRL extensions:
X509v3 Authority Key Identifier:
keyid:3B:F0:04:6B:51:54:1F:C9:AE:4A:C0:2F:11:E6:13:85:D8:84:74:67
X509v3 CRL Number:
1515616127629 | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
f1520bee17a7-1 | X509v3 CRL Number:
1515616127629
Revoked Certificates:
Serial Number: B17B6F9AE9309C51D5573BCA78764C23
Revocation Date: Jan 9 17:19:17 2018 GMT
CRL entry extensions:
X509v3 CRL Reason Code:
Key Compromise
Signature Algorithm: sha256WithRSAEncryption
21:2f:86:46:6e:0a:9c:0d:85:f6:b6:b6:db:50:ce:32:d4:76:
99:3e:df:ec:6f:c7:3b:7e:a3:6b:66:a7:b2:83:e8:3b:53:42:
f0:7a:bc:ba:0f:81:4d:9b:71:ee:14:c3:db:ad:a0:91:c4:9f:
98:f1:4a:69:9a:3f:e3:61:36:cf:93:0a:1b:7d:f7:8d:53:1f:
2e:f8:bd:3c:7d:72:91:4c:36:38:06:bf:f9:c7:d1:47:6e:8e: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
f1520bee17a7-2 | 54:eb:87:02:33:14:10:7f:b2:81:65:a1:62:f5:fb:e1:79:d5:
1d:4c:0e:95:0d:84:31:f8:5d:59:5d:f9:2b:6f:e4:e6:60:8b:
58:7d:b2:a9:70:fd:72:4f:e7:5b:e4:06:fc:e7:23:e7:08:28:
f7:06:09:2a:a1:73:31:ec:1c:32:f8:dc:03:ea:33:a8:8e:d9:
d4:78:c1:90:4c:08:ca:ba:ec:55:c3:00:f4:2e:03:b2:dd:8a:
43:13:fd:c8:31:c9:cd:8d:b3:5e:06:c6:cc:15:41:12:5d:51:
a2:84:61:16:a0:cf:f5:38:10:da:a5:3b:69:7f:9c:b0:aa:29:
5f:fc:42:68:b8:fb:88:19:af:d9:ef:76:19:db:24:1f:eb:87: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
f1520bee17a7-3 | 65:b2:05:44:86:21:e0:b4:11:5c:db:f6:a2:f9:7c:a6:16:85:
0e:81:b2:76
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
615999280c5b-0 | All certificates, including revoked certificates, are included in the audit report for a private CA\. The following example shows an audit report with one issued and one revoked certificate\. For more information, see [Using Audit Reports with Your Private CA](PcaAuditReport.md)\.
```
[{
"awsAccountId": "123456789012",
"certificateArn": "arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/e8cbd2bedb122329f97706bcfec990f8",
"serial": "e8:cb:d2:be:db:12:23:29:f9:77:06:bc:fe:c9:90:f8",
"subject": "1.2.840.113549.1.9.1=#161173616c6573406578616d706c652e636f6d,CN=www.example1.com,OU=Sales,O=Example Company,L=Seattle,ST=Washington,C=US",
"notBefore": "2018-02-26T18:39:57+0000",
"notAfter": "2019-02-26T19:39:57+0000",
"issuedAt": "2018-02-26T19:39:58+0000",
"revokedAt": "2018-02-26T20:00:36+0000", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
615999280c5b-1 | "revokedAt": "2018-02-26T20:00:36+0000",
"revocationReason": "KEY_COMPROMISE"
},
{
"awsAccountId": "123456789012",
"certificateArn": "arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/2bae9a75d71b42b4e41e36f8b4b488fc",
"serial": "2b:ae:9a:75:d7:1b:42:b4:e4:1e:36:f8:b4:b4:88:fc",
"subject": "1.2.840.113549.1.9.1=#161970726f64407777772e70616c6f75736573616c65732e636f6d,CN=www.example3.com.com,OU=Sales,O=Example Company,L=Seattle,ST=Washington,C=US",
"notBefore": "2018-01-22T20:10:49+0000",
"notAfter": "2019-01-17T21:10:49+0000",
"issuedAt": "2018-01-22T21:10:49+0000"
}]
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRevokeCert.md |
a50827a69544-0 | The following Java sample shows how to use the [TagCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_TagCertificateAuthority.html.html) operation\.
This operation adds one or more tags to your private CA\. Tags are labels that you can use to identify and organize your AWS resources\. Each tag consists of a key and an optional value\. When you call this operation, you specify the private CA by its Amazon Resource Name \(ARN\)\. You specify the tag by using a key\-value pair\. To identify a specific characteristic of that CA, you can apply a tag to just one private CA\. Or, to filter for a common relationship among those CAs, you can apply the same tag to multiple private CAs\. To remove one or more tags, use the [UntagCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_UntagCertificateAuthority.html) operation\. Call the [ListTags](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListTags.html) operation to see what tags are associated with your CA\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-TagPCA.md |
a50827a69544-1 | import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.TagCertificateAuthorityRequest;
import com.amazonaws.services.acmpca.model.Tag;
import java.util.ArrayList;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.InvalidTagException;
import com.amazonaws.services.acmpca.model.TooManyTagsException;
public class TagCertificateAuthorities {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-TagPCA.md |
a50827a69544-2 | // in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from disk", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create a tag - method 1
Tag tag1 = new Tag();
tag1.withKey("Administrator");
tag1.withValue("Bob");
// Create a tag - method 2 | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-TagPCA.md |
a50827a69544-3 | tag1.withValue("Bob");
// Create a tag - method 2
Tag tag2 = new Tag()
.withKey("Purpose")
.withValue("WebServices");
// Add the tags to a collection.
ArrayList<Tag> tags = new ArrayList<Tag>();
tags.add(tag1);
tags.add(tag2);
// Create a request object and specify the certificate authority ARN.
TagCertificateAuthorityRequest req = new TagCertificateAuthorityRequest();
req.setCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
req.setTags(tags);
// Add a tag
try {
client.tagCertificateAuthority(req);
} catch (InvalidArnException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
} catch (InvalidTagException ex) {
throw ex;
} catch (TooManyTagsException ex) {
throw ex;
}
}
} | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-TagPCA.md |
a50827a69544-4 | } catch (TooManyTagsException ex) {
throw ex;
}
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-TagPCA.md |
49fdbdb95559-0 | The following Java sample shows how to use the [DeletePolicy](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DeletePolicy.html) operation\.
The operation delete the resource\-based policy attached to a private CA\. A resource\-based policy is used to enable cross\-account CA sharing\. You can find the ARN of a private CA by calling the [ListCertificateAuthorities](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html) action\.
Related API actions include [PutPolicy](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_PutPolicy.html) and [GetPolicy](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetPolicy.html)\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.AmazonClientException; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-DeletePolicy.md |
49fdbdb95559-1 | import com.amazonaws.AmazonClientException;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.CreatePermissionRequest;
import com.amazonaws.services.acmpca.model.CreatePermissionResult;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.InvalidStateException;
import com.amazonaws.services.acmpca.model.LimitExceededException;
import com.amazonaws.services.acmpca.model.PermissionAlreadyExistsException;
import com.amazonaws.services.acmpca.model.RequestFailedException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import java.util.ArrayList;
public class CreatePermission {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-DeletePolicy.md |
49fdbdb95559-2 | // in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from file.", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create a request object.
CreatePermissionRequest req =
new CreatePermissionRequest();
// Set the certificate authority ARN. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-DeletePolicy.md |
49fdbdb95559-3 | CreatePermissionRequest req =
new CreatePermissionRequest();
// Set the certificate authority ARN.
req.setCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
// Set the permissions to give the user.
ArrayList<String> permissions = new ArrayList<>();
permissions.add("IssueCertificate");
permissions.add("GetCertificate");
permissions.add("ListPermissions");
req.setActions(permissions);
// Set the AWS principal.
req.setPrincipal("acm.amazonaws.com");
// Create a result object.
CreatePermissionResult result = null;
try {
result = client.createPermission(req);
} catch (InvalidArnException ex) {
throw ex;
} catch (InvalidStateException ex) {
throw ex;
} catch (LimitExceededException ex) {
throw ex;
} catch (PermissionAlreadyExistsException ex) {
throw ex;
} catch (RequestFailedException ex) { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-DeletePolicy.md |
49fdbdb95559-4 | } catch (PermissionAlreadyExistsException ex) {
throw ex;
} catch (RequestFailedException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
}
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-DeletePolicy.md |
565aec70e916-0 | The following Java sample shows how to use the [ListCertificateAuthorities](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html) operation\.
This operation lists the private certificate authorities \(CAs\) that you created using the [CreateCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html) operation\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.ListCertificateAuthoritiesRequest; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
565aec70e916-1 | import com.amazonaws.services.acmpca.model.ListCertificateAuthoritiesRequest;
import com.amazonaws.services.acmpca.model.ListCertificateAuthoritiesResult;
import com.amazonaws.services.acmpca.model.InvalidNextTokenException;
public class ListCertificateAuthorities {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from file.", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
565aec70e916-2 | // Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create the request object.
ListCertificateAuthoritiesRequest req = new ListCertificateAuthoritiesRequest();
req.withMaxResults(10);
// Retrieve a list of your CAs.
ListCertificateAuthoritiesResult result= null;
try {
result = client.listCertificateAuthorities(req);
} catch (InvalidNextTokenException ex) {
throw ex;
}
// Display the CA list.
System.out.println(result.getCertificateAuthorities());
}
}
```
If you have any certificate authorities to list, your output should be similar to the following:
```
[{
Arn: arn: aws: acm-pca: region: account: certificate-authority/12345678-1234-1234-1234-123456789012,
CreatedAt: TueNov0712: 05: 39PST2017, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
565aec70e916-3 | CreatedAt: TueNov0712: 05: 39PST2017,
LastStateChangeAt: WedJan1012: 35: 39PST2018,
Type: SUBORDINATE,
Serial: 4109,
Status: DISABLED,
NotBefore: TueNov0712: 19: 15PST2017,
NotAfter: FriNov0513: 19: 15PDT2027,
CertificateAuthorityConfiguration: {
KeyType: RSA2048,
SigningAlgorithm: SHA256WITHRSA,
Subject: {
Organization: ExampleCorp,
OrganizationalUnit: HR,
State: Washington,
CommonName: www.example.com,
Locality: Seattle,
}
},
RevocationConfiguration: {
CrlConfiguration: {
Enabled: true,
ExpirationInDays: 3650,
CustomCname: your-custom-name,
S3BucketName: your-bucket-name
}
}
},
{
Arn: arn: aws: acm-pca: region: account>: certificate-authority/12345678-1234-1234-1234-123456789012,
CreatedAt: WedSep1312: 54: 52PDT2017, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
565aec70e916-4 | CreatedAt: WedSep1312: 54: 52PDT2017,
LastStateChangeAt: WedSep1312: 54: 52PDT2017,
Type: SUBORDINATE,
Serial: 4100,
Status: ACTIVE,
NotBefore: WedSep1314: 11: 19PDT2017,
NotAfter: SatSep1114: 11: 19PDT2027,
CertificateAuthorityConfiguration: {
KeyType: RSA2048,
SigningAlgorithm: SHA256WITHRSA,
Subject: {
Country: US,
Organization: ExampleCompany,
OrganizationalUnit: Sales,
State: Washington,
CommonName: www.example.com,
Locality: Seattle,
}
},
RevocationConfiguration: {
CrlConfiguration: {
Enabled: false,
ExpirationInDays: 5,
CustomCname: your-custom-name,
S3BucketName: your-bucket-name
}
}
},
{
Arn: arn: aws: acm-pca: region: account>: certificate-authority/12345678-1234-1234-1234-123456789012,
CreatedAt: FriJan1213: 57: 11PST2018, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
565aec70e916-5 | CreatedAt: FriJan1213: 57: 11PST2018,
LastStateChangeAt: FriJan1213: 57: 11PST2018,
Type: SUBORDINATE,
Status: PENDING_CERTIFICATE,
CertificateAuthorityConfiguration: {
KeyType: RSA2048,
SigningAlgorithm: SHA256WITHRSA,
Subject: {
Country: US,
Organization: Examples-R-Us Ltd.,
OrganizationalUnit: corporate,
State: WA,
CommonName: www.examplesrus.com,
Locality: Seattle,
}
},
RevocationConfiguration: {
CrlConfiguration: {
Enabled: true,
ExpirationInDays: 365,
CustomCname: your-custom-name,
S3BucketName: your-bucket-name
}
}
},
{
Arn: arn: aws: acm-pca: region: account>: certificate-authority/12345678-1234-1234-1234-123456789012,
CreatedAt: FriJan0511: 14: 21PST2018,
LastStateChangeAt: FriJan0511: 14: 21PST2018,
Type: SUBORDINATE,
Serial: 4116,
Status: ACTIVE, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
565aec70e916-6 | Type: SUBORDINATE,
Serial: 4116,
Status: ACTIVE,
NotBefore: FriJan0512: 12: 56PST2018,
NotAfter: MonJan0312: 12: 56PST2028,
CertificateAuthorityConfiguration: {
KeyType: RSA2048,
SigningAlgorithm: SHA256WITHRSA,
Subject: {
Country: US,
Organization: ExamplesLLC,
OrganizationalUnit: CorporateOffice,
State: WA,
CommonName: www.example.com,
Locality: Seattle,
}
},
RevocationConfiguration: {
CrlConfiguration: {
Enabled: true,
ExpirationInDays: 3650,
CustomCname: your-custom-name,
S3BucketName: your-bucket-name
}
}
}]
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListCertificateAuthorities.md |
2000ae1e6141-0 | The following Java sample shows how to use the [ListTags](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListTags.html) operation\.
This operation lists the tags, if any, that are associated with your private CA\. Tags are labels that you can use to identify and organize your CAs\. Each tag consists of a key and an optional value\. Call the [TagCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_TagCertificateAuthority.html) operation to add one or more tags to your CA\. Call the [UntagCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_UntagCertificateAuthority.html) operation to remove tags\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListTags.md |
2000ae1e6141-1 | import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.ListTagsRequest;
import com.amazonaws.services.acmpca.model.ListTagsResult;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
public class ListTags {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from disk", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2" | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListTags.md |
2000ae1e6141-2 | String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create a request object and set the CA ARN.
ListTagsRequest req = new ListTagsRequest();
req.withCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
// List the tags
ListTagsResult result = null;
try {
result = client.listTags(req);
} catch (InvalidArnException ex) {
throw ex;
} catch (ResourceNotFoundException ex) { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListTags.md |
2000ae1e6141-3 | } catch (InvalidArnException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
}
// Retrieve and display the tags.
System.out.println(result);
}
}
```
If you have any tags to list, your output should be similar to the following:
```
{Tags: [{Key: Admin,Value: Alice}, {Key: Purpose,Value: WebServices}],}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListTags.md |
e691a86ec418-0 | The following CloudTrail example shows the results of a call to the [GetCertificateAuthorityCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificateAuthorityCertificate.html) operation\.
```
{
"eventVersion":"1.05",
"userIdentity":{
"type":"IAMUser",
"principalId":"account",
"arn":"arn:aws:iam::account:user/name",
"accountId":"account",
"accessKeyId":"Key_ID"
},
"eventTime":"2018-01-26T22:03:52Z",
"eventSource":"acm-pca.amazonaws.com",
"eventName":"GetCertificateAuthorityCertificate",
"awsRegion":"us-east-1",
"sourceIPAddress":"xx.xx.xx.xx",
"userAgent":"aws-cli/1.14.28 Python/2.7.9 Windows/8 botocore/1.8.32",
"requestParameters":{ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-GetCACertificate.md |
e691a86ec418-1 | "requestParameters":{
"certificateAuthorityArn":"arn:aws:acm-pca:region:account:certificate-authority/ac5a7c2e-19c8-4258-b74e-351c2b791fe1"
},
"responseElements":null,
"requestID":"94cee046-bf52-4a69-b95c-eae662818410",
"eventID":"7dd83274-8c5f-4b9a-b9b6-371b53771ce9",
"eventType":"AwsApiCall",
"recipientAccountId":"account"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-GetCACertificate.md |
17d8a8839f86-0 | The following Java sample shows how to use the [ListPermissions](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListPermissions.html) operation\.
This operation lists the permissions, if any, that your private CA has assigned\. Permissions, including `IssueCertificate`, `GetCertificate`, and `ListPermissions`, can be assigned to an AWS service principal with the [CreatePermission](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreatePermission.html) operation, and revoked with the [DeletePermissions](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DeletePermission.html) operation\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListPermissions.md |
17d8a8839f86-1 | import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.ListPermissionsRequest;
import com.amazonaws.services.acmpca.model.ListPermissionsResult;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.InvalidNextTokenException;
import com.amazonaws.services.acmpca.model.InvalidStateException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import com.amazonaws.services.acmpca.model.RequestFailedException;
public class ListPermissions {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from disk", e); | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListPermissions.md |
17d8a8839f86-2 | } catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from disk", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create a request object and set the CA ARN.
ListPermissionsRequest req = new ListPermissionsRequest();
req.withCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
// List the tags.
ListPermissionsResult result = null;
try { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListPermissions.md |
17d8a8839f86-3 | // List the tags.
ListPermissionsResult result = null;
try {
result = client.listPermissions(req);
} catch (InvalidArnException ex) {
throw ex;
} catch (InvalidStateException ex) {
throw ex;
} catch(RequestFailedException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
}
// Retrieve and display the permissions.
System.out.println(result);
}
}
```
If the designated private CA has assigned permissions to a service principal, your output should be similar to the following:
```
[{
Arn: arn:aws:acm-pca:region:account:permission/12345678-1234-1234-1234-123456789012,
CreatedAt: WedFeb0317: 05: 39PST2019,
Prinicpal: acm.amazonaws.com,
Permissions: {
ISSUE_CERTIFICATE,
GET_CERTIFICATE,
DELETE,CERTIFICATE
},
SourceAccount: account
}]
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ListPermissions.md |
7e84def24cae-0 | Third\-party auditors assess the security and compliance of AWS Certificate Manager Private Certificate Authority as part of multiple AWS compliance programs\. These include SOC, PCI, FedRAMP, HIPAA, and others\.
For a list of AWS services in scope of specific compliance programs, see [AWS Services in Scope by Compliance Program](http://aws.amazon.com/compliance/services-in-scope/)\. For general information, see [AWS Compliance Programs](http://aws.amazon.com/compliance/programs/)\.
You can download third\-party audit reports using AWS Artifact\. For more information, see [Downloading Reports in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html)\.
Your compliance responsibility when using ACM Private CA is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations\. AWS provides the following resources to help with compliance:
+ For organizations that are required to encrypt their Amazon S3 buckets, the following topics describe how to configure encryption to accommodate ACM Private CA assets:
+ [Encrypting Your Audit Reports](https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaAuditReport.html#audit-report-encryption)
+ [Encrypting Your CRLs](https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaCreateCa.html#crl-encryption) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/security-compliance-validation.md |
7e84def24cae-1 | + [Security and Compliance Quick Start Guides](http://aws.amazon.com/quickstart/?awsf.quickstart-homepage-filter=categories%23security-identity-compliance) — These deployment guides discuss architectural considerations and provide steps for deploying security\- and compliance\-focused baseline environments on AWS\.
+ [Architecting for HIPAA Security and Compliance Whitepaper ](https://d0.awsstatic.com/whitepapers/compliance/AWS_HIPAA_Compliance_Whitepaper.pdf) — This whitepaper describes how companies can use AWS to create HIPAA\-compliant applications\.
+ [AWS Compliance Resources](http://aws.amazon.com/compliance/resources/) — This collection of workbooks and guides might apply to your industry and location\.
+ [Evaluating Resources with Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) in the *AWS Config Developer Guide* — The AWS Config service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations\.
+ [AWS Security Hub](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) — This AWS service provides a comprehensive view of your security state within AWS that helps you check your compliance with security industry standards and best practices\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/security-compliance-validation.md |
e8160a703738-0 | You can create an audit report to list all of the certificates that your private CA has issued or revoked\. The report is saved in a new or existing S3 bucket that you specify on input\.
For information about adding encryption protection to your audit reports, see [Encrypting Your Audit Reports ](#audit-report-encryption)\.
The audit report file has the following path and file name\. The ARN for an Amazon S3 bucket is the value for `bucket-name`\. `CA_ID` is the unique identifier of an issuing CA\. `UUID` is the unique identifier of an audit report\.
```
bucket-name/audit-report/CA-ID/UUID.[json|csv]
```
You can generate a new report every 30 minutes and download it from your bucket\. The following example shows a CSV\-separated report\.
```
awsAccountId,requestedByServicePrincipal,certificateArn,serial,subject,notBefore,notAfter,issuedAt,revokedAt,revocationReason,templateArn | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
e8160a703738-1 | 123456789012,,arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/fedcba9876543210fedcba9876543210,00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff,"2.5.4.5=#012345678901,2.5.4.44=#0a1b3c4d,2.5.4.65=#0a1b3c4e5f6a,2.5.4.43=#0a1b3c4d5e,2.5.4.42=#0123456789abcdef0123456789abcdef0123,2.5.4.4=#0123456789abcdef01234567,2.5.4.12=#0a1b3c4d5e,2.5.4.46=#0123456789ab,CN=www.example1.com,OU=Sales,O=Example Company,L=Seattle,ST=Washington,C=US",2020-03-02T21:43:57+0000,2020-04-07T22:43:57+0000,2020-03-02T22:43:58+0000,,UNSPECIFIED,arn:aws:acm-pca:::template/EndEntityCertificate/V1 | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
e8160a703738-2 | 123456789012,acm.amazonaws.com,arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/0123456789abcdef0123456789abcdef,ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00,"2.5.4.5=#012345678901,2.5.4.44=#0a1b3c4d,2.5.4.65=#0a1b3c4d5e6f,2.5.4.43=#0a1b3c4d5e,2.5.4.42=#0123456789abcdef0123456789abcdef0123,2.5.4.4=#0123456789abcdef01234567,2.5.4.12=#0a1b3c4d5e,2.5.4.46=#0123456789ab,CN=www.example1.com,OU=Sales,O=Example Company,L=Seattle,ST=Washington,C=US",2020-03-02T20:53:39+0000,2020-04-07T21:53:39+0000,2020-03-02T21:53:40+0000,,,arn:aws:acm-pca:::template/EndEntityCertificate/V1
```
The following example shows a JSON\-formatted report\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
e8160a703738-3 | ```
The following example shows a JSON\-formatted report\.
```
[
{
"awsAccountId":"123456789012",
"certificateArn":"arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/fedcba9876543210fedcba9876543210",
"serial":"00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff",
"subject":"2.5.4.5=#012345678901,2.5.4.44=#0a1b3c4d,2.5.4.65=#0a1b3c4d5e6f,2.5.4.43=#0a1b3c4d5e,2.5.4.42=#0123456789abcdef0123456789abcdef0123,2.5.4.4=#0123456789abcdef01234567,2.5.4.12=#0a1b3c4d5e,2.5.4.46=#0123456789ab,CN=www.example1.com,OU=Sales,O=Example Company,L=Seattle,ST=Washington,C=US",
"notBefore":"2020-02-26T18:39:57+0000", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
e8160a703738-4 | "notBefore":"2020-02-26T18:39:57+0000",
"notAfter":"2021-02-26T19:39:57+0000",
"issuedAt":"2020-02-26T19:39:58+0000",
"revokedAt":"2020-02-26T20:00:36+0000",
"revocationReason":"UNSPECIFIED",
"templateArn":"arn:aws:acm-pca:::template/EndEntityCertificate/V1"
},
{
"awsAccountId":"123456789012",
"requestedByServicePrincipal":"acm.amazonaws.com",
"certificateArn":"arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/0123456789abcdef0123456789abcdef",
"serial":"ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
e8160a703738-5 | "serial":"ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00",
"subject":"2.5.4.5=#012345678901,2.5.4.44=#0a1b3c4d,2.5.4.65=#0a1b3c4d5e6f,2.5.4.43=#0a1b3c4d5e,2.5.4.42=#0123456789abcdef0123456789abcdef0123,2.5.4.4=#0123456789abcdef01234567,2.5.4.12=#0a1b3c4d5e,2.5.4.46=#0123456789ab,CN=www.example1.com,OU=Sales,O=Example Company,L=Seattle,ST=Washington,C=US",
"notBefore":"2020-01-22T20:10:49+0000",
"notAfter":"2021-01-17T21:10:49+0000",
"issuedAt":"2020-01-22T21:10:49+0000",
"templateArn":"arn:aws:acm-pca:::template/EndEntityCertificate/V1"
}
]
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
3af336cedcca-0 | To store your audit reports, you need to prepare an Amazon S3 bucket\. For more information, see [How Do I Create an S3 bucket?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html)
Your S3 bucket must be secured by an attached permissions policy\. The policy protects the contents of the bucket from being accessed by unauthorized users or service principals\. If you create a new S3 bucket through the ACM Private CA console, a policy \(**Policy 2** below\) is attached to the bucket automatically\. If you use an existing bucket, or if you use the AWS CLI to create the audit report, you must attach a policy manually\. For more information, see [How Do I Add an S3 Bucket Policy?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html)
We offer two example policies for securing Amazon S3 buckets\.
<a name="policy1"></a>
**Policy 1 \(Restrictive\)**
This policy grants restricted permissions on the S3 bucket to the ACM Private CA service principal\. This example restricts by both AWS account and by the ARN of a private CA, but it could also be configured to restrict just one or the other\. The `Put` permission allows ACM Private CA to place objects in the bucket\. The `Get` permission allows objects in the bucket to be retrieved\.
```
{
"Version":"2012-10-17",
"Statement":[ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
3af336cedcca-1 | ```
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":"acm-pca.amazonaws.com"
},
"Action":[
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetBucketAcl",
"s3:GetBucketLocation"
],
"Resource":[
"arn:aws:s3:::bucket-name/*",
"arn:aws:s3:::bucket-name"
],
"Condition":{
"StringEquals":{
"aws:SourceAccount":"account",
"aws:SourceArn":"arn:partition:acm-pca:region:account:certificate-authority/11111111-2222-3333-4444-555555555555"
}
}
}
]
}
```
<a name="policy2"></a>
**Policy 2 \(Permissive\)** | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
3af336cedcca-2 | ```
<a name="policy2"></a>
**Policy 2 \(Permissive\)**
This policy grants `Put` and `Get` permissions on the S3 bucket to the ACM Private CA service principal without restricting access by CA or user\. The `Put` permission allows ACM Private CA to place objects in the bucket\. The `Get` permission allows objects in the bucket to be retrieved\. A permissive policy is appropriate if you want the bucket to be available for multiple CAs or multiple users\.
```
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":"acm-pca.amazonaws.com"
},
"Action":[
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetBucketAcl",
"s3:GetBucketLocation"
],
"Resource":[
"arn:aws:s3:::bucket-name/*",
"arn:aws:s3:::bucket-name"
]
}
]
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
d578eda5ad4c-0 | You can create an audit report from either the console or the AWS CLI\.
**To create an audit report \(console\)**
1. Sign in to your AWS account and open the ACM Private CA console at [https://console\.aws\.amazon\.com/acm\-pca/home](https://console.aws.amazon.com/acm-pca/home)\.
1. Choose **Private CAs**\.
1. Choose your private CA from the list\.
1. From the **Actions** menu, choose **Generate audit report**\.
1. For **Create a new S3 bucket**, choose **Yes** and type a unique bucket name or choose **No** and choose an existing bucket from the list\.
If you choose **Yes**, ACM Private CA creates and attaches the necessary policy to your bucket\. If you choose **No**, you must attach a policy to your bucket before you can generate an audit report\. Use one of the policy patterns described in [Preparing an Amazon S3 Bucket for Audit Reports](#s3-access)\. For information about attaching a policy, see [How Do I Add an S3 Bucket Policy?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html)
1. For **Output format**, choose **JSON** for JavaScript Object Notation or **CSV** for comma\-separated values\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
d578eda5ad4c-1 | 1. For **Output format**, choose **JSON** for JavaScript Object Notation or **CSV** for comma\-separated values\.
1. Choose **Generate audit report**\.
**To create an audit report \(AWS CLI\)**
1. If you do not already have an S3 bucket to use, [create one](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html)\.
1. Attach a policy to your bucket\. Use one of the policy patterns described in [Preparing an Amazon S3 Bucket for Audit Reports](#s3-access)\. For information about attaching a policy, see [How Do I Add an S3 Bucket Policy?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html)
1. Use the `[create\-certificate\-authority\-audit\-report](https://docs.aws.amazon.com/cli/latest/reference/acm-pca/create-certificate-authority-audit-report.html)` command to create the audit report and to place it in the prepared S3 bucket\.
```
$ aws acm-pca create-certificate-authority-audit-report \
--certificate-authority-arn arn:aws:acm-pca:region:account:\ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
d578eda5ad4c-2 | --certificate-authority-arn arn:aws:acm-pca:region:account:\
certificate-authority/12345678-1234-1234-1234-123456789012 \
--s3-bucket-name bucket-name \
--audit-report-response-format JSON
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
bd1d4545fa20-0 | You can optionally configure encryption on the Amazon S3 bucket containing your audit reports\. ACM Private CA supports two encryption modes for assets in S3:
+ Automatic server\-side encryption with Amazon S3\-managed AES\-256 keys\.
+ Customer\-managed encryption using AWS Key Management Service and customer master keys \(CMKs\) configured to your specifications\.
**Note**
ACM Private CA does not support using default CMKs generated automatically by S3\.
The following procedures describe how to set up each of the encryption options\.
**To configure automatic encryption**
Complete the following steps to enable S3 server\-side encryption\.
1. Open the Amazon S3 console at [https://console\.aws\.amazon\.com/s3/](https://console.aws.amazon.com/s3/)\.
1. In the **Buckets** table, choose the bucket that will hold your ACM Private CA assets\.
1. On the page for your bucket, choose the **Properties** tab\.
1. Choose the **Default encryption** card\.
1. Choose **AES\-256**\.
1. Optionally view the bucket permissions policy, then choose **Save**\.
**To configure custom encryption**
Complete the following steps to enable encryption using a custom CMK\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
bd1d4545fa20-1 | **To configure custom encryption**
Complete the following steps to enable encryption using a custom CMK\.
1. \(Optional\) If you do not have an AWS KMS CMK already, create one using the following AWS CLI [create\-key](https://docs.aws.amazon.com/cli/latest/reference/kms/create-key.html) command:
```
aws kms create-key
```
The output contains the key ID and Amazon Resource Name \(ARN\) of the CMK\. The following is example output:
```
{
"KeyMetadata": {
"KeyId": "6f815f63-e628-448c-8251-e40cb0d29f59",
"Description": "",
"Enabled": true,
"KeyUsage": "ENCRYPT_DECRYPT",
"KeyState": "Enabled",
"CreationDate": 1478910250.94,
"Arn": "arn:aws:kms:us-west-2:123456789012:key/6f815f63-e628-448c-8251-e40cb0d29f59",
"AWSAccountId": "123456789012"
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
bd1d4545fa20-2 | "AWSAccountId": "123456789012"
}
}
```
1. Using the following steps, you give the ACM Private CA service principal permission to use the CMK\. By default, all AWS KMS CMKs are private; only the resource owner can use a CMK to encrypt and decrypt data\. However, the resource owner can grant permissions to access the CMK to other users and resources\. The service principal must be in the same region as where the CMK is stored\.
1. First, save the default policy for your CMK as `policy.json` using the following [get\-key\-policy](https://docs.aws.amazon.com/cli/latest/reference/kms/get-key-policy.html) command:
```
aws kms get-key-policy --key-id key-id --policy-name default --output text > ./policy.json
```
1. Open the `policy.json` file in a text editor and add the following statement:
```
{
"Sid":"Allow ACM-PCA use of the key",
"Effect":"Allow",
"Principal":{
"Service":"acm-pca.amazonaws.com"
},
"Action":[
"kms:GenerateDataKey",
"kms:Decrypt" | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
bd1d4545fa20-3 | },
"Action":[
"kms:GenerateDataKey",
"kms:Decrypt"
],
"Resource":"*",
"Condition":{
"StringLike":{
"kms:EncryptionContext:aws:s3:arn":[
"arn:aws:s3:::bucket_name/acm-pca-permission-test-key",
"arn:aws:s3:::bucket_name/acm-pca-permission-test-key-private",
"arn:aws:s3:::bucket_name/audit-report/*",
"arn:aws:s3:::bucket_name/crl/*"
]
}
}
}
```
1. Finally, add the updated policy using the following [put\-key\-policy](https://docs.aws.amazon.com/cli/latest/reference/kms/put-key-policy.html) command:
```
aws kms put-key-policy --key-id key-id --policy-name default --policy file://policy.json
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaAuditReport.md |
015cb89b3fbe-0 | ACM Private CA supports the following cryptographic algorithms for private key generation and certificate signing\. This list applies only to certificates issued directly by ACM Private CA through its console, API, or command line\.
**Supported algorithm**
| Private key algorithms | Signing algorithms |
| --- | --- |
| RSA\_2048 RSA\_4096 EC\_prime256v1 EC\_secp384r1 | SHA256WITHECDSASHA384WITHECDSASHA512WITHECDSASHA256WITHRSASHA384WITHRSASHA512WITHRSA |
**Note**
When AWS Certificate Manager issues certificates using a CA from ACM Private CA, it supports some but not all of these algorithms\. For more information, see [Request a Private Certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html) in the AWS Certificate Manager User Guide\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/supported-algorithms.md |
31d2fd1c2f57-0 | If you use AWS Certificate Manager to request a private certificate, you can associate that certificate with any service that is integrated with ACM\. This applies both to certificates chained to a ACM Private CA root and to certificates chained to an external root\. For more information, see [Integrated Services](https://docs.aws.amazon.com/acm/latest/userguide/acm-services.html) in the AWS Certificate Manager User Guide\.
If you use the ACM Private CA API or AWS CLI to issue a certificate or to export a private certificate from ACM, you can install the certificate anywhere you want\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaIntegratedServices.md |
1f9be3b0d547-0 | Like most AWS resources, private certificate authorities \(CAs\) are Regional resources\. To use private CAs in more than one Region, you must create your CAs in those Regions\. You cannot copy private CAs between Regions\. Visit [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#acm-pca_region) in the *AWS General Reference* or the [AWS Region Table](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) to see the Regional availability for ACM Private CA\.
**Note**
ACM is currently available in some regions that ACM Private CA is not\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaRegions.md |
d845b6867c1d-0 | The following CloudTrail example shows the results of a call to the [GetCertificateAuthorityCsr](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificateAuthorityCsr.html) operation\.
```
{
"eventVersion":"1.05",
"userIdentity":{
"type":"IAMUser",
"principalId":"account",
"arn":"arn:aws:iam::account:user/name",
"accountId":"account",
"accessKeyId":"Key_ID"
},
"eventTime":"2018-01-26T21:40:33Z",
"eventSource":"acm-pca.amazonaws.com",
"eventName":"GetCertificateAuthorityCsr",
"awsRegion":"us-east-1",
"sourceIPAddress":"xx.xx.xx.xx",
"userAgent":"aws-cli/1.14.28 Python/2.7.9 Windows/8 botocore/1.8.32",
"requestParameters":{ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-GetCACsr.md |
d845b6867c1d-1 | "requestParameters":{
"certificateAuthorityArn":"arn:aws:acm-pca:region:account:certificate-authority/ac5a7c2e-19c8-4258-b74e-351c2b791fe1"
},
"responseElements":null,
"requestID":"7ce9f3bc-b459-436b-bac1-61e75fca3c6e",
"eventID":"93115f0b-d528-447a-9b22-87f868dbfd8e",
"eventType":"AwsApiCall",
"recipientAccountId":"account"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-GetCACsr.md |
30c63c5dde74-0 | -----
*****Copyright © 2020 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
-----
Amazon's trademarks and trade dress may not be used in
connection with any product or service that is not Amazon's,
in any manner that is likely to cause confusion among customers,
or in any manner that disparages or discredits Amazon. All other
trademarks not owned by Amazon are the property of their respective
owners, who may or may not be affiliated with, connected to, or
sponsored by Amazon.
----- | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-0 | + [What Is ACM Private CA?](PcaWelcome.md)
+ [Regions](PcaRegions.md)
+ [Services Integrated with AWS Certificate Manager Private Certificate Authority](PcaIntegratedServices.md)
+ [Supported Cryptographic Algorithms](supported-algorithms.md)
+ [Quotas](PcaLimits.md)
+ [RFC Compliance](RFC-compliance.md)
+ [Pricing](PcaPricing.md)
+ [Security in AWS Certificate Manager Private Certificate Authority](security.md)
+ [Data Protection in AWS Certificate Manager Private Certificate Authority](data-protection.md)
+ [Identity and Access Management for AWS Certificate Manager Private Certificate Authority](security-iam.md)
+ [Cross-Account Access to Private CAs](pca-resource-sharing.md)
+ [Resource-Based Policies](pca-rbp.md)
+ [Logging and Monitoring for AWS Certificate Manager Private Certificate Authority](security-logging-and-monitoring.md)
+ [Supported CloudWatch Metrics](PcaCloudWatch.md)
+ [Using CloudWatch Events](CloudWatchEvents.md)
+ [Using CloudTrail](PcaCtIntro.md)
+ [Creating a Certificate Authority](CT-CreateCA.md)
+ [Creating an Audit Report](CT-CreateAuditReport.md)
+ [Deleting a Certificate Authority](CT-DeleteCA.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-1 | + [Deleting a Certificate Authority](CT-DeleteCA.md)
+ [Restoring a Certificate Authority](CT-RestoreCA.md)
+ [Describing a Certificate Authority](CT-DescribeCA.md)
+ [Retrieving a Certificate Authority Certificate](CT-GetCACertificate.md)
+ [Retrieving the Certificate Authority Signing Request](CT-GetCACsr.md)
+ [Retrieving a Certificate](CT-GetCertificate.md)
+ [Importing a Certificate Authority Certificate](CT-ImportCACertificate.md)
+ [Issuing a Certificate](CT-IssueCertificate.md)
+ [Listing Certificate Authorities](CT-ListCAs.md)
+ [Listing Tags](CT-ListTags.md)
+ [Revoking a Certificate](CT-RevokeCertificate.md)
+ [Tagging Private Certificate Authorities](CT-TagPCA.md)
+ [Removing Tags from a Private Certificate Authority](CT-UntagPCA.md)
+ [Updating a Certificate Authority](CT-UpdateCA.md)
+ [Compliance Validation for AWS Certificate Manager Private Certificate Authority](security-compliance-validation.md)
+ [Using Audit Reports with Your Private CA](PcaAuditReport.md)
+ [Infrastructure Security in AWS Certificate Manager Private Certificate Authority](infrastructure-security.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-2 | + [Infrastructure Security in AWS Certificate Manager Private Certificate Authority](infrastructure-security.md)
+ [ACM Private CA VPC Endpoints (AWS PrivateLink)](vpc-endpoints.md)
+ [ACM Private CA Best Practices](ca-best-practices.md)
+ [Planning Your ACM Private CA Deployment](PcaPlanning.md)
+ [Designing a CA Hierarchy](ca-hierarchy.md)
+ [Managing the Private CA Lifecycle](ca-lifecycle.md)
+ [Resilience in AWS Certificate Manager Private Certificate Authority](disaster-recovery-resilience.md)
+ [Creating and Managing a Private CA](PcaCreatingManagingCA.md)
+ [Setting Up ACM Private CA](PcaGettingStarted.md)
+ [Creating a Private CA and CRL](PcaCreateCa.md)
+ [Creating and Installing the Certificate for a Private CA](PCACertInstall.md)
+ [Enabling Access to a Private CA](granting-ca-access.md)
+ [Updating Your Private CA](PCAUpdateCA.md)
+ [Deleting Your Private CA](PCADeleteCA.md)
+ [Restoring Your Private CA](PCARestoreCA.md)
+ [Issuing and Revoking End-Entity Certificates](PcaUsing.md)
+ [Issuing a Private End-Entity Certificate](PcaIssueCert.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-3 | + [Issuing a Private End-Entity Certificate](PcaIssueCert.md)
+ [Revoking a Private Certificate](PcaRevokeCert.md)
+ [Understanding Certificate Templates](UsingTemplates.md)
+ [Using the ACM Private CA API (Java Examples)](PcaApiIntro.md)
+ [Create and Activate a Root CA Programmatically](JavaApi-ActivateRootCA.md)
+ [Create and Activate a Subordinate CA Programmatically](JavaApi-ActivateSubordinateCA.md)
+ [CreateCertificateAuthority](JavaApi-CreatePrivateCertificateAuthority.md)
+ [CreateCertificateAuthorityAuditReport](JavaApi-CreateCertificateAuthorityAuditReport.md)
+ [CreatePermission](JavaApi-CreatePermission.md)
+ [DeleteCertificateAuthority](JavaApi-DeleteCertificateAuthority.md)
+ [DeletePermission](JavaApi-DeletePermission.md)
+ [DeletePolicy](JavaApi-DeletePolicy.md)
+ [DescribeCertificateAuthority](JavaApi-DescribeCertificateAuthority.md)
+ [DescribeCertificateAuthorityAuditReport](JavaApi-DescribeCertificateAuthorityAuditReport.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-4 | + [DescribeCertificateAuthorityAuditReport](JavaApi-DescribeCertificateAuthorityAuditReport.md)
+ [GetCertificate](JavaApi-GetCertificate.md)
+ [GetCertificateAuthorityCertificate](JavaApi-GetCACertificate.md)
+ [GetCertificateAuthorityCsr](JavaApi-GetCertificateAuthorityCsr.md)
+ [GetPolicy](JavaApi-GetPolicy.md)
+ [ImportCertificateAuthorityCertificate](JavaApi-ImportCertificateAuthorityCertificate.md)
+ [IssueCertificate](JavaApi-IssueCertificate.md)
+ [ListCertificateAuthorities](JavaApi-ListCertificateAuthorities.md)
+ [ListPermissions](JavaApi-ListPermissions.md)
+ [ListTags](JavaApi-ListTags.md)
+ [PutPolicy](JavaApi-PutPolicy.md)
+ [RestoreCertificateAuthority](JavaApi-RestoreCertificateAuthority.md)
+ [RevokeCertificate](JavaApi-RevokeCertificate.md)
+ [TagCertificateAuthorities](JavaApi-TagPCA.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-5 | + [TagCertificateAuthorities](JavaApi-TagPCA.md)
+ [UntagCertificateAuthority](JavaApi-UnTagPCA.md)
+ [UpdateCertificateAuthority](JavaApi-UpdateCertificateAuthority.md)
+ [Signing Private CA Certificates with an External CA](PcaExternalRoot.md)
+ [Get a Certificate Signing Request (CSR)](PcaGetCsr.md)
+ [Sign Your Private CA Certificate](PcaSignCert.md)
+ [Import Your Private CA Certificate into ACM Private CA](PcaImportCaCert.md)
+ [Retrieve a Private Certificate Created by ACM Private CA](PcaGetCert.md)
+ [Retrieve a Certificate Authority (CA) Certificate](PcaGetCACert.md)
+ [Enforcing Name Constraints on a Private CA](name_constraints.md)
+ [Troubleshooting](PcaTsIntro.md)
+ [Creating and Signing a Private CA Certificate](PcaTsSignCsr.md)
+ [Configure Amazon S3 to Allow Creation of a CRL Bucket](PcaS3CsrBlock.md)
+ [Deleting a Self-signed CA Certificate](PcaRevokeSelfSigned.md)
+ [Amazon S3 Permissions and CRL Buckets](PCA-TA-S3.md)
+ [Handling Exceptions](PCATsExceptions.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
d69d23015cfb-6 | + [Handling Exceptions](PCATsExceptions.md)
+ [Terms and Concepts](PcaTerms.md)
+ [Document History](dochistory.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/index.md |
e4a31424f4e9-0 | The following CloudTrail example shows the results of a call to the [DeleteCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DeleteCertificateAuthority.html) operation\. In this example, the certificate authority cannot be deleted because it is in the `ACTIVE` state\.
```
{
"eventVersion":"1.05",
"userIdentity":{
"type":"IAMUser",
"principalId":"account",
"arn":"arn:aws:iam::account:user/name",
"accountId":"account",
"accessKeyId":"Key_ID"
},
"eventTime":"2018-01-26T22:01:11Z",
"eventSource":"acm-pca.amazonaws.com",
"eventName":"DeleteCertificateAuthority",
"awsRegion":"us-east-1",
"sourceIPAddress":"xx.xx.xx.xx",
"userAgent":"aws-cli/1.14.28 Python/2.7.9 Windows/8 botocore/1.8.32",
"errorCode":"InvalidStateException", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-DeleteCA.md |
e4a31424f4e9-1 | "errorCode":"InvalidStateException",
"errorMessage":"The certificate authority is not in a valid state for deletion.",
"requestParameters":{
"certificateAuthorityArn":"arn:aws:acm-pca:region:account:certificate-authority/09517d62-4f11-4bf8-a2c9-9e863792b675"
},
"responseElements":null,
"requestID":"dae3e14f-62f6-42f3-acf4-630c47a09ee4",
"eventID":"c40abfac-53f7-420a-9b55-c3f2f2139de8",
"eventType":"AwsApiCall",
"recipientAccountId":"account"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/CT-DeleteCA.md |
9d1a3385f5ce-0 | You can use the ACM Private CA API and AWS CLI to retrieve the certificate authority \(CA\) certificate for your private CA\. Run the `[get\-certificate\-authority\-certificate](https://docs.aws.amazon.com/cli/latest/reference/acm-pca/get-certificate-authority-certificate.html)` command\. You can also call the `[GetCertificateAuthorityCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificateAuthorityCertificate.html)` operation\. Use the `--output text` option to output the certificate without `<CR><LF>` pairs\.
```
aws acm-pca get-certificate-authority-certificate \
--certificate-authority-arn arn:aws:acm-pca:region:account:\
certificate-authority/12345678-1234-1234-1234-123456789012 \
--output text
```
This command outputs the base64 encoded PEM format certificate and the certificate chain\.
```
-----BEGIN CERTIFICATE-----
...Base64-encoded certificate...
-----END CERTIFICATE----
-----BEGIN CERTIFICATE-----
...Base64-encoded certificate... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCACert.md |
9d1a3385f5ce-1 | -----BEGIN CERTIFICATE-----
...Base64-encoded certificate...
-----END CERTIFICATE----
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCACert.md |
055a4eaf7847-0 | The following Java sample shows how to use the [GetCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificate.html) operation\.
The operation retrieves a certificate from your private CA\. The ARN of the certificate is returned when you call the [IssueCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_IssueCertificate.html) operation\. You must specify both the ARN of your private CA and the ARN of the issued certificate when calling the `GetCertificate` operation\. You can retrieve the certificate if it is in the `ISSUED` state\. You can call the [CreateCertificateAuthorityAuditReport](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html) operation to create a report that contains information about all of the certificates issued and revoked by your private CA\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-GetCertificate.md |
055a4eaf7847-1 | import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.GetCertificateRequest;
import com.amazonaws.services.acmpca.model.GetCertificateResult;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.RequestInProgressException;
import com.amazonaws.services.acmpca.model.RequestFailedException ;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.InvalidStateException;
import com.amazonaws.waiters.Waiter;
import com.amazonaws.waiters.WaiterParameters;
import com.amazonaws.waiters.WaiterTimedOutException;
import com.amazonaws.waiters.WaiterUnrecoverableException; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-GetCertificate.md |
055a4eaf7847-2 | import com.amazonaws.waiters.WaiterUnrecoverableException;
import com.amazonaws.services.acmpca.model.AWSACMPCAException;
public class GetCertificate {
public static void main(String[] args) throws Exception{
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from disk", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-GetCertificate.md |
055a4eaf7847-3 | AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create a request object.
GetCertificateRequest req = new GetCertificateRequest();
// Set the certificate ARN.
req.withCertificateArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012" +
"/certificate/793f0d5b6a04125e2c9cfb52373598fe");
// Set the certificate authority ARN.
req.withCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
// Create waiter to wait on successful creation of the certificate file.
Waiter<GetCertificateRequest> waiter = client.waiters().certificateIssued();
try {
waiter.run(new WaiterParameters<>(req));
} catch (WaiterUnrecoverableException e) { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-GetCertificate.md |
055a4eaf7847-4 | waiter.run(new WaiterParameters<>(req));
} catch (WaiterUnrecoverableException e) {
//Explicit short circuit when the recourse transitions into
//an undesired state.
} catch (WaiterTimedOutException e) {
//Failed to transition into desired state even after polling.
} catch (AWSACMPCAException e) {
//Unexpected service exception.
}
// Retrieve the certificate and certificate chain.
GetCertificateResult result = null;
try {
result = client.getCertificate(req);
} catch (RequestInProgressException ex) {
throw ex;
} catch (RequestFailedException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
} catch (InvalidArnException ex) {
throw ex;
} catch (InvalidStateException ex) {
throw ex;
}
// Get the certificate and certificate chain and display the result.
String strCert = result.getCertificate();
System.out.println(strCert);
}
}
```
Your output should be a certificate chain similar to the following for the certificate authority \(CA\) and certificate that you specified\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-GetCertificate.md |
055a4eaf7847-5 | ```
Your output should be a certificate chain similar to the following for the certificate authority \(CA\) and certificate that you specified\.
```
-----BEGIN CERTIFICATE----- base64-encoded certificate -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- base64-encoded certificate -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- base64-encoded certificate -----END CERTIFICATE-----
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-GetCertificate.md |
fd191a87bcff-0 | The following Java sample shows how to use the [RestoreCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RestoreCertificateAuthority.html) operation\. A private CA can be restored at any time during its restoration period\. Currently, this period can last 7 to 30 days from the date of deletion and can be defined when you delete the CA\. For more information, see [Restore a CA](PCARestoreCA.md)\. See also the [DeleteCertificateAuthority](JavaApi-DeleteCertificateAuthority.md) Java example\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.RestoreCertificateAuthorityRequest; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-RestoreCertificateAuthority.md |
fd191a87bcff-1 | import com.amazonaws.services.acmpca.model.RestoreCertificateAuthorityRequest;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.InvalidStateException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
public class RestoreCertificateAuthority {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from file.", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint = | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-RestoreCertificateAuthority.md |
fd191a87bcff-2 | EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create the request object.
RestoreCertificateAuthorityRequest req = new RestoreCertificateAuthorityRequest();
// Set the certificate authority ARN.
req.withCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
// Restore the CA.
try {
client.restoreCertificateAuthority(req);
} catch (InvalidArnException ex) {
throw ex;
} catch (InvalidStateException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
}
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-RestoreCertificateAuthority.md |
fb4f88aea10d-0 | You can delete a private CA permanently\. You might want to delete one, for example, to replace it with a new CA that has a new private key\. In order to delete a CA safely, follow these steps:
1. Create the replacement CA\.
1. Once the new private CA is in production, disable the old one but do not immediately delete it\.
1. Keep the old CA disabled until all of the certificates issued by it have expired\.
1. Delete the old CA\.
ACM Private CA does not check that all of the issued certificates have expired before it processes a delete request\. You can generate an [audit report](PcaAuditReport.md) to determine which certificates have expired\. While the CA is disabled, you can revoke certificates, but you cannot issue new ones\.
If you must delete a private CA before all the certificates it has issued have expired, we recommend that you also revoke the CA certificate\. The CA certificate will be listed in the CRL of the parent CA, and the private CA will be untrusted by clients\.
**Important** | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PCADeleteCA.md |
fb4f88aea10d-1 | **Important**
A private CA can be deleted if it is in the `PENDING_CERTIFICATE`, `CREATING`, `EXPIRED`, `DISABLED`, or `FAILED` state\. In order to delete a CA in the `ACTIVE` state, you must first disable it, or else the delete request results in an exception\. If you are deleting a private CA in the `PENDING_CERTIFICATE` or `DISABLED` state, you can set the length of its restoration period from 7 to 30 days, with 30 being the default\. During this period, status is set to `DELETED` and the CA is restorable\. A private CA that is deleted while in the `CREATING` or `FAILED` state has no assigned restoration period,and cannot be restored\. For more information, see [Restoring Your Private CA](PCARestoreCA.md)\.
You are not charged for a private CA after it has been deleted\. However, if a deleted CA is restored, you are charged for the time between deletion and restoration\. For more information, see [Pricing](PcaPricing.md)\.
You can delete a private CA from the AWS Management Console or AWS CLI\.
**To delete a private CA \(console\)**
1. Sign in to your AWS account and open the ACM Private CA console at [https://console\.aws\.amazon\.com/acm\-pca/home](https://console.aws.amazon.com/acm-pca/home)\.
1. Choose **Private CAs**\.
1. Choose your private CA from the list\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PCADeleteCA.md |
fb4f88aea10d-2 | 1. Choose **Private CAs**\.
1. Choose your private CA from the list\.
1. If your CA is in the `ACTIVE` state, you must disable it\. On the **Actions** menu, choose **Disable**\.
1. On the **Actions** menu, choose **Delete**\.
1. If your CA is in the `PENDING_CERTIFICATE`, `EXPIRED`, or `DISABLED` state, specify a restoration period of seven to 30 days\. Then choose **Delete**\.
**Note**
If your private CA is not in one of these states, it can not be restored later\.
1. If you are certain that you want to delete the private CA, choose **Permanently delete** when prompted\. The status of the private CA changes to `DELETED`\. However, you can restore the private CA before the end of the restoration period\. To check the restoration period of a private CA in the `DELETED` state, call the [DescribeCerticateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DescribeCertificateAuthority.html) or [ListCertificateAuthorities](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html) operation\.
**To delete a private CA \(AWS CLI\)** | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PCADeleteCA.md |
fb4f88aea10d-3 | **To delete a private CA \(AWS CLI\)**
Use the [delete\-certificate\-authority](https://docs.aws.amazon.com/cli/latest/reference/acm-pca/delete-certificate-authority.html) command to delete a private CA\.
```
aws acm-pca delete-certificate-authority \
--certificate-authority-arn arn:aws:acm-pca:region:account:\
certificate-authority/12345678-1234-1234-1234-123456789012 \
--permanent-deletion-time-in-days 16
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PCADeleteCA.md |
e5ee5e85f536-0 | If you have created a private subordinate CA that you want to sign with an external CA, you must retrieve a certificate signing request \(CSR\)\. Then save it to a file\. You can do this using the AWS Management Console or the AWS CLI as discussed in the procedures that follow\. If you want to inspect the CSR, use the following OpenSSL command:
```
openssl req -in path_to_CSR_file -text -noout
```
This command generates output similar to the following\. Notice that the **CA** extension is `TRUE`, indicating that the CSR is for a CA certificate\.
```
Certificate Request:
Data:
Version: 0 (0x0)
Subject: O=ExampleCompany, OU=Corporate Office, CN=Example CA 1
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:d4:23:51:b3:dd:01:09:01:0b:4c:59:e4:ea:81:
1d:7f:48:36:ef:2a:e9:45:82:ec:95:1d:c6:d7:c9:
7f:19:06:73:c5:cd:63:43:14:eb:c8:03:82:f8:7b: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
e5ee5e85f536-1 | 7f:19:06:73:c5:cd:63:43:14:eb:c8:03:82:f8:7b:
c7:89:e6:8d:03:eb:b6:76:58:70:f2:cb:c3:4c:67:
ea:50:fd:b9:17:84:b8:60:2c:64:9d:2e:d5:7d:da:
46:56:38:34:a9:0d:57:77:85:f1:6f:b8:ce:73:eb:
f7:62:a7:8e:e6:35:f5:df:0c:f7:3b:f5:7f:bd:f4:
38:0b:95:50:2c:be:7d:bf:d9:ad:91:c3:81:29:23:
b2:5e:a6:83:79:53:f3:06:12:20:7e:a8:fa:18:d6:
a8:f3:a3:89:a5:a3:6a:76:da:d0:97:e5:13:bc:84:
a6:5c:d6:54:1a:f0:80:16:dd:4e:79:7b:ff:6d:39: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
e5ee5e85f536-2 | a6:5c:d6:54:1a:f0:80:16:dd:4e:79:7b:ff:6d:39:
b5:67:56:cb:02:6b:14:c3:17:06:0e:7d:fb:d2:7e:
1c:b8:7d:1d:83:13:59:b2:76:75:5e:d1:e3:23:6d:
8a:5e:f5:85:ca:d7:e9:a3:f1:9b:42:9f:ed:8a:3c:
14:4d:1f:fc:95:2b:51:6c:de:8f:ee:02:8c:0c:b6:
3e:2d:68:e5:f8:86:3f:4f:52:ec:a6:f0:01:c4:7d:
68:f3:09:ae:b9:97:d6:fc:e4:de:58:58:37:09:9a:
f6:27
Exponent: 65537 (0x10001)
Attributes:
Requested Extensions:
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
e5ee5e85f536-3 | Requested Extensions:
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption
c5:64:0e:6c:cf:11:03:0b:b7:b8:9e:48:e1:04:45:a0:7f:cc:
a7:fd:e9:4d:c9:00:26:c5:6e:d0:7e:69:7a:fb:17:1f:f3:5d:
ac:f3:65:0a:96:5a:47:3c:c1:ee:45:84:46:e3:e6:05:73:0c:
ce:c9:a0:5e:af:55:bb:89:46:21:92:7b:10:96:92:1b:e6:75:
de:02:13:2d:98:72:47:bd:b1:13:1a:3d:bb:71:ae:62:86:1a:
ee:ae:4e:f4:29:2e:d6:fc:70:06:ac:ca:cf:bb:ee:63:68:14:
8e:b2:8f:e3:8d:e8:8f:e0:33:74:d6:cf:e2:e9:41:ad:b6:47: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
e5ee5e85f536-4 | f8:2e:7d:0a:82:af:c6:d8:53:c2:88:a0:32:05:09:e0:04:8f:
79:1c:ac:0d:d4:77:8e:a6:b2:5f:07:f8:1b:e3:98:d4:12:3d:
28:32:82:b5:50:92:a4:b2:4c:28:fc:d2:73:75:75:ff:10:33:
2c:c0:67:4b:de:fd:e6:69:1c:a8:bb:e8:31:93:07:35:69:b7:
d6:53:37:53:d5:07:dd:54:35:74:50:50:f9:99:7d:38:b7:b6:
7f:bd:6c:b8:e4:2a:38:e5:04:00:a8:a3:d9:e5:06:38:e0:38:
4c:ca:a9:3c:37:6d:ba:58:38:11:9c:30:08:93:a5:62:00:18:
d1:83:66:40
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
0cf129f33ce4-0 | Use this procedure if you followed the steps to [create a private CA](PcaCreateCa.md) in ACM Private CA and left the **Success** dialog box open\.
**To retrieve a CSR \(console\): method 1**
1. Immediately after ACM Private CA has successfully created your private CA, choose **Get started**\. The ACM Private CA console returns the CSR\. You can return to this step later\.
1. Choose **Export CSR to a file** and save it locally\.
1. Choose **Next**\.
1. Follow the instructions in [Sign Your Private CA Certificate](PcaSignCert.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
692cd3623495-0 | Use this procedure if you followed the steps to [create a private CA](PcaCreateCa.md) in ACM Private CA and closed the **Success** dialog box\.
**To retrieve a CSR \(console\): method 2**
1. When you are ready to continue, open the AWS Certificate Manager console and choose **Private CAs** in the left navigation pane\.
1. Select your private CA from the list\.
1. From the **Actions** menu, choose **Import CA certificate**\. The ACM Private CA console returns the CSR\.
1. Choose **Export CSR to a file** and save it locally\.
1. Choose **Next**\.
1. Follow the instructions in [Sign Your Private CA Certificate](PcaSignCert.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
326bd50a2b3d-0 | Use this procedure to retrieve a CSR using the AWS Command Line Interface\.
**To retrieve a CSR \(AWS CLI\)**
1. Use the [get\-certificate\-authority\-csr](https://docs.aws.amazon.com/cli/latest/reference/acm-pca/get-certificate-authority-csr.html) command to retrieve the certificate signing request \(CSR\) for your private CA\. If you want to send the CSR to your display, use the `--output text` option to eliminate CR/LF characters from the end of each line\. To send the CSR to a file, use the redirect option \(>\) followed by a file name\.
```
aws acm-pca get-certificate-authority-csr \
--certificate-authority-arn arn:aws:acm-pca:region:account:\
certificate-authority/12345678-1234-1234-1234-123456789012 \
--output text
```
1. Follow the instructions in [Sign Your Private CA Certificate](PcaSignCert.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/PcaGetCsr.md |
84f2ce279a55-0 | The following Java sample shows how to use the [UpdateCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_UpdateCertificateAuthority.html) operation\.
The operation updates the status or configuration of a private certificate authority \(CA\)\. Your private CA must be in the `ACTIVE` or `DISABLED` state before you can update it\. You can disable a private CA that is in the `ACTIVE` state or make a CA that is in the `DISABLED` state active again\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.UpdateCertificateAuthorityRequest;
import com.amazonaws.services.acmpca.model.CertificateAuthorityStatus; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-UpdateCertificateAuthority.md |
84f2ce279a55-1 | import com.amazonaws.services.acmpca.model.CertificateAuthorityStatus;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.ConcurrentModificationException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import com.amazonaws.services.acmpca.model.InvalidArgsException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.InvalidStateException;
import com.amazonaws.services.acmpca.model.InvalidPolicyException;
import com.amazonaws.services.acmpca.model.CrlConfiguration;
import com.amazonaws.services.acmpca.model.RevocationConfiguration;
public class UpdateCertificateAuthority {
public static void main(String[] args) throws Exception {
// Retrieve your credentials from the C:\Users\name\.aws\credentials file
// in Windows or the .aws/credentials file in Linux.
AWSCredentials credentials = null;
try {
credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-UpdateCertificateAuthority.md |
84f2ce279a55-2 | credentials = new ProfileCredentialsProvider("default").getCredentials();
} catch (Exception e) {
throw new AmazonClientException("Cannot load your credentials from file.", e);
}
// Define the endpoint for your sample.
String endpointRegion = "region"; // Substitute your region here, e.g. "us-west-2"
String endpointProtocol = "https://acm-pca." + endpointRegion + ".amazonaws.com/";
EndpointConfiguration endpoint =
new AwsClientBuilder.EndpointConfiguration(endpointProtocol, endpointRegion);
// Create a client that you can use to make requests.
AWSACMPCA client = AWSACMPCAClientBuilder.standard()
.withEndpointConfiguration(endpoint)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
// Create the request object.
UpdateCertificateAuthorityRequest req = new UpdateCertificateAuthorityRequest();
// Set the ARN of the private CA that you want to update.
req.setCertificateAuthorityArn("arn:aws:acm-pca:region:account:" + | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-UpdateCertificateAuthority.md |
84f2ce279a55-3 | req.setCertificateAuthorityArn("arn:aws:acm-pca:region:account:" +
"certificate-authority/12345678-1234-1234-1234-123456789012");
// Define the certificate revocation list configuration. If you do not want to
// update the CRL configuration, leave the CrlConfiguration structure alone and
// do not set it on your UpdateCertificateAuthorityRequest object.
CrlConfiguration crlConfigure = new CrlConfiguration();
crlConfigure.withEnabled(true);
crlConfigure.withExpirationInDays(365);
crlConfigure.withCustomCname("your-custom-name");
crlConfigure.withS3BucketName("your-bucket-name");
// Set the CRL configuration onto your UpdateCertificateAuthorityRequest object.
// If you do not want to change your CRL configuration, do not use the
// setCrlConfiguration method.
RevocationConfiguration revokeConfig = new RevocationConfiguration();
revokeConfig.setCrlConfiguration(crlConfigure);
req.setRevocationConfiguration(revokeConfig);
// Set the status. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-UpdateCertificateAuthority.md |
84f2ce279a55-4 | req.setRevocationConfiguration(revokeConfig);
// Set the status.
req.withStatus(CertificateAuthorityStatus.<<ACTIVE>>);
// Create the result object.
try {
client.updateCertificateAuthority(req);
} catch (ConcurrentModificationException ex) {
throw ex;
} catch (ResourceNotFoundException ex) {
throw ex;
} catch (InvalidArgsException ex) {
throw ex;
} catch (InvalidArnException ex) {
throw ex;
} catch (InvalidStateException ex) {
throw ex;
} catch (InvalidPolicyException ex) {
throw ex;
}
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-UpdateCertificateAuthority.md |
69331965976c-0 | The following Java sample shows how to use the [ImportCertificateAuthorityCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ImportCertificateAuthorityCertificate.html) operation\.
This operation imports your signed private CA certificate into ACM Private CA\. Before you can call this operation, you must create the private certificate authority by calling the [CreateCertificateAuthority](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html) operation\. You must then generate a certificate signing request \(CSR\) by calling the [GetCertificateAuthorityCsr](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificateAuthorityCsr.html) operation\. Take the CSR to your on\-premises CA and use your root certificate or a subordinate certificate to sign it\. Create a certificate chain and copy the signed certificate and the certificate chain to your working directory\.
```
package com.amazonaws.samples;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ImportCertificateAuthorityCertificate.md |
69331965976c-1 | import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.services.acmpca.AWSACMPCA;
import com.amazonaws.services.acmpca.AWSACMPCAClientBuilder;
import com.amazonaws.services.acmpca.model.ImportCertificateAuthorityCertificateRequest;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.acmpca.model.RequestInProgressException;
import com.amazonaws.services.acmpca.model.MalformedCertificateException;
import com.amazonaws.services.acmpca.model.ResourceNotFoundException;
import com.amazonaws.services.acmpca.model.ConcurrentModificationException;
import com.amazonaws.services.acmpca.model.InvalidArnException;
import com.amazonaws.services.acmpca.model.CertificateMismatchException;
import com.amazonaws.services.acmpca.model.RequestFailedException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.Objects; | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-private-ca-user-guide/doc_source/JavaApi-ImportCertificateAuthorityCertificate.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.