@Immutable
public class AuditorConfig
extends java.lang.Object
implements com.scalar.dl.ledger.config.ServerConfig, com.scalar.dl.ledger.config.ServersHmacAuthenticatable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTHENTICATION_HMAC_CIPHER_KEY
scalar.dl.auditor.authentication.hmac.cipher_key (Optional)A cipher key used to encrypt and decrypt the HMAC secret keys of client entities. |
static java.lang.String |
AUTHENTICATION_METHOD
scalar.dl.auditor.authentication.method (Optional)The authentication method for a client and Auditor servers. |
static java.lang.String |
AUTHORIZATION_CREDENTIAL
scalar.dl.auditor.authorization.credential (Optional)An authorization credential. |
static java.lang.String |
CERT_HOLDER_ID
Deprecated.
This will be deleted in release 5.0.0 since Ledger-Auditor authentication will use
HMAC only.
|
static java.lang.String |
CERT_VERSION
Deprecated.
This will be deleted in release 5.0.0 since Ledger-Auditor authentication will use
HMAC only.
|
static java.lang.String |
LEDGER_CERT_HOLDER_ID
Deprecated.
This will be deleted in release 5.0.0 since Ledger-Auditor authentication will use
HMAC only.
|
static java.lang.String |
LEDGER_CERT_VERSION
Deprecated.
This will be deleted in release 5.0.0 since Ledger-Auditor authentication will use
HMAC only.
|
static java.lang.String |
LEDGER_HOST
scalar.dl.auditor.ledger.host (Optional) A hostname or an IP address of the server ("localhost" by default). |
static java.lang.String |
LEDGER_PORT
scalar.dl.auditor.ledger.port (Optional) A port number of the server (50051 by default). |
static java.lang.String |
LEDGER_PRIVILEGED_PORT
scalar.dl.auditor.ledger.privileged_port (Optional) A port number of the server for privileged services (50052 by default). |
static java.lang.String |
NAME
scalar.dl.auditor.name (Optional)Name of auditor ("Scalar Auditor" by default). |
static java.lang.String |
NAMESPACE
scalar.dl.auditor.namespace (Optional)Namespace of auditor tables ("auditor" by default). |
static java.lang.String |
PRIVATE_KEY_PATH
scalar.dl.auditor.private_key_path (Optional)The path of a private key file in PEM format. |
static java.lang.String |
PRIVATE_KEY_PEM
scalar.dl.auditor.private_key_pem (Optional)PEM-encoded private key data. |
static java.lang.String |
SERVER_ADMIN_PORT
scalar.dl.auditor.server.admin_port (Optional)Server admin port (40053 by default). |
static java.lang.String |
SERVER_PORT
scalar.dl.auditor.server.port (Optional)Server port (40051 by default). |
static java.lang.String |
SERVER_PRIVILEGED_PORT
scalar.dl.auditor.server.privileged_port (Optional)Server privileged port (40052 by default). |
static java.lang.String |
SERVER_PROMETHEUS_EXPORTER_PORT
scalar.dl.auditor.server.prometheus_exporter_port (Optional)Prometheus exporter port (8080 by default). |
static java.lang.String |
SERVER_TLS_CERT_CHAIN_PATH
scalar.dl.auditor.server.tls.cert_chain_path (Optional)Certificate chain file used for TLS communication. |
static java.lang.String |
SERVER_TLS_ENABLED
scalar.dl.auditor.server.tls.enabled (Optional)TLS between clients and servers (false by default). |
static java.lang.String |
SERVER_TLS_PRIVATE_KEY_PATH
scalar.dl.auditor.server.tls.private_key_path (Optional)Private key file used for TLS communication. |
static java.lang.String |
SERVERS_AUTHENTICATION_HMAC_SECRET_KEY
scalar.dl.auditor.servers.authentication.hmac.secret_key (Optional) A secret key of HMAC for the authentication of messages between (Ledger and Auditor) servers. |
static java.lang.String |
TLS_CA_ROOT_CERT_PATH
scalar.dl.auditor.tls.ca_root_cert_path (Optional)A custom CA root certificate (file path) for TLS communication. |
static java.lang.String |
TLS_CA_ROOT_CERT_PEM
scalar.dl.auditor.tls.ca_root_cert_pem (Optional)A custom CA root certificate (PEM data) for TLS communication. |
static java.lang.String |
TLS_ENABLED
scalar.dl.auditor.tls.enabled (Optional)A flag to enable TLS communication (false by default). |
Constructor and Description |
---|
AuditorConfig(java.io.File propertiesFile) |
AuditorConfig(java.io.InputStream stream) |
AuditorConfig(java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
int |
getAdminPort() |
com.scalar.dl.ledger.config.AuthenticationMethod |
getAuthenticationMethod() |
com.scalar.db.config.DatabaseConfig |
getDatabaseConfig() |
com.scalar.dl.client.config.DigitalSignatureIdentityConfig |
getDigitalSignatureIdentityConfig() |
java.lang.String |
getHmacCipherKey() |
java.lang.String |
getLedgerCertHolderId() |
int |
getLedgerCertVersion() |
com.scalar.dl.ledger.config.TargetConfig |
getLedgerTargetConfig() |
java.lang.String |
getName() |
java.lang.String |
getNamespace() |
int |
getPort() |
int |
getPrivilegedPort() |
java.lang.String |
getProductName() |
int |
getPrometheusExporterPort() |
java.lang.String |
getServersAuthenticationHmacSecretKey() |
java.lang.String |
getServerTlsCertChainPath() |
java.lang.String |
getServerTlsPrivateKeyPath() |
java.lang.String |
getServiceName() |
boolean |
isServerTlsEnabled() |
protected void |
load() |
java.lang.String |
toString() |
public static final java.lang.String NAME
scalar.dl.auditor.name
(Optional)public static final java.lang.String NAMESPACE
scalar.dl.auditor.namespace
(Optional)public static final java.lang.String AUTHENTICATION_METHOD
scalar.dl.auditor.authentication.method
(Optional)public static final java.lang.String AUTHENTICATION_HMAC_CIPHER_KEY
scalar.dl.auditor.authentication.hmac.cipher_key
(Optional)scalar.dl.auditor.authentication.method
is "hmac". Please set an
unpredictable and long enough value.public static final java.lang.String SERVER_PORT
scalar.dl.auditor.server.port
(Optional)public static final java.lang.String SERVER_PRIVILEGED_PORT
scalar.dl.auditor.server.privileged_port
(Optional)public static final java.lang.String SERVER_ADMIN_PORT
scalar.dl.auditor.server.admin_port
(Optional)public static final java.lang.String SERVER_PROMETHEUS_EXPORTER_PORT
scalar.dl.auditor.server.prometheus_exporter_port
(Optional)public static final java.lang.String SERVER_TLS_ENABLED
scalar.dl.auditor.server.tls.enabled
(Optional)public static final java.lang.String SERVER_TLS_CERT_CHAIN_PATH
scalar.dl.auditor.server.tls.cert_chain_path
(Optional)public static final java.lang.String SERVER_TLS_PRIVATE_KEY_PATH
scalar.dl.auditor.server.tls.private_key_path
(Optional)public static final java.lang.String LEDGER_HOST
scalar.dl.auditor.ledger.host
(Optional) public static final java.lang.String LEDGER_PORT
scalar.dl.auditor.ledger.port
(Optional) public static final java.lang.String LEDGER_PRIVILEGED_PORT
scalar.dl.auditor.ledger.privileged_port
(Optional) public static final java.lang.String SERVERS_AUTHENTICATION_HMAC_SECRET_KEY
scalar.dl.auditor.servers.authentication.hmac.secret_key
(Optional) scalar.dl.auditor.private_key_pem/path
for signing and
scalar.dl.auditor.ledger.cert_holder_id
and its corresponding certificate (stored in the
database) for verification@Deprecated public static final java.lang.String LEDGER_CERT_HOLDER_ID
scalar.dl.auditor.ledger.cert_holder_id
(Optional)@Deprecated public static final java.lang.String LEDGER_CERT_VERSION
scalar.dl.auditor.ledger.cert_version
(Optional)@Deprecated public static final java.lang.String CERT_HOLDER_ID
scalar.dl.auditor.cert_holder_id
(Optional)@Deprecated public static final java.lang.String CERT_VERSION
scalar.dl.auditor.cert_version
(Optional)public static final java.lang.String PRIVATE_KEY_PATH
scalar.dl.auditor.private_key_path
(Optional)
scalar.dl.auditor.proof.private_key_pem
is used for signing proofs with digital signatures. The signatures are also used for
Ledger to authenticate the corresponding proofs from Auditor if
scalar.dl.auditor.servers.authentication.hmac.secret_key
is empty.public static final java.lang.String PRIVATE_KEY_PEM
scalar.dl.auditor.private_key_pem
(Optional)scalar.dl.auditor.proof.private_key_path
is used for signing proofs with digital signatures. The signatures are also used for
Ledger to authenticate the corresponding proofs from Auditor if
scalar.dl.auditor.servers.authentication.hmac.secret_key
is empty.public static final java.lang.String TLS_ENABLED
scalar.dl.auditor.tls.enabled
(Optional)public static final java.lang.String TLS_CA_ROOT_CERT_PATH
scalar.dl.auditor.tls.ca_root_cert_path
(Optional)public static final java.lang.String TLS_CA_ROOT_CERT_PEM
scalar.dl.auditor.tls.ca_root_cert_pem
(Optional)public static final java.lang.String AUTHORIZATION_CREDENTIAL
scalar.dl.auditor.authorization.credential
(Optional)public AuditorConfig(java.io.File propertiesFile) throws java.io.IOException
java.io.IOException
public AuditorConfig(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
public AuditorConfig(java.util.Properties properties)
public com.scalar.db.config.DatabaseConfig getDatabaseConfig()
public java.lang.String getProductName()
public java.lang.String getServiceName()
getServiceName
in interface com.scalar.dl.ledger.config.ServerConfig
public java.lang.String getName()
getName
in interface com.scalar.dl.ledger.config.ServerConfig
public java.lang.String getNamespace()
public com.scalar.dl.ledger.config.AuthenticationMethod getAuthenticationMethod()
@Nullable public java.lang.String getHmacCipherKey()
public int getPort()
getPort
in interface com.scalar.dl.ledger.config.ServerConfig
public int getPrivilegedPort()
getPrivilegedPort
in interface com.scalar.dl.ledger.config.ServerConfig
public int getAdminPort()
getAdminPort
in interface com.scalar.dl.ledger.config.ServerConfig
public int getPrometheusExporterPort()
getPrometheusExporterPort
in interface com.scalar.dl.ledger.config.ServerConfig
public boolean isServerTlsEnabled()
isServerTlsEnabled
in interface com.scalar.dl.ledger.config.ServerConfig
public java.lang.String getServerTlsCertChainPath()
getServerTlsCertChainPath
in interface com.scalar.dl.ledger.config.ServerConfig
public java.lang.String getServerTlsPrivateKeyPath()
getServerTlsPrivateKeyPath
in interface com.scalar.dl.ledger.config.ServerConfig
@Nullable public com.scalar.dl.client.config.DigitalSignatureIdentityConfig getDigitalSignatureIdentityConfig()
@Nonnull public com.scalar.dl.ledger.config.TargetConfig getLedgerTargetConfig()
public java.lang.String getLedgerCertHolderId()
public int getLedgerCertVersion()
@Nullable public java.lang.String getServersAuthenticationHmacSecretKey()
getServersAuthenticationHmacSecretKey
in interface com.scalar.dl.ledger.config.ServersHmacAuthenticatable
protected void load()
public java.lang.String toString()
toString
in class java.lang.Object