This PR adds support to add client side (exporter) authenticators for HTTP and gRPC clients through extension based authenticators. This is built of top of what was added for receiver (server) side authenticators via extensions in #2603
**Link to tracking Issue:** #3115
**Testing:**
- Did a manual testing for static bearer token.
- Added unit tests
This PR changes the configauth to accept a `component.Host`, from which it will extract the authenticator to use based on a new authenticator `name` property.
This is only a draft at the moment, making sure that the general approach is acceptable.
Pending:
- [x] More unit tests
- [x] Review README files
- [x] Comprehensive examples
**Link to tracking Issue:**
Closes#2101
Contributes to #2603
**Testing:**
A couple of unit tests were added for the first phase. More comprehensive testing will be done once the main idea is validated.
**Documentation:**
None so far, README changes are planned
Remove hyphens sice the idiomatic style is to not have word delimiters
at all, or have `_` as an exception.
Remove `opentelemetry-` prefix since the package is within otlp already and
there a no types in that package directly i.e. alias is not a problem.
* Added round_robin balancer as an option to gRPC client settings
* Added documentation changes`
* Changed the balancerName setting from bool to string to accomodate new balancers in future
Setting invalid balancer is panicking. Hence validated the same & thrown an error
* Fixed test
* Fixed tests
* Replaced grpc.WithBalancerName with grpc.WithDefaultServiceConfig
* Validated the balancerName using a var string array instead of error control flow
* Fixed lint errors
* Fixed lint errors
* typo fix in documentation
* Added PerRPCCredentials for gRPC settings
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
* Changes based on the reviews
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
* Fixed per-RPC auth type in error message
Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
* Removed support for reading bearer token from file
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
Adding `ProtocolServerSettings` was a bit of a rush. We determined that `endpoint` has different meaning based on protocol, also not all the protocols support TLS.
In this PR we revert embedding `ProtocolServerSettings` in the GRPCServerSettings and make it consistent with HttpServerSettings.
Work left: Consistent config name for TLS settings `tls_settings` or `tls_credentials`.
* Refactor common client TLS configuration.
* Formatting and such
* Add insecure options for test bed exporters
* Fix logic in opencensus exporter
* Add insecure flag to test configs
* Rename object and simplify loading of gRPC Credentials
* Remove public compression package, and move to gRPC.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Update config/configgrpc/configgrpc.go
Co-authored-by: James Bebbington <jbebbington@google.com>
Co-authored-by: James Bebbington <jbebbington@google.com>
* Support mTLS in gRPC exporters
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
* Rename to CaCert
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
* Add tests
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
* Fix lint
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
* rename load func
Signed-off-by: Pavol Loffay <ploffay@redhat.com>