GoogleCloudPlatform / dlp-pdf-redaction

This solution provides an automated, serverless way to redact sensitive data from PDF files using Google Cloud Services like Data Loss Prevention (DLP), Cloud Workflows, and Cloud Run.
Apache License 2.0
48 stars 24 forks source link

Error 403: Your application is authenticating by using local Application Default Credentials #25

Open natea opened 1 month ago

natea commented 1 month ago

I'm trying to run the command: terraform -chdir=terraform apply -auto-approve and the following error is occurring:

│ Error: Error creating InspectTemplate: googleapi: Error 403: Your application is authenticating by using local Application Default Credentials. The dlp.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds .
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│     "domain": "googleapis.com",
│     "metadata": {
│       "consumer": "projects/764086051850",
│       "service": "dlp.googleapis.com"
│     },
│     "reason": "SERVICE_DISABLED"
│   }
│ ]
│
│   with module.pdf_redactor.google_data_loss_prevention_inspect_template.dlp_pdf_template,
│   on pdf-redactor/dlp.tf line 15, in resource "google_data_loss_prevention_inspect_template" "dlp_pdf_template":
│   15: resource "google_data_loss_prevention_inspect_template" "dlp_pdf_template" {

I then followed the suggested help doc https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds where it suggests to run the command gcloud auth application-default set-quota-project YOUR_PROJECT

So I ran that command with my project name.

$ gcloud auth application-default set-quota-project aeropsychiatry

Credentials saved to file: [/Users/nateaune/.config/gcloud/application_default_credentials.json]

These credentials will be used by any library that requests Application Default Credentials (ADC).

Quota project "aeropsychiatry" was added to ADC which can be used by Google client libraries for billing and quota. Note that some services may still bill the project owning the resource.

But I get the same error as before. Any ideas what might be going wrong?

felimartina commented 1 month ago

Hey @natea - are you running this using a project with billing enabled on it? or is it a free trial project?

flolopdel commented 1 week ago

Hello!

I am experiencing the same issue. I did all kind of test and search, but it's still saying the service is disabled.

I can create an inspect template properly from the Google cloud console. Any ideas to test it?

natea commented 1 week ago

Billing is enabled for the project.

Nate Aune - @.*** http://www.nateaune.com +1 (617) 517-4953

Sent via Superhuman iOS ( @.*** )

On Fri, Jul 19 2024 at 10:50 AM, Pipe Martina < @.*** > wrote:

Hey @natea ( https://github.com/natea ) - are you running this using a project with billing enabled on it? or is it a free trial project?

— Reply to this email directly, view it on GitHub ( https://github.com/GoogleCloudPlatform/dlp-pdf-redaction/issues/25#issuecomment-2239395186 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAA5BSF2YIR2JNRSRNEA35TZNERVBAVCNFSM6AAAAABLBAGM3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZGM4TKMJYGY ). You are receiving this because you were mentioned. Message ID: <GoogleCloudPlatform/dlp-pdf-redaction/issues/25/2239395186 @ github. com>