-
Notifications
You must be signed in to change notification settings - Fork 504
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
service support https access #1036
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1036 +/- ##
============================================
- Coverage 69.20% 69.08% -0.13%
- Complexity 5403 5422 +19
============================================
Files 328 329 +1
Lines 26334 26411 +77
Branches 3750 3762 +12
============================================
+ Hits 18225 18246 +21
- Misses 6331 6379 +48
- Partials 1778 1786 +8 Continue to review full report at Codecov.
|
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.
also update title "add sup https"
@@ -212,4 +212,27 @@ public static synchronized ServerOptions instance() { | |||
disallowEmpty(), | |||
"hugegraph:9fd95c9c-711b-415b-b85f-d4df46ba5c31" | |||
); | |||
public static final ConfigOption<String> KEYSTORE_SERVER_FILE = | |||
new ConfigOption<>( | |||
"server.keystore.file", |
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.
prefer ssl.server_keystore_file
sslContext.setKeyStoreFile(keystoreServerFile); | ||
sslContext.setKeyStorePass(keystoreServerPassword); | ||
server = GrizzlyHttpServerFactory.createHttpServer(uri, rc, true, | ||
new SSLEngineConfigurator(sslContext) |
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.
define a var for 'new SSLEngineConfigurator(sslContext)'
|
||
public static final ConfigOption<String> SECURITY_PROTOCOL = | ||
new ConfigOption<>( | ||
"security.protocol", |
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.
prefer server.protocol
"server.keystore.password", | ||
"The server keystore password.", | ||
disallowEmpty(), | ||
"abc123" |
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.
don't set by default, just keep empty
public static final ConfigOption<String> KEYSTORE_SERVER_FILE = | ||
new ConfigOption<>( | ||
"server.keystore.file", | ||
"The server keystore file.", |
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.
improve description: The path of server keystore file used when https protocol is enabled
public static final ConfigOption<String> KEYSTORE_SERVER_PASSWORD = | ||
new ConfigOption<>( | ||
"server.keystore.password", | ||
"The server keystore password.", |
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.
improve description
|
||
public static final ConfigOption<String> KEYSTORE_SERVER_PASSWORD = | ||
new ConfigOption<>( | ||
"server.keystore.password", |
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.
prefer ssl.server_keystore_password
public static final ConfigOption<String> SECURITY_PROTOCOL = | ||
new ConfigOption<>( | ||
"security.protocol", | ||
"security.protocol.", |
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.
improve description
"The server keystore file.", | ||
"ssl.server_keystore_file", | ||
"The path of server keystore file used when https " + | ||
"protocol is 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.
align with "The path..."
"abc123" | ||
"ssl.server_keystore_password", | ||
"The password of the path of the server keystore file " + | ||
"used when the https protocol is 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.
ditto
"security.protocol", | ||
"security.protocol.", | ||
"server.protocol", | ||
"Fill in when https protocol is 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.
The protocol of rest-server, allowed values are: http or https.
new ConfigOption<>( | ||
"server.protocol", | ||
"Fill in when https protocol is enabled.", | ||
disallowEmpty(), |
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.
allowValues("http", "https")
"server.protocol", | ||
"The protocol of rest-server, allowed values are: " + | ||
"http or https.", | ||
allowValues("http","https"), |
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.
add an space between "http" and "https"
implement #445