From ba33d6ee14b4e0599814e640bbd4b684f6e196d2 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 9 Jul 2021 09:36:26 -0700 Subject: [PATCH] Initial checkin for username creation --- run.sh | 24 ++++++ ucentralsec.properties.aws | 145 ++++++++++++++++++++++++++++++++++++ ucentralsec.properties.priv | 145 ++++++++++++++++++++++++++++++++++++ 3 files changed, 314 insertions(+) create mode 100755 run.sh create mode 100644 ucentralsec.properties.aws create mode 100644 ucentralsec.properties.priv diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..f739b17 --- /dev/null +++ b/run.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +daemon=ucentralsec + +if [[ "$1" == "aws" ]] +then + cp ${daemon}.properties.aws ${daemon}.properties + . /set_end.sh + cd cmake-build + ./${daemon} --daemon + echo "Running AWS version as daemon..." +fi + +if [[ "$1" == "priv" ]] +then + cp ${daemon}.properties.priv ${daemon}.properties + . /set_end.sh + cd cmake-build + ./${daemon} --daemon + echo "Running private version as daemon..." +fi + + + diff --git a/ucentralsec.properties.aws b/ucentralsec.properties.aws new file mode 100644 index 0000000..83bf8bd --- /dev/null +++ b/ucentralsec.properties.aws @@ -0,0 +1,145 @@ +# +# uCentral protocol server for devices. This is where you point +# all your devices. You can replace the * for address by the specific +# address of one of your interfaces +# + +# +# REST API access +# +ucentral.restapi.host.0.backlog = 100 +ucentral.restapi.host.0.security = relaxed +ucentral.restapi.host.0.rootca = $UCENTRALSEC_ROOT/certs/restapi-ca.pem +ucentral.restapi.host.0.address = * +ucentral.restapi.host.0.port = 16001 +ucentral.restapi.host.0.cert = $UCENTRALSEC_ROOT/certs/restapi-cert.pem +ucentral.restapi.host.0.key = $UCENTRALSEC_ROOT/certs/restapi-key.pem +ucentral.restapi.host.0.key.password = mypassword + +ucentral.internal.restapi.host.0.backlog = 100 +ucentral.internal.restapi.host.0.security = relaxed +ucentral.internal.restapi.host.0.rootca = $UCENTRALSEC_ROOT/certs/restapi-ca.pem +ucentral.internal.restapi.host.0.address = * +ucentral.internal.restapi.host.0.port = 17001 +ucentral.internal.restapi.host.0.cert = $UCENTRALSEC_ROOT/certs/restapi-cert.pem +ucentral.internal.restapi.host.0.key = $UCENTRALSEC_ROOT/certs/restapi-key.pem +ucentral.internal.restapi.host.0.key.password = mypassword + +# +# Generic section that all microservices must have +# +authentication.enabled = true +authentication.default.username = tip@ucentral.com +authentication.default.password = 13268b7daa751240369d125e79c873bd8dd3bef7981bdfd38ea03dbb1fbe7dcf +authentication.default.access = master +authentication.service.type = internal +ucentral.system.data = $UCENTRALSEC_ROOT/data +ucentral.system.debug = true +ucentral.system.uri.private = https://localhost:17001 +ucentral.system.uri.public = https://ucentral.dpaas.arilia.com:16001 +ucentral.system.commandchannel = /tmp/app.ucentralsec +ucentral.service.key = $UCENTRALSEC_ROOT/certs/restapi-key.pem + +# +# Security Microservice Specific Section +# +mailer.hostname = smtp.gmail.com +mailer.username = no-reply@arilia.com +mailer.password = ************************** +mailer.loginmethod = login +mailer.port = 587 + + +############################# +# Generic information for all micro services +############################# +# +# NLB Support +# +alb.enable = true +alb.port = 16101 + +# +# Kafka +# +ucentral.kafka.group.id = security +ucentral.kafka.client.id = security1 +ucentral.kafka.enable = true +ucentral.kafka.brokerlist = a1.arilia.com:9092 +# ucentral.kafka.brokerlist = debfarm1-node-c.arilia.com:9092 +ucentral.kafka.auto.commit = false +ucentral.kafka.queue.buffering.max.ms = 50 + +# +# This section select which form of persistence you need +# Only one selected at a time. If you select multiple, this service will die if a horrible +# death and might make your beer flat. +# +storage.type = sqlite +#storage.type = postgresql +#storage.type = mysql +#storage.type = odbc + +storage.type.sqlite.db = security.db +storage.type.sqlite.idletime = 120 +storage.type.sqlite.maxsessions = 128 + +storage.type.postgresql.maxsessions = 64 +storage.type.postgresql.idletime = 60 +storage.type.postgresql.host = localhost +storage.type.postgresql.username = stephb +storage.type.postgresql.password = snoopy99 +storage.type.postgresql.database = ucentral +storage.type.postgresql.port = 5432 +storage.type.postgresql.connectiontimeout = 60 + +storage.type.mysql.maxsessions = 64 +storage.type.mysql.idletime = 60 +storage.type.mysql.host = localhost +storage.type.mysql.username = stephb +storage.type.mysql.password = snoopy99 +storage.type.mysql.database = ucentral +storage.type.mysql.port = 3306 +storage.type.mysql.connectiontimeout = 60 + + +######################################################################## +######################################################################## +# +# Logging: please leave as is for now. +# +######################################################################## +logging.formatters.f1.class = PatternFormatter +logging.formatters.f1.pattern = %s: [%p] %t +logging.formatters.f1.times = UTC +logging.channels.c1.class = ConsoleChannel +logging.channels.c1.formatter = f1 + +# This is where the logs will be written. This path MUST exist +logging.channels.c2.class = FileChannel +logging.channels.c2.path = $UCENTRALSEC_ROOT/logs/log +logging.channels.c2.formatter.class = PatternFormatter +logging.channels.c2.formatter.pattern = %Y-%m-%d %H:%M:%S %s: [%p] %t +logging.channels.c2.rotation = 20 M +logging.channels.c2.archive = timestamp +logging.channels.c2.purgeCount = 20 +logging.channels.c3.class = ConsoleChannel +logging.channels.c3.pattern = %s: [%p] %t + +# External Channel +logging.loggers.root.channel = c2 +logging.loggers.root.level = debug + +# Inline Channel with PatternFormatter +# logging.loggers.l1.name = logger1 +# logging.loggers.l1.channel.class = ConsoleChannel +# logging.loggers.l1.channel.pattern = %s: [%p] %t +# logging.loggers.l1.level = information +# SplitterChannel +# logging.channels.splitter.class = SplitterChannel +# logging.channels.splitter.channels = l1,l2 +# logging.loggers.l2.name = logger2 +# logging.loggers.l2.channel = splitter + + + diff --git a/ucentralsec.properties.priv b/ucentralsec.properties.priv new file mode 100644 index 0000000..1e5649b --- /dev/null +++ b/ucentralsec.properties.priv @@ -0,0 +1,145 @@ +# +# uCentral protocol server for devices. This is where you point +# all your devices. You can replace the * for address by the specific +# address of one of your interfaces +# + +# +# REST API access +# +ucentral.restapi.host.0.backlog = 100 +ucentral.restapi.host.0.security = relaxed +ucentral.restapi.host.0.rootca = $UCENTRALSEC_ROOT/certs/restapi-ca.pem +ucentral.restapi.host.0.address = * +ucentral.restapi.host.0.port = 16001 +ucentral.restapi.host.0.cert = $UCENTRALSEC_ROOT/certs/restapi-cert.pem +ucentral.restapi.host.0.key = $UCENTRALSEC_ROOT/certs/restapi-key.pem +ucentral.restapi.host.0.key.password = mypassword + +ucentral.internal.restapi.host.0.backlog = 100 +ucentral.internal.restapi.host.0.security = relaxed +ucentral.internal.restapi.host.0.rootca = $UCENTRALSEC_ROOT/certs/restapi-ca.pem +ucentral.internal.restapi.host.0.address = * +ucentral.internal.restapi.host.0.port = 17001 +ucentral.internal.restapi.host.0.cert = $UCENTRALSEC_ROOT/certs/restapi-cert.pem +ucentral.internal.restapi.host.0.key = $UCENTRALSEC_ROOT/certs/restapi-key.pem +ucentral.internal.restapi.host.0.key.password = mypassword + +# +# Generic section that all microservices must have +# +authentication.enabled = true +authentication.default.username = tip@ucentral.com +authentication.default.password = 13268b7daa751240369d125e79c873bd8dd3bef7981bdfd38ea03dbb1fbe7dcf +authentication.default.access = master +authentication.service.type = internal +ucentral.system.data = $UCENTRALSEC_ROOT/data +ucentral.system.debug = true +ucentral.system.uri.private = https://localhost:17001 +ucentral.system.uri.public = https://local.dpaas.arilia.com:16001 +ucentral.system.commandchannel = /tmp/app.ucentralsec +ucentral.service.key = $UCENTRALSEC_ROOT/certs/restapi-key.pem + +# +# Security Microservice Specific Section +# +mailer.hostname = smtp.gmail.com +mailer.username = no-reply@arilia.com +mailer.password = ************************** +mailer.loginmethod = login +mailer.port = 587 + + +############################# +# Generic information for all micro services +############################# +# +# NLB Support +# +alb.enable = true +alb.port = 16101 + +# +# Kafka +# +ucentral.kafka.group.id = security +ucentral.kafka.client.id = security1 +ucentral.kafka.enable = true +# ucentral.kafka.brokerlist = a1.arilia.com:9092 +ucentral.kafka.brokerlist = debfarm1-node-c.arilia.com:9092 +ucentral.kafka.auto.commit = false +ucentral.kafka.queue.buffering.max.ms = 50 + +# +# This section select which form of persistence you need +# Only one selected at a time. If you select multiple, this service will die if a horrible +# death and might make your beer flat. +# +storage.type = sqlite +#storage.type = postgresql +#storage.type = mysql +#storage.type = odbc + +storage.type.sqlite.db = security.db +storage.type.sqlite.idletime = 120 +storage.type.sqlite.maxsessions = 128 + +storage.type.postgresql.maxsessions = 64 +storage.type.postgresql.idletime = 60 +storage.type.postgresql.host = localhost +storage.type.postgresql.username = stephb +storage.type.postgresql.password = snoopy99 +storage.type.postgresql.database = ucentral +storage.type.postgresql.port = 5432 +storage.type.postgresql.connectiontimeout = 60 + +storage.type.mysql.maxsessions = 64 +storage.type.mysql.idletime = 60 +storage.type.mysql.host = localhost +storage.type.mysql.username = stephb +storage.type.mysql.password = snoopy99 +storage.type.mysql.database = ucentral +storage.type.mysql.port = 3306 +storage.type.mysql.connectiontimeout = 60 + + +######################################################################## +######################################################################## +# +# Logging: please leave as is for now. +# +######################################################################## +logging.formatters.f1.class = PatternFormatter +logging.formatters.f1.pattern = %s: [%p] %t +logging.formatters.f1.times = UTC +logging.channels.c1.class = ConsoleChannel +logging.channels.c1.formatter = f1 + +# This is where the logs will be written. This path MUST exist +logging.channels.c2.class = FileChannel +logging.channels.c2.path = $UCENTRALSEC_ROOT/logs/log +logging.channels.c2.formatter.class = PatternFormatter +logging.channels.c2.formatter.pattern = %Y-%m-%d %H:%M:%S %s: [%p] %t +logging.channels.c2.rotation = 20 M +logging.channels.c2.archive = timestamp +logging.channels.c2.purgeCount = 20 +logging.channels.c3.class = ConsoleChannel +logging.channels.c3.pattern = %s: [%p] %t + +# External Channel +logging.loggers.root.channel = c2 +logging.loggers.root.level = debug + +# Inline Channel with PatternFormatter +# logging.loggers.l1.name = logger1 +# logging.loggers.l1.channel.class = ConsoleChannel +# logging.loggers.l1.channel.pattern = %s: [%p] %t +# logging.loggers.l1.level = information +# SplitterChannel +# logging.channels.splitter.class = SplitterChannel +# logging.channels.splitter.channels = l1,l2 +# logging.loggers.l2.name = logger2 +# logging.loggers.l2.channel = splitter + + +