Skip to content

allow HTTPS *only* configuration in ATC - #4580

Closed
ctorboh15 wants to merge 1 commit into
concourse:masterfrom
ctorboh15:issue_2958_clean
Closed

ctorboh15 wants to merge 1 commit into
concourse:masterfrom
ctorboh15:issue_2958_clean

Conversation

@ctorboh15

@ctorboh15 ctorboh15 commented Oct 8, 2019 •

Copy link
Copy Markdown

Fixes #2958

Changes proposed in this pull request

added support for a CONCOURSE_TLS_ONLY configuration that will disable the non-TLS API listener.

** Note I had to reopen this as my other branch had a rogue unsigned commit that was getting out of hand **

…was starting to get messy

Signed-off-by: Cemah Tudae-Torboh <[email protected]>
@ctorboh15
ctorboh15 requested a review from a team October 8, 2019 14:59
@ctorboh15

Copy link
Copy Markdown
Author

@vito Can you take a look at this. I implemented your suggested changes

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the validation is a bit borked. 🙂

Comment thread atc/atccmd/command.go
if !cmd.isTLSEnabled() || !cmd.LetsEncrypt.Enable {
errs = multierror.Append(
errs,
errors.New("must specify a --tls-bind-port, or --enable-lets-encrypt to use TLS "),

@vito vito Oct 10, 2019 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This won't work because the switch statement will run the cmd.TLSBindPort == 0 (line 1157) instead. In fact it seems like a lot of these validations are kind of awkwardly overlapping as a result of using switch. 🤔 It's really one big chained else-if.

Using a switch statement here feels like it's not aging well. It could be refactored, or you could just put a if cmd.TLSOnly in the cmd.TLSBindPort == 0 branch. I'd be fine with both; the latter is probably less work.

The error can then read must specify --tls-bind-port in order to configure --tls-only. I don't think you need to mention Let's Encrypt at all.

@stale

stale Bot commented Apr 14, 2020

Copy link
Copy Markdown

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale Bot added the wontfix label Apr 14, 2020
@cirocosta cirocosta changed the title Issue # 2958 allow HTTPS *only* configuration in ATC Apr 15, 2020
@vito

vito commented May 6, 2020

Copy link
Copy Markdown
Contributor

Closing due to inactivity, but feel free to reopen once you have time - thanks!

@vito vito closed this May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ATC should allow HTTPS *only* configuration

3 participants