Skip to content

Commit

Permalink
Merge pull request #217 from xmidt-org/hostname-validation
Browse files Browse the repository at this point in the history
made insecure TLS configurable
  • Loading branch information
schmidtw authored May 21, 2020
2 parents 9af6fcf + ed84c5b commit 0b5d084
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

# Notes
- The next release needs to be v0.3.0 because #217 & #219.

## [Unreleased]
- Made outgoing hostname validation configurable [#217](https://github.com/xmidt-org/caduceus/pull/217)
- **Note:** To be backwards compatable, the configuration value of `allowInsecureTLS: true` will need to be defined, otherwise hostname validation is enabled by default.
- removed contentTypeCounter [#218](https://github.com/xmidt-org/caduceus/pull/218)
- added configuration for which http codes Caduceus should retry on [#219](https://github.com/xmidt-org/caduceus/pull/219)
- **Note:** This configuration change causes the existing retry logic to change.


## [v0.2.8]
### Changed
Expand Down
5 changes: 5 additions & 0 deletions caduceus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@
# numWorkerThreads: 3000
# jobQueueSize: 6000

# allowInsecureTLS provides a way to enable insecure TLS connections when
# sending events to webhooks.
# (Optional) defaults to false
allowInsecureTLS: true

# sender provides the details for each "sender" that services the unique
# webhook url endpoint
sender:
Expand Down
1 change: 1 addition & 0 deletions caduceus_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type CaduceusConfig struct {
JobQueueSize int
Sender SenderConfig
JWTValidators []JWTValidator
AllowInsecureTLS bool
}

type SenderConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func caduceus(arguments []string) int {
}

tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{InsecureSkipVerify: caduceusConfig.AllowInsecureTLS},
MaxIdleConnsPerHost: caduceusConfig.Sender.NumWorkersPerSender,
ResponseHeaderTimeout: caduceusConfig.Sender.ResponseHeaderTimeout,
IdleConnTimeout: caduceusConfig.Sender.IdleConnTimeout,
Expand Down

0 comments on commit 0b5d084

Please sign in to comment.