Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add TLS support to http server - #332

#332
Merged
bnfinet merged 4 commits into
vouch:mastervouch/vouch-proxy:masterfrom
danfaizer:feature/297_add_tls_supportCopy head branch name to clipboard
Dec 8, 2020
Merged

Add TLS support to http server#332
bnfinet merged 4 commits into
vouch:mastervouch/vouch-proxy:masterfrom
danfaizer:feature/297_add_tls_supportCopy head branch name to clipboard

Conversation

@danfaizer

@danfaizer danfaizer commented Nov 17, 2020

Copy link
Copy Markdown
Contributor

This PR provides native TLS support. Related issue: #297

In order to enable TLS you must configure:

vouch:
  tls:
    cert: /path/to/signed_cert_plus_intermediates
    key: /path/to/private_key
    # profile: Optional. Define TLS configuration:  modern, intermediate, old, default
    profile: intermediate

Comment thread main.go
srv.TLSConfig = cfg.TLSConfig(cfg.Cfg.TLS.Profile)
logger.Fatal(srv.ListenAndServeTLS(cfg.Cfg.TLS.Cert, cfg.Cfg.TLS.Key))
}

@bnfinet bnfinet Nov 17, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

althought logger.Fatal is an exit event, could you please put the following srv.ListenAndServe (non TLS) in an else block for clarity

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread config/config.yml_example
# - myOrg
# - myOrg/myTeam

tls:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the the env var names in the documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danfaizer

Copy link
Copy Markdown
Contributor Author

Including coverage:

./do.sh coverage
?   	github.com/danfaizer/vouch-proxy	[no test files]
ok  	github.com/danfaizer/vouch-proxy/handlers	5.728s	coverage: 71.1% of statements
?   	github.com/danfaizer/vouch-proxy/pkg/capturewriter	[no test files]
ok  	github.com/danfaizer/vouch-proxy/pkg/cfg	0.241s	coverage: 59.5% of statements
ok  	github.com/danfaizer/vouch-proxy/pkg/cookie	(cached)	coverage: 42.3% of statements
ok  	github.com/danfaizer/vouch-proxy/pkg/domains	(cached)	coverage: 79.2% of statements
?   	github.com/danfaizer/vouch-proxy/pkg/healthcheck	[no test files]
ok  	github.com/danfaizer/vouch-proxy/pkg/jwtmanager	0.296s	coverage: 46.1% of statements
?   	github.com/danfaizer/vouch-proxy/pkg/providers/adfs	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/azure	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/common	[no test files]
ok  	github.com/danfaizer/vouch-proxy/pkg/providers/github	0.478s	coverage: 72.3% of statements
?   	github.com/danfaizer/vouch-proxy/pkg/providers/google	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/homeassistant	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/indieauth	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/nextcloud	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/openid	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/providers/openstax	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/responses	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/structs	[no test files]
?   	github.com/danfaizer/vouch-proxy/pkg/timelog	[no test files]

@bnfinet
bnfinet merged commit 81f50c0 into vouch:master Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.