AUTHENTICATION.md in google-cloud-security-private_ca-v1-0.1.4 vs AUTHENTICATION.md in google-cloud-security-private_ca-v1-0.1.5
- old
+ new
@@ -23,11 +23,11 @@
```
3. Initialize the client.
```ruby
-require "google/cloud/security/private_ca/v1"
+require "google/cloud/location"
client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
```
## Credential Lookup
@@ -71,11 +71,11 @@
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
```ruby
-require "google/cloud/security/private_ca/v1"
+require "google/cloud/location"
ENV["PRIVATE_CA_CREDENTIALS"] = "path/to/keyfile.json"
client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
```
@@ -84,21 +84,21 @@
The path to the **Credentials JSON** file can be configured instead of storing
it in an environment variable. Either on an individual client initialization:
```ruby
-require "google/cloud/security/private_ca/v1"
+require "google/cloud/location"
client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
config.credentials = "path/to/keyfile.json"
end
```
Or globally for all clients:
```ruby
-require "google/cloud/security/private_ca/v1"
+require "google/cloud/location"
::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
config.credentials = "path/to/keyfile.json"
end
@@ -118,52 +118,34 @@
3. Write code as if already authenticated.
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
*should* only be used during development.
-[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
-[dev-console]: https://console.cloud.google.com/project
-
-[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
-
-[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
-[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
-[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
-
## Creating a Service Account
Google Cloud requires **Service Account Credentials** to
connect to the APIs. You will use the **JSON key file** to
connect to most services with google-cloud-security-private_ca-v1.
If you are not running this client within
[Google Cloud Platform environments](#google-cloud-platform-environments), you
need a Google Developers service account.
-1. Visit the [Google Developers Console][dev-console].
+1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
2. Create a new project or click on an existing project.
-3. Activate the slide-out navigation tray and select **API Manager**. From
+3. Activate the menu in the upper left and select **APIs & Services**. From
here, you will enable the APIs that your application requires.
- ![Enable the APIs that your application requires][enable-apis]
-
*Note: You may need to enable billing in order to use these services.*
4. Select **Credentials** from the side navigation.
- You should see a screen like one of the following.
+ Find the "Create credentials" drop down near the top of the page, and select
+ "Service account" to be guided through downloading a new JSON key file.
- ![Create a new service account][create-new-service-account]
-
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
-
- Find the "Add credentials" drop down and select "Service account" to be
- guided through downloading a new JSON key file.
-
If you want to re-use an existing service account, you can easily generate a
- new key file. Just select the account you wish to re-use, and click "Generate
- new JSON key":
-
- ![Re-use an existing service account][reuse-service-account]
+ new key file. Just select the account you wish to re-use, click the pencil
+ tool on the right side to edit the service account, select the **Keys** tab,
+ and then select **Add Key**.
The key file you download will be used by this library to authenticate API
requests and should be stored in a secure location.