fix: adding more information about http-enabled (#33795)

closes: #33605

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2024-10-23 11:34:34 -04:00 committed by GitHub
parent b2ccde29bb
commit f06d76a5aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 29 additions and 18 deletions

View file

@ -10,13 +10,13 @@ public class HttpOptions {
public static final Option<Boolean> HTTP_ENABLED = new OptionBuilder<>("http-enabled", Boolean.class)
.category(OptionCategory.HTTP)
.description("Enables the HTTP listener.")
.description("Enables the HTTP listener. Enabled by default in development mode. Typically not enabled in production unless the server is fronted by a TLS termination proxy.")
.defaultValue(Boolean.FALSE)
.build();
public static final Option<String> HTTP_HOST = new OptionBuilder<>("http-host", String.class)
.category(OptionCategory.HTTP)
.description("The used HTTP Host.")
.description("The HTTP Host.")
.defaultValue("0.0.0.0")
.build();

View file

@ -33,11 +33,10 @@ public final class Messages {
}
public static String httpsConfigurationNotSet() {
StringBuilder builder = new StringBuilder("Key material not provided to setup HTTPS. Please configure your keys/certificates");
StringBuilder builder = new StringBuilder("Key material not provided to setup HTTPS. Please configure your keys/certificates, or if HTTPS access is not needed see the `http-enabled` option.");
if (!org.keycloak.common.util.Environment.DEV_PROFILE_VALUE.equals(org.keycloak.common.util.Environment.getProfile())) {
builder.append(" or start the server in development mode");
builder.append(" If you meant to start the server in development mode, see the `start-dev` command.");
}
builder.append(".");
return builder.toString();
}

View file

@ -48,7 +48,7 @@ public class ManagementDistTest {
void testManagementNoHttps(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertNoMessage("Management interface listening on");
cliResult.assertError("Key material not provided to setup HTTPS. Please configure your keys/certificates or start the server in development mode.");
cliResult.assertError("Key material not provided to setup HTTPS.");
}
@Test

View file

@ -159,8 +159,10 @@ Hostname v2:
HTTP(S):
--http-enabled <true|false>
Enables the HTTP listener. Default: false.
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
Enables the HTTP listener. Enabled by default in development mode. Typically
not enabled in production unless the server is fronted by a TLS termination
proxy. Default: false.
--http-host <host> The HTTP Host. Default: 0.0.0.0.
--http-max-queued-requests <requests>
Maximum number of queued HTTP requests. Use this to shed load in an overload
situation. Excess requests will return a "503 Server not Available" response.

View file

@ -185,8 +185,10 @@ Hostname v2:
HTTP(S):
--http-enabled <true|false>
Enables the HTTP listener. Default: false.
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
Enables the HTTP listener. Enabled by default in development mode. Typically
not enabled in production unless the server is fronted by a TLS termination
proxy. Default: false.
--http-host <host> The HTTP Host. Default: 0.0.0.0.
--http-max-queued-requests <requests>
Maximum number of queued HTTP requests. Use this to shed load in an overload
situation. Excess requests will return a "503 Server not Available" response.

View file

@ -160,8 +160,10 @@ Hostname v2:
HTTP(S):
--http-enabled <true|false>
Enables the HTTP listener. Default: false.
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
Enables the HTTP listener. Enabled by default in development mode. Typically
not enabled in production unless the server is fronted by a TLS termination
proxy. Default: false.
--http-host <host> The HTTP Host. Default: 0.0.0.0.
--http-max-queued-requests <requests>
Maximum number of queued HTTP requests. Use this to shed load in an overload
situation. Excess requests will return a "503 Server not Available" response.

View file

@ -186,8 +186,10 @@ Hostname v2:
HTTP(S):
--http-enabled <true|false>
Enables the HTTP listener. Default: false.
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
Enables the HTTP listener. Enabled by default in development mode. Typically
not enabled in production unless the server is fronted by a TLS termination
proxy. Default: false.
--http-host <host> The HTTP Host. Default: 0.0.0.0.
--http-max-queued-requests <requests>
Maximum number of queued HTTP requests. Use this to shed load in an overload
situation. Excess requests will return a "503 Server not Available" response.

View file

@ -145,8 +145,10 @@ Hostname v2:
HTTP(S):
--http-enabled <true|false>
Enables the HTTP listener. Default: false.
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
Enables the HTTP listener. Enabled by default in development mode. Typically
not enabled in production unless the server is fronted by a TLS termination
proxy. Default: false.
--http-host <host> The HTTP Host. Default: 0.0.0.0.
--http-max-queued-requests <requests>
Maximum number of queued HTTP requests. Use this to shed load in an overload
situation. Excess requests will return a "503 Server not Available" response.

View file

@ -171,8 +171,10 @@ Hostname v2:
HTTP(S):
--http-enabled <true|false>
Enables the HTTP listener. Default: false.
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
Enables the HTTP listener. Enabled by default in development mode. Typically
not enabled in production unless the server is fronted by a TLS termination
proxy. Default: false.
--http-host <host> The HTTP Host. Default: 0.0.0.0.
--http-max-queued-requests <requests>
Maximum number of queued HTTP requests. Use this to shed load in an overload
situation. Excess requests will return a "503 Server not Available" response.