Skip to content

Commit

Permalink
More user-friendly config descriptions for AcraConnector, AcraServer (#…
Browse files Browse the repository at this point in the history
…329)

* better config descriptions

* Update cmd/acra-server/acra-server.go

Co-Authored-By: Lagovas <[email protected]>

* Update cmd/acra-server/acra-server.go

Co-Authored-By: Lagovas <[email protected]>

* Update cmd/acra-connector/acra-connector.go

* regen configs
  • Loading branch information
vixentael authored Mar 13, 2019
1 parent 92dc016 commit 3ed82e6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmd/acra-connector/acra-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ func main() {
tlsCert := flag.String("tls_cert", "", "Path to certificate")
tlsAcraserverSNI := flag.String("tls_acraserver_sni", "", "Expected Server Name (SNI) from AcraServer")
tlsAuthType := flag.Int("tls_auth", int(tls.RequireAndVerifyClientCert), "Set authentication mode that will be used in TLS connection with AcraServer/AcraTranslator. Values in range 0-4 that set auth type (https://golang.org/pkg/crypto/tls/#ClientAuthType). Default is tls.RequireAndVerifyClientCert")
noEncryptionTransport := flag.Bool("acraserver_transport_encryption_disable", false, "Use raw transport (tcp/unix socket) between acraserver and acraproxy/client (don't use this flag if you not connect to database with ssl/tls")
noEncryptionTransport := flag.Bool("acraserver_transport_encryption_disable", false, "Enable this flag to omit AcraConnector and connect client app to AcraServer directly using raw transport (tcp/unix socket). From security perspective please use at least TLS encryption (over tcp socket) between AcraServer and client app.")
connectionString := flag.String("incoming_connection_string", network.BuildConnectionString(cmd.DefaultAcraConnectorConnectionProtocol, cmd.DefaultAcraConnectorHost, cmd.DefaultAcraConnectorPort, ""), "Connection string like tcp://x.x.x.x:yyyy or unix:///path/to/socket")
connectionAPIString := flag.String("incoming_connection_api_string", network.BuildConnectionString(cmd.DefaultAcraConnectorConnectionProtocol, cmd.DefaultAcraConnectorHost, cmd.DefaultAcraConnectorAPIPort, ""), "Connection string like tcp://x.x.x.x:yyyy or unix:///path/to/socket")
acraServerConnectionString := flag.String("acraserver_connection_string", "", "Connection string to AcraServer like tcp://x.x.x.x:yyyy or unix:///path/to/socket")
acraServerAPIConnectionString := flag.String("acraserver_api_connection_string", "", "Connection string to Acra's API like tcp://x.x.x.x:yyyy or unix:///path/to/socket")
prometheusAddress := flag.String("incoming_connection_prometheus_metrics_string", "", "URL which will be used to expose Prometheus metrics (use <URL>/metrics address to pull metrics)")
prometheusAddress := flag.String("incoming_connection_prometheus_metrics_string", "", "URL (tcp://host:port) which will be used to expose Prometheus metrics (use <URL>/metrics address to pull metrics)")

connectorModeString := flag.String("mode", "AcraServer", "Expected mode of connection. Possible values are: AcraServer or AcraTranslator. Corresponded connection host/port/string/session_id will be used.")
acraTranslatorHost := flag.String("acratranslator_connection_host", cmd.DefaultAcraTranslatorGRPCHost, "IP or domain to AcraTranslator daemon")
Expand Down
10 changes: 5 additions & 5 deletions cmd/acra-server/acra-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func main() {
apiPort := flag.Int("incoming_connection_api_port", cmd.DefaultAcraServerAPIPort, "Port for AcraServer for HTTP API")

keysDir := flag.String("keys_dir", keystore.DefaultKeyDirShort, "Folder from which will be loaded keys")
keysCacheSize := flag.Int("keystore_cache_size", keystore.InfiniteCacheSize, "Count of keys that will be stored in in-memory LRU cache in encrypted form. 0 - no limits, -1 - turn off cache")
keysCacheSize := flag.Int("keystore_cache_size", keystore.InfiniteCacheSize, "Maximum number of keys stored in in-memory LRU cache in encrypted form. 0 - no limits, -1 - turn off cache")

_ = flag.Bool("pgsql_hex_bytea", false, "Hex format for Postgresql bytea data (default)")
pgEscapeFormat := flag.Bool("pgsql_escape_bytea", false, "Escape format for Postgresql bytea data")
Expand All @@ -106,12 +106,12 @@ func main() {
enableHTTPAPI := flag.Bool("http_api_enable", false, "Enable HTTP API")

useTLS := flag.Bool("acraconnector_tls_transport_enable", false, "Use tls to encrypt transport between AcraServer and AcraConnector/client")
tlsKey := flag.String("tls_key", "", "Path to private key that will be used in TLS handshake with AcraConnector as server's key and Postgresql as client's key")
tlsKey := flag.String("tls_key", "", "Path to private key that will be used in AcraServer's TLS handshake with AcraConnector as server's key and database as client's key")
tlsCert := flag.String("tls_cert", "", "Path to tls certificate")
tlsCA := flag.String("tls_ca", "", "Path to root certificate which will be used with system root certificates to validate Postgresql's and AcraConnector's certificate")
tlsDbSNI := flag.String("tls_db_sni", "", "Expected Server Name (SNI) from Postgresql")
tlsAuthType := flag.Int("tls_auth", int(tls.RequireAndVerifyClientCert), "Set authentication mode that will be used in TLS connection with Postgresql. Values in range 0-4 that set auth type (https://golang.org/pkg/crypto/tls/#ClientAuthType). Default is tls.RequireAndVerifyClientCert")
noEncryptionTransport := flag.Bool("acraconnector_transport_encryption_disable", false, "Use raw transport (tcp/unix socket) between AcraServer and AcraConnector/client (don't use this flag if you not connect to database with ssl/tls")
tlsDbSNI := flag.String("tls_db_sni", "", "Expected Server Name (SNI) from database")
tlsAuthType := flag.Int("tls_auth", int(tls.RequireAndVerifyClientCert), "Set authentication mode that will be used in TLS connection with AcraConnector. Values in range 0-4 that set auth type (https://golang.org/pkg/crypto/tls/#ClientAuthType). Default is tls.RequireAndVerifyClientCert")
noEncryptionTransport := flag.Bool("acraconnector_transport_encryption_disable", false, "Use raw transport (tcp/unix socket) between AcraServer and AcraConnector/client (don't use this flag if you not connect to database with SSL/TLS")
clientID := flag.String("client_id", "", "Expected client ID of AcraConnector in mode without encryption")
acraConnectionString := flag.String("incoming_connection_string", network.BuildConnectionString(cmd.DefaultAcraServerConnectionProtocol, cmd.DefaultAcraServerHost, cmd.DefaultAcraServerPort, ""), "Connection string like tcp://x.x.x.x:yyyy or unix:///path/to/socket")
acraAPIConnectionString := flag.String("incoming_connection_api_string", network.BuildConnectionString(cmd.DefaultAcraServerConnectionProtocol, cmd.DefaultAcraServerHost, cmd.DefaultAcraServerAPIPort, ""), "Connection string for api like tcp://x.x.x.x:yyyy or unix:///path/to/socket")
Expand Down
4 changes: 2 additions & 2 deletions configs/acra-connector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ acraserver_securesession_id: acra_server
# Use tls to encrypt transport between AcraServer and AcraConnector/client
acraserver_tls_transport_enable: false

# Use raw transport (tcp/unix socket) between acraserver and acraproxy/client (don't use this flag if you not connect to database with ssl/tls
# Enable this flag to omit AcraConnector and connect client app to AcraServer directly using raw transport (tcp/unix socket). From security perspective please use at least TLS encryption (over tcp socket) between AcraServer and client app.
acraserver_transport_encryption_disable: false

# IP or domain to AcraTranslator daemon
Expand Down Expand Up @@ -62,7 +62,7 @@ incoming_connection_api_string: tcp://127.0.0.1:9191/
# Port to AcraConnector
incoming_connection_port: 9494

# URL which will be used to expose Prometheus metrics (use <URL>/metrics address to pull metrics)
# URL (tcp://host:port) which will be used to expose Prometheus metrics (use <URL>/metrics address to pull metrics)
incoming_connection_prometheus_metrics_string:

# Connection string like tcp://x.x.x.x:yyyy or unix:///path/to/socket
Expand Down
10 changes: 5 additions & 5 deletions configs/acra-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ acracensor_config_file:
# Use tls to encrypt transport between AcraServer and AcraConnector/client
acraconnector_tls_transport_enable: false

# Use raw transport (tcp/unix socket) between AcraServer and AcraConnector/client (don't use this flag if you not connect to database with ssl/tls
# Use raw transport (tcp/unix socket) between AcraServer and AcraConnector/client (don't use this flag if you not connect to database with SSL/TLS
acraconnector_transport_encryption_disable: false

# Acrastruct may be injected into any place of data cell
Expand Down Expand Up @@ -83,7 +83,7 @@ jaeger_collector_endpoint:
# Folder from which will be loaded keys
keys_dir: .acrakeys

# Count of keys that will be stored in in-memory LRU cache in encrypted form. 0 - no limits, -1 - turn off cache
# Maximum number of keys stored in in-memory LRU cache in encrypted form. 0 - no limits, -1 - turn off cache
keystore_cache_size: 0

# Logging format: plaintext, json or CEF
Expand Down Expand Up @@ -113,7 +113,7 @@ postgresql_enable: false
# Id that will be sent in secure session
securesession_id: acra_server

# Set authentication mode that will be used in TLS connection with Postgresql. Values in range 0-4 that set auth type (https://golang.org/pkg/crypto/tls/#ClientAuthType). Default is tls.RequireAndVerifyClientCert
# Set authentication mode that will be used in TLS connection with AcraConnector. Values in range 0-4 that set auth type (https://golang.org/pkg/crypto/tls/#ClientAuthType). Default is tls.RequireAndVerifyClientCert
tls_auth: 4

# Path to root certificate which will be used with system root certificates to validate Postgresql's and AcraConnector's certificate
Expand All @@ -122,10 +122,10 @@ tls_ca:
# Path to tls certificate
tls_cert:

# Expected Server Name (SNI) from Postgresql
# Expected Server Name (SNI) from database
tls_db_sni:

# Path to private key that will be used in TLS handshake with AcraConnector as server's key and Postgresql as client's key
# Path to private key that will be used in AcraServer's TLS handshake with AcraConnector as server's key and database as client's key
tls_key:

# Export trace data to jaeger
Expand Down

0 comments on commit 3ed82e6

Please sign in to comment.