Disable the sys/raw endpoint by default (#3329)

* disable raw endpoint by default

* adding docs

* config option raw -> raw_storage_endpoint

* docs updates

* adding listing on raw endpoint

* reworking tests for enabled raw endpoints

* root protecting base raw endpoint
This commit is contained in:
Chris Hoffman
2017-09-15 00:21:35 -04:00
committed by GitHub
parent 2c6e64226c
commit 4a8c33cca3
14 changed files with 182 additions and 52 deletions

View File

@@ -62,6 +62,9 @@ func TestLoadConfigFile(t *testing.T) {
EnableUI: true,
EnableUIRaw: true,
EnableRawEndpoint: true,
EnableRawEndpointRaw: true,
MaxLeaseTTL: 10 * time.Hour,
MaxLeaseTTLRaw: "10h",
DefaultLeaseTTL: 10 * time.Hour,
@@ -129,6 +132,9 @@ func TestLoadConfigFile_json(t *testing.T) {
DisableMlockRaw: interface{}(nil),
EnableUI: true,
EnableUIRaw: true,
EnableRawEndpoint: true,
EnableRawEndpointRaw: true,
}
if !reflect.DeepEqual(config, expected) {
t.Fatalf("expected \n\n%#v\n\n to be \n\n%#v\n\n", config, expected)
@@ -178,6 +184,8 @@ func TestLoadConfigFile_json2(t *testing.T) {
EnableUI: true,
EnableRawEndpoint: true,
Telemetry: &Telemetry{
StatsiteAddr: "foo",
StatsdAddr: "bar",
@@ -232,6 +240,8 @@ func TestLoadConfigDir(t *testing.T) {
EnableUI: true,
EnableRawEndpoint: true,
Telemetry: &Telemetry{
StatsiteAddr: "qux",
StatsdAddr: "baz",