Skip to content

Conversation

@danfaizer
Copy link
Contributor

@danfaizer danfaizer commented Nov 17, 2020

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

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

Copy link
Member

@bnfinet bnfinet Nov 17, 2020

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
Contributor Author

Choose a reason for hiding this comment

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

# - myOrg
# - myOrg/myTeam

tls:
Copy link
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
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
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