googleapis / googleapis/google-cloud-cpp

Incorrect credentials cause a crash while creating `Credentials`.

Open
#15,628 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: p2 type: bug
Dominant language
C++
Stars
659
Forks
463
Avg merge
1d 2h
Merged PRs (30d)
89

Description

**Does this issue affect the google-cloud-cpp project?**
Yes

**What component of `google-cloud-cpp` is this related to?**
Authentication
**Describe the bug**
Providing an incorrect credential file causes a crash.

**To Reproduce** Steps to reproduce the behavior:

1. Call `::google::cloud::MakeServiceAccountCredentials` with unparsable file contents.
2. It will crash.

**Expected behavior**
There should be no crash.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ::google::cloud::MakeServiceAccountCredentials and trace how unparsable credential file contents are handled. Reproduce the crash with invalid file contents, then verify the credentials creation path completes without crashing and add or update coverage for this case if the relevant test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.