Closed sekulicd closed 2 years ago
since the daemon's operator interface can now be served with macaroon but without tls, the
--insecure
flag of the tdexdconnect service must be replaced with 2 flags--no-tls
and--no-macaroon
to have proper control on what to include in the connect URL that is gonna be generated.
Done
@tiero @altafan please review again.
@sekulicd @tiero I think in this PR we're forgetting about the case where the Operator service has TLS enabled with self-signed cert and extra_ip/extra_domain set.
As already discussed with dusan, the simplest solution is to override host
in cmd/tdexd/main.go
in case an operator extra domain or IP is set (by giving precedence to domain since both can be set).
At the same time, in config we should enforce that connectUrl host and operator extra ip/domain are mutually exclusive since the first means using a CA cert while the second ones mean using a self-signed cert for the operator interface.
@sekulicd @tiero I think in this PR we're forgetting about the case where the Operator service has TLS enabled with self-signed cert and extra_ip/extra_domain set. As already discussed with dusan, the simplest solution is to override
host
incmd/tdexd/main.go
in case an operator extra domain or IP is set (by giving precedence to domain since both can be set). At the same time, in config we should enforce that connectUrl host and operator extra ip/domain are mutually exclusive since the first means using a CA cert while the second ones mean using a self-signed cert for the operator interface.
@tiero @altafan please check if this is ok.
At the same time, in config we should enforce that connectUrl host and operator extra ip/domain are mutually exclusive since the first means using a CA cert while the second ones mean using a self-signed cert for the operator interface.
Don't think so, they are not mutually exclusive, but it's correct, if both given, they can't be different otherwise won't work.
What I would do is instead return error when given if they are different, in way that at least either IP or DOMAIN must be euqal to HOST.
extra_ip/extra_domain should only affect behvior of generation of self signed cert, and CONNECT_URL_HOST should only affect what is shown in the HTML Page.
We should also return error if IP/DOMAIN is given and NO_OPERATOR_TLS is given together
This adds protocol and host to the tdex connect url.
This closes #622
@tiero please review.