fix: adding more information about http-enabled (#33795)
closes: #33605 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
b2ccde29bb
commit
f06d76a5aa
9 changed files with 29 additions and 18 deletions
|
@ -10,13 +10,13 @@ public class HttpOptions {
|
||||||
|
|
||||||
public static final Option<Boolean> HTTP_ENABLED = new OptionBuilder<>("http-enabled", Boolean.class)
|
public static final Option<Boolean> HTTP_ENABLED = new OptionBuilder<>("http-enabled", Boolean.class)
|
||||||
.category(OptionCategory.HTTP)
|
.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)
|
.defaultValue(Boolean.FALSE)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
public static final Option<String> HTTP_HOST = new OptionBuilder<>("http-host", String.class)
|
public static final Option<String> HTTP_HOST = new OptionBuilder<>("http-host", String.class)
|
||||||
.category(OptionCategory.HTTP)
|
.category(OptionCategory.HTTP)
|
||||||
.description("The used HTTP Host.")
|
.description("The HTTP Host.")
|
||||||
.defaultValue("0.0.0.0")
|
.defaultValue("0.0.0.0")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,10 @@ public final class Messages {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String httpsConfigurationNotSet() {
|
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())) {
|
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();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class ManagementDistTest {
|
||||||
void testManagementNoHttps(LaunchResult result) {
|
void testManagementNoHttps(LaunchResult result) {
|
||||||
CLIResult cliResult = (CLIResult) result;
|
CLIResult cliResult = (CLIResult) result;
|
||||||
cliResult.assertNoMessage("Management interface listening on");
|
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
|
@Test
|
||||||
|
|
|
@ -159,8 +159,10 @@ Hostname v2:
|
||||||
HTTP(S):
|
HTTP(S):
|
||||||
|
|
||||||
--http-enabled <true|false>
|
--http-enabled <true|false>
|
||||||
Enables the HTTP listener. Default: false.
|
Enables the HTTP listener. Enabled by default in development mode. Typically
|
||||||
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
|
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>
|
--http-max-queued-requests <requests>
|
||||||
Maximum number of queued HTTP requests. Use this to shed load in an overload
|
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.
|
situation. Excess requests will return a "503 Server not Available" response.
|
||||||
|
|
|
@ -185,8 +185,10 @@ Hostname v2:
|
||||||
HTTP(S):
|
HTTP(S):
|
||||||
|
|
||||||
--http-enabled <true|false>
|
--http-enabled <true|false>
|
||||||
Enables the HTTP listener. Default: false.
|
Enables the HTTP listener. Enabled by default in development mode. Typically
|
||||||
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
|
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>
|
--http-max-queued-requests <requests>
|
||||||
Maximum number of queued HTTP requests. Use this to shed load in an overload
|
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.
|
situation. Excess requests will return a "503 Server not Available" response.
|
||||||
|
|
|
@ -160,8 +160,10 @@ Hostname v2:
|
||||||
HTTP(S):
|
HTTP(S):
|
||||||
|
|
||||||
--http-enabled <true|false>
|
--http-enabled <true|false>
|
||||||
Enables the HTTP listener. Default: false.
|
Enables the HTTP listener. Enabled by default in development mode. Typically
|
||||||
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
|
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>
|
--http-max-queued-requests <requests>
|
||||||
Maximum number of queued HTTP requests. Use this to shed load in an overload
|
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.
|
situation. Excess requests will return a "503 Server not Available" response.
|
||||||
|
|
|
@ -186,8 +186,10 @@ Hostname v2:
|
||||||
HTTP(S):
|
HTTP(S):
|
||||||
|
|
||||||
--http-enabled <true|false>
|
--http-enabled <true|false>
|
||||||
Enables the HTTP listener. Default: false.
|
Enables the HTTP listener. Enabled by default in development mode. Typically
|
||||||
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
|
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>
|
--http-max-queued-requests <requests>
|
||||||
Maximum number of queued HTTP requests. Use this to shed load in an overload
|
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.
|
situation. Excess requests will return a "503 Server not Available" response.
|
||||||
|
|
|
@ -145,8 +145,10 @@ Hostname v2:
|
||||||
HTTP(S):
|
HTTP(S):
|
||||||
|
|
||||||
--http-enabled <true|false>
|
--http-enabled <true|false>
|
||||||
Enables the HTTP listener. Default: false.
|
Enables the HTTP listener. Enabled by default in development mode. Typically
|
||||||
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
|
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>
|
--http-max-queued-requests <requests>
|
||||||
Maximum number of queued HTTP requests. Use this to shed load in an overload
|
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.
|
situation. Excess requests will return a "503 Server not Available" response.
|
||||||
|
|
|
@ -171,8 +171,10 @@ Hostname v2:
|
||||||
HTTP(S):
|
HTTP(S):
|
||||||
|
|
||||||
--http-enabled <true|false>
|
--http-enabled <true|false>
|
||||||
Enables the HTTP listener. Default: false.
|
Enables the HTTP listener. Enabled by default in development mode. Typically
|
||||||
--http-host <host> The used HTTP Host. Default: 0.0.0.0.
|
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>
|
--http-max-queued-requests <requests>
|
||||||
Maximum number of queued HTTP requests. Use this to shed load in an overload
|
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.
|
situation. Excess requests will return a "503 Server not Available" response.
|
||||||
|
|
Loading…
Reference in a new issue