You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgalt="Open in Cloud Shell"src ="http://gstatic.com/cloudssh/images/open-btn.png"></a>
5
+
6
+
Google [Cloud Private Certificate Authority Service](https://cloud.google.com/certificate-authority-service) is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA).
7
+
8
+
These sample Java applications demonstrate how to access the Cloud CA API using the
9
+
Google Java API Client Libraries.
10
+
11
+
## Prerequisites
12
+
13
+
### Google Cloud Project
14
+
15
+
Set up a Google Cloud project with billing enabled.
16
+
17
+
### Enable the API
18
+
19
+
You must [enable the Google Private Certificate Authority Service API](https://console.cloud.google.com/flows/enableapi?apiid=privateca.googleapis.com) for your project in order to use these samples.
20
+
21
+
### Service account
22
+
23
+
A service account with private key credentials is required to create signed bearer tokens.
24
+
Create a [service account](https://console.cloud.google.com/iam-admin/serviceaccounts/create) and download the credentials file as JSON.
25
+
26
+
### Set Environment Variables
27
+
28
+
You must set your project ID and service account credentials in order to run the tests.
You must ensure that the [user account or service account](https://cloud.google.com/iam/docs/service-accounts#differences_between_a_service_account_and_a_user_account) you used to authorize your gcloud session has the proper permissions to edit Private CA resources for your project. In the Cloud Console under IAM, add the following roles to the project whose service account you're using to test:
38
+
39
+
* Cloud CA Service Admin
40
+
* Cloud CA Service Certificate Requester
41
+
* Cloud CA Service Certificate Manager
42
+
* Cloud CA Service Certificate Template User
43
+
* Cloud CA Service Workload Certificate Requester
44
+
* Cloud CA Service Operation Manager
45
+
* Cloud CA Service Auditor
46
+
47
+
More information can be found in the [Google Private Certificate Authority Service Docs](https://cloud.google.com/certificate-authority-service/docs/reference/permissions-and-roles).
48
+
49
+
50
+
## Build and Run
51
+
52
+
The following instructions will help you prepare your development environment.
53
+
54
+
1. Download and install the [Java Development Kit (JDK)](https://www.oracle.com/java/technologies/javase-downloads.html).
55
+
Verify that the [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html) environment variable is set and points to your JDK installation.
56
+
57
+
58
+
2. Download and install [Apache Maven](http://maven.apache.org/download.cgi) by following the [Maven installation guide](http://maven.apache.org/install.html) for your specific operating system.
0 commit comments