GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DLP : Default application credentials are not getting picked up when running locally · Issue #2231 · googleapis/google-cloud-java

DLP : Default application credentials are not getting picked up when running locally #2231

New issue
Copy link
New issue
Copy link
Closed
Closed
DLP : Default application credentials are not getting picked up when running locally#2231
Copy link
Assignees
pongad
Labels
api: dlpIssues related to the Sensitive Data Protection API.authpriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@jabubake
jabubake
opened on Jul 11, 2017
Issue body actions

Running code locally gives me:
"Error in inspectString: io.grpc.StatusRuntimeException: PERMISSION_DENIED: DLP API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dlp.googleapis.com/overview?project=usable-auth-library then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."

I need to explicitly provide GOOGLE_APPLICATION_CREDENTIALS env var, gcloud auth application-default login does not work.

Activity

  1. jabubake
    assigned
    neozwu
    on Jul 11, 2017
  2. garrettjonesgoogle
    added
    api: dlpIssues related to the Sensitive Data Protection API.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Jul 17, 2017
  3. chanseokoh commented on Jul 27, 2017

    @chanseokoh
    chanseokoh
    on Jul 27, 2017
    Contributor
    More actions

    AFAIK, usable-auth-library is an internal project assigned to gcloud, and there may be a reason that the Cloud SDK team did not enable the DLP API. I know the team cannot enable APIs if the APIs end up charging the internal project.

    BTW, The DLP quickstart does not list Cloud SDK as a requirement, and it should work without gcloud installed: https://cloud.google.com/dlp/docs/quickstart-cli. Maybe it's intended that you should use GOOGLE_APPLICATION_CREDENTIALS as described in the quickstart?

  4. garrettjonesgoogle
    added
    auth
    on Aug 7, 2017
  5. garrettjonesgoogle commented on Aug 10, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Aug 10, 2017
    Contributor
    More actions

    We need to update the error we are seeing about the project project usable-auth-library, and guide people to use service account credentials instead.

  6. pongad commented on Jan 18, 2018

    @pongad
    pongad
    on Jan 18, 2018
    Contributor
    More actions

    Is there an action item here? IIUC, setting GOOGLE_APPLICATION_CREDENTIALS is recommneded per auth documentation

  7. chanseokoh commented on Jan 18, 2018

    @chanseokoh
    chanseokoh
    on Jan 18, 2018
    Contributor
    More actions

    One action item I suggest: make DLP not pick up the gcloud application default credential. The confusing error message about the gcloud project is because of this.

    BTW, DLP is probably not the only API that is disabled in the gcloud project.

  8. pongad commented on Jan 19, 2018

    @pongad
    pongad
    on Jan 19, 2018
    Contributor
    More actions

    @garrettjonesgoogle I believe the gcloud default credential is automatically looked up by GoogleCredentials.getApplicationDefault which also looks up GOOGLE_APPLICATION_CREDENTIALS env var right?

    @chanseokoh To make sure I understand you right, we should ignore the gcloud default (set on gcloud command) but continue to look up the env var?

  9. chanseokoh commented on Jan 19, 2018

    @chanseokoh
    chanseokoh
    on Jan 19, 2018
    Contributor
    More actions

    @pongad yeah, I think that is ideal, for APIs like DLP for which the internal gcloud project specifically disables. It should of course be able to get a credential through the env var.

  10. garrettjonesgoogle commented on Jan 21, 2018

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jan 21, 2018
    Contributor
    More actions

    @pongad I believe your understanding is correct.

  11. pongad commented on Feb 5, 2018

    @pongad
    pongad
    on Feb 5, 2018
    Contributor
    More actions

    I did some more digging. We are discouraging people and APIs from using gcloud auth application-default login and intend to deprecate this mechanism. Setting the env var is the preferable method.

    I'll close this as wontfix. Eventually, I believe the auth library should stop working with the gcloud command altogether. cc @vchudnov-g

  12. pongad
    closed this as completedon Feb 5, 2018
  13. jabubake commented on Feb 5, 2018

    @jabubake
    jabubake
    on Feb 5, 2018
    ContributorAuthor
    More actions

    @pongad : fine with this not working, but can we provide a better error message to the user here to ask them to set GOOGLE_APPLICATION_CREDENTIALS or link them to the right auth docs ?

  14. jabubake
    reopened this on Feb 5, 2018
  15. vchudnov-g commented on Feb 5, 2018

    @vchudnov-g
    vchudnov-g
    on Feb 5, 2018
    More actions

    @jabubake Internally, b/64388723 tracks the implementation of the better error message. I've added you to the cc list on that.

  16. jabubake
    closed this as completedon Feb 5, 2018
  17. theacodes
    unassigned
    neozwu
    on Sep 28, 2018
  18. JustinBeckwith
    assigned
    pongad
    on Feb 1, 2021
  19. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(main): release 2.33.1 (googleapis#2231)

    229134d
  20. meltsufin
    added 3 commits that reference this issue on Apr 29, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    0cbadd2

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    1d5b4a5

    chore(main): release 3.33.0 (#2231)

    676d211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @pongad
    pongad

Labels

api: dlpIssues related to the Sensitive Data Protection API.authpriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.