apache / apache/camel-quarkus

Google-pubsub cover authentication options with tests

Open
#3,970 0 comments 0 reactions 1 assignee Claimed by @JiriOndrusek View on GitHub
Dominant language
Java
Stars
302
Forks
232
Avg merge
1d 20h
Merged PRs (30d)
114

Description

When google-pubsuv test coverage was improved (see [ticket](https://github.com/apache/camel-quarkus/issues/3910)), several authentication configurations without coverage were discovered. It would be nice to cover all of them (if possible). Manual test may be required for such cases.

[Documentation](https://cloud.google.com/docs/authentication#:~:text=You%20need%20to%20pass%20the,using%20the%20GOOGLE_APPLICATION_CREDENTIALS%20environment%20variable.) of the google cloud lists following configurations:

- `Accessing public data anonymously`- covered via emulated tests.
- `Accessing private data on behalf of an end user` **NOT** covered.
- `Accessing private data on behalf of a service account inside Google Cloud environments - Environment-provided service account` - **NOT** covered.
- `Accessing private data on behalf of a service account outside Google Cloud environments - Service account key` - covered via real account tests.

Cover also the call of the api from Camel from the `GooglePubsubComponent` (see [code](https://github.com/apache/camel/blob/main/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubComponent.java#L223))

>ServiceAccountCredentials.fromStream(ResourceHelper
.resolveMandatoryResourceAsInputStream(getCamelContext(), endpoint.getServiceAccountKey()))
.createScoped(PublisherStubSettings.getDefaultServiceScopes()))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.