-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use TLS protocol #200
Use TLS protocol #200
Conversation
a2b012e
to
9998d44
Compare
b2bcbf8
to
b1d260b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #200 +/- ##
==========================================
- Coverage 22.88% 22.14% -0.74%
==========================================
Files 15 16 +1
Lines 2836 2894 +58
==========================================
- Hits 649 641 -8
- Misses 2079 2137 +58
- Partials 108 116 +8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd/neofs-rest-gw/config.go
Outdated
@@ -428,7 +429,7 @@ type ServerConfig struct { | |||
} | |||
|
|||
const ( | |||
FlagScheme = "scheme" | |||
FlagScheme = "schemes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs some documentation in CHANGELOG, btw. "Updating from 0.8.3".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I revised the tls-*
section in config.yaml
and figured out that:
tls-listen-limit
is not used. Should we remove it?- It was stated in "Updating from 0.7.2":
Notice that server.scheme setting is an array, it was not enforced in the
previous version (it worked fine with a string), but 0.8.0 will not work with
this incorrect configuration, so please check your configurations.
However, it worked throughout the 0.8.* versions. Moreover, the HTTP server starts regardless of the scheme
/schemes
parameter. If we want to add HTTPS, we can set it as [https]
or [http, https]
. The value of it only affects the Swagger docs. Is this OK? Or do we want to stop the HTTP server from starting if it's not intentionally configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tls-listen-limit is not used. Should we remove it?
No other gateway has it, let's drop for now.
Moreover, the HTTP server starts regardless of the scheme/schemes parameter
How about dropping it completely? @smallhive
external-address
then would have to have the scheme in it, but it's OK
external-address: https://something.somewhere
instead of
schemes: [ https ]
external-address: something.somewhere
This can be explained in "upgrading from".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about dropping it completely? @smallhive
external-address then would have to have the scheme in it, but it's OK
external-address: https://something.somewhere
In this case, external-address
can be a list because the service can serve both HTTP and HTTPS. We should rename it to external-addresses
, I assume. Also, I need to add another flag that indicates we want to serve the TLS protocol, like tls-enabled
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
external-addresses
OK.
tls-enabled
S3:
tls:
enabled: true
cert_file: /path/to/cert
key_file: /path/to/key
node:
tls:
enabled: true # use TLS for a gRPC connection (min version is TLS 1.2)
certificate: /path/to/cert # path to TLS certificate
key: /path/to/key # path to TLS key
NeoGo:
// BasicService is used as a simple base for node services like Pprof, RPC or
// Prometheus monitoring.
type BasicService struct {
Enabled bool `yaml:"Enabled"`
// Addresses holds the list of bind addresses in the form of "address:port".
Addresses []string `yaml:"Addresses"`
}
// TLS describes SSL/TLS configuration.
TLS struct {
BasicService `yaml:",inline"`
CertFile string `yaml:"CertFile"`
KeyFile string `yaml:"KeyFile"`
}
There are differences, but they're minor. REST however is radically different. But it shouldn't be. Let's make it more like S3 or node but without introducing multi-address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
6706f38
to
564a4f8
Compare
CHANGELOG.md
Outdated
@@ -4,6 +4,15 @@ This document outlines major changes between releases. | |||
|
|||
## [Unreleased] | |||
|
|||
### Updating from 0.8.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.8.3! It's my mistake, we had so many 0.8.x that I started to think 0.8.4 is real. In fact it's not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Configuration parameters in the `server` section are reorganized. For example, `server.schema` and `tls-listen-limit` are removed, and some others are moved inside the array `server.endpoints`. The documentation in `gate-configuration.md` is updated. Flags in the command arguments are changed. Signed-off-by: Tatiana Nesterenko <[email protected]>
Signed-off-by: Tatiana Nesterenko <[email protected]>
564a4f8
to
c4f9507
Compare
I've made many changes; please conduct a thorough review again. Additionally, I would like to point out that:
|
The configuration structure of the REST gateway has changed: nspcc-dev/neofs-rest-gw#200 Close #791. Signed-off-by: Tatiana Nesterenko <[email protected]>
Close #170.