2021-04-18 15:41:13 -04:00
|
|
|
// Copyright (c) 2015-2021 MinIO, Inc.
|
|
|
|
//
|
|
|
|
// This file is part of MinIO Object Storage stack
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2019-10-23 01:59:13 -04:00
|
|
|
|
|
|
|
package logger
|
|
|
|
|
2021-03-01 12:19:13 -05:00
|
|
|
import (
|
2021-06-01 17:59:40 -04:00
|
|
|
"github.com/minio/minio/internal/config"
|
2021-03-01 12:19:13 -05:00
|
|
|
)
|
2019-10-23 01:59:13 -04:00
|
|
|
|
|
|
|
// Help template for logger http and audit
|
|
|
|
var (
|
2019-11-19 16:48:13 -05:00
|
|
|
Help = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: Endpoint,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: `HTTP(s) endpoint e.g. "http://localhost:8080/minio/logs/server"`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "url",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: AuthToken,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: `opaque string or JWT authorization token`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
2021-12-20 16:16:53 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: ClientCert,
|
|
|
|
Description: "mTLS certificate for Logger Webhook authentication",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
Sensitive: true,
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: ClientKey,
|
|
|
|
Description: "mTLS certificate key for Logger Webhook authentication",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
Sensitive: true,
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: QueueSize,
|
|
|
|
Description: "configure channel queue size for Logger Webhook targets",
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2023-02-22 00:19:46 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: Proxy,
|
|
|
|
Description: "proxy url endpoint e.g. http(s)://proxy",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 12:39:13 -04:00
|
|
|
HelpWebhook = config.HelpKVS{
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: Endpoint,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: `HTTP(s) endpoint e.g. "http://localhost:8080/minio/logs/audit"`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "url",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: AuthToken,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: `opaque string or JWT authorization token`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
2021-07-13 12:39:13 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: ClientCert,
|
|
|
|
Description: "mTLS certificate for Audit Webhook authentication",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
Sensitive: true,
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: ClientKey,
|
|
|
|
Description: "mTLS certificate key for Audit Webhook authentication",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
Sensitive: true,
|
|
|
|
},
|
2021-12-20 16:16:53 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: QueueSize,
|
|
|
|
Description: "configure channel queue size for Audit Webhook targets",
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2021-07-13 12:39:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
HelpKafka = config.HelpKVS{
|
2021-03-01 12:19:13 -05:00
|
|
|
config.HelpKV{
|
2021-07-13 12:39:13 -04:00
|
|
|
Key: KafkaBrokers,
|
|
|
|
Description: "comma separated list of Kafka broker addresses",
|
|
|
|
Type: "csv",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaTopic,
|
|
|
|
Description: "Kafka topic used for bucket notifications",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaSASLUsername,
|
|
|
|
Description: "username for SASL/PLAIN or SASL/SCRAM authentication",
|
2021-03-01 12:19:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2021-03-01 12:19:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2021-07-13 12:39:13 -04:00
|
|
|
Key: KafkaSASLPassword,
|
|
|
|
Description: "password for SASL/PLAIN or SASL/SCRAM authentication",
|
2021-03-01 12:19:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2021-03-01 12:19:13 -05:00
|
|
|
},
|
2021-07-13 12:39:13 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaSASLMechanism,
|
|
|
|
Description: "sasl authentication mechanism, default 'plain'",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaTLSClientAuth,
|
|
|
|
Description: "clientAuth determines the Kafka server's policy for TLS client auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaSASL,
|
|
|
|
Description: "set to 'on' to enable SASL authentication",
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaTLS,
|
|
|
|
Description: "set to 'on' to enable TLS",
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaTLSSkipVerify,
|
|
|
|
Description: `trust server TLS without verification, defaults to "on" (verify)`,
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaClientTLSCert,
|
|
|
|
Description: "path to client certificate for mTLS auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
Sensitive: true,
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaClientTLSKey,
|
|
|
|
Description: "path to client key for mTLS auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
Sensitive: true,
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: KafkaVersion,
|
|
|
|
Description: "specify the version of the Kafka cluster",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
|
|
|
Description: config.DefaultComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
)
|