googleapis / googleapis/google-cloud-cpp
Refactor storage credentials
- Dominant language
- C++
- Stars
- 659
- Forks
- 462
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 89
Description
Storage introduced credentials in the public namespace `google::cloud::storage::oauth2`. These credential classes are now deprecated in favor of GUAC (`google::cloud::Credentials`):
https://github.com/googleapis/google-cloud-cpp/blob/80a518a357c93eec7ddc49666efcd7984135dafb/google/cloud/storage/oauth2/credentials.h#L45
However, the storage internals are implemented in terms of `google::cloud::storage::oauth2::Credentials`.
https://github.com/googleapis/google-cloud-cpp/blob/80a518a357c93eec7ddc49666efcd7984135dafb/google/cloud/storage/client.cc#L50
We map GUAC -> storage credentials.
https://github.com/googleapis/google-cloud-cpp/blob/80a518a357c93eec7ddc49666efcd7984135dafb/google/cloud/storage/client_options.cc#L296-L300
This is backwards. We need to map storage credentials to GUAC and use GUAC in the implementation, if we ever want to remove the deprecated credentials in `google::cloud::storage::oauth2`.
Contributor guide
Research direction
Start with google/cloud/storage/oauth2/credentials.h, google/cloud/storage/client.cc, and google/cloud/storage/client_options.cc, especially the cited credential mapping. Trace how storage credentials and google::cloud::Credentials flow through the storage internals. Done means the implementation uses GUAC credentials and the mapping direction is from storage credentials to GUAC, without relying on the deprecated public credential classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, google-cloud
- Domain
- authentication, backend-api-design, cloud
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100