Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasrafael committed Jan 17, 2020
2 parents e7ba6ef + dd5466e commit 02d99cd
Show file tree
Hide file tree
Showing 11 changed files with 467 additions and 531 deletions.
16 changes: 0 additions & 16 deletions .env.backup.example

This file was deleted.

44 changes: 44 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,34 @@ AWS_BUCKET_NAME=YOUR_BUCKET_NAME
# default value: us-west-2
AWS_BUCKET_REGION=us-west-2

#################################################################################################
####################################### DS AGENT SETUP ##########################################
#################################################################################################

# FITBIT_CLIENT_ID: Client Id for Fitbit Application.
# default value: CLIENT_ID_HERE
FITBIT_CLIENT_ID=CLIENT_ID_HERE

# FITBIT_CLIENT_SECRET: Client Secret for Fitbit Application.
# default value: CLIENT_SECRET_HERE
FITBIT_CLIENT_SECRET=CLIENT_SECRET_HERE

# FITBIT_SUB_ID: Customer Subscriber ID, used to manage the subscriber who will
# receive notification of a user resource.
# default value: SUBSCRIBER_ID_HERE
FITBIT_SUB_ID=SUBSCRIBER_ID_HERE

# FITBIT_SUB_VERIFY_CODE: Code used by Fitbit to verify the subscriber.
# default value: CLIENT_SUBSCRIBER_HERE
FITBIT_SUB_VERIFY_CODE=CLIENT_SUBSCRIBER_HERE

# EXPRESSION_AUTO_SYNC Frequency time that the application will sync the users data in
# background according to the crontab expression.
# For example, the value 0 0 * * 0, means that the sync it will occurs
# every sunday at 00:00.
# default value: 0 0 * * 0
EXPRESSION_AUTO_SYNC=0 0 * * 0

#################################################################################################
############################# AUTHORIZATION/AUTHENTICATION SETUP ##############################
#################################################################################################
Expand Down Expand Up @@ -190,6 +218,14 @@ NOTIFICATION_DB_USER=notification.app
# example value: UVH5UXSrYBxY
NOTIFICATION_DB_PASS=UVH5UXSrYBxY

# DS_DB_USER: Username to connect to the Data Sync Agent Service database.
# example value: data.sync.app
DS_DB_USER=data.sync.app

# DS_DB_PASS Password to connect to the Data Sync Agent Service database.
# example value: vSEBnqsGmqAB
DS_DB_PASS=vSEBnqsGmqAB

#################################################################################################
##################################### MESSAGE CHANNEL SETUP #####################################
#################################################################################################
Expand All @@ -212,3 +248,11 @@ ANALYTICS_RABBITMQ_URI=amqp://analytics.app:PASSWORD@rabbitmq:5672/haniot
# NOTIFICATION_RABBITMQ_URI: URI containing the parameters for connection to the message channel.
# format value: amqp://user:pass@host:port/vhost
NOTIFICATION_RABBITMQ_URI=amqp://notification.app:PASSWORD@rabbitmq:5672/haniot

# TS_RABBITMQ_URI: URI containing the parameters for the Time Series Service to connect RabbitMQ.
# format value: amqp://user:pass@host:port/vhost
TS_RABBITMQ_URI=amqp://ts.app:PASSWORD@rabbitmq:5672/haniot

# DS_RABBITMQ_URI: URI containing the parameters for the Data Sync Agent Service to connect RabbitMQ.
# format value: amqp://user:pass@host:port/vhost
DS_RABBITMQ_URI=amqp://ds.app:PASSWORD@rabbitmq:5672/haniot
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@
url = https://github.com/haniot/dashboard-app.git
branch = develop
ignore = dirty
[submodule "ds-agent"]
path = ds-agent
url = https://github.com/haniot/ds-agent
branch = develop
ignore = dirty
[submodule "timeseries"]
path = timeseries
url = https://github.com/haniot/timeseries
branch = develop
ignore = dirty
47 changes: 30 additions & 17 deletions config/rabbitmq/rabbit_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"rabbit_version": "3.7.17",
"users": [
{
"name": "haniot",
"password_hash": "tXM03oxkv3u5noc7r2IWVmKKgP/WgulfbuvDejvcaHyIOmQa",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "administrator"
},
{
"name": "mhealth.app",
"password_hash": "8qmA09D/00iGatMvD0GG5CkjLv/i5KtmV3kWfNs4PU7iuqGz",
Expand All @@ -19,12 +25,6 @@
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "application"
},
{
"name": "haniot",
"password_hash": "RvFUpX+Cz8crrHeoL9E7EXJ8b+O27VA9ur6Q1EQLMkTvDjXZ",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "administrator"
},
{
"name": "account.app",
"password_hash": "OhtW1nz0JfbpvNV+SYydaEdrAvHSyNSqZdUzCswlyo+eaWJW",
Expand All @@ -38,10 +38,16 @@
"tags": "application"
},
{
"name": "guest",
"password_hash": "XUAFa2QwXO5a0qCAZQaGrUH0WjsfjnYvePOXEv0mDh/wPZSW",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "administrator"
"name":"ts.app",
"password_hash":"CQneZkEW+6SR2Ru2vXa3rImOk+ZJzGr1fS67ykdspQoldHLO",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"ds.app",
"password_hash":"i0+dBaEQUp1rksSSiemmWozkElxz6vSQ3P1gTFmIIzDyS1N7",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
}
],
"vhosts": [
Expand All @@ -60,13 +66,6 @@
"write": ".*",
"read": ".*"
},
{
"user": "guest",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "analytics.app",
"vhost": "haniot",
Expand Down Expand Up @@ -101,6 +100,20 @@
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "ts.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "ds.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
"topic_permissions": [
Expand Down
139 changes: 139 additions & 0 deletions config/rabbitmq/rabbit_config_dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"rabbit_version": "3.7.17",
"users": [
{
"name": "haniot",
"password_hash": "tXM03oxkv3u5noc7r2IWVmKKgP/WgulfbuvDejvcaHyIOmQa",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "administrator"
},
{
"name":"mhealth.app",
"password_hash":"SiStYSdwQeuWIVnNZSDJgAD/SEocEC44ivCDBLCkGc4RmXeQ",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"analytics.app",
"password_hash":"h6SQUC0mg1UIJwEJgq9RUKEIyLSuELRm0upE+SiHbfvL5u4P",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"ds.app",
"password_hash":"Nlx2Epat9/9EFvnXav59wRk7skxjsIIZcVB4ae73hNOO85eN",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"notification.app",
"password_hash":"NjMrU1es4P8tODShWr6c3/7/8ZsC0qxn9Zbd9+ahoJdRw6Xe",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"ts.app",
"password_hash":"ywXyyYZDdW1Ami0tbwYwrb/rnUTmWgyITBEZ7GnjmK1lpi26",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"account.app",
"password_hash":"xXPdu1nEOm9ncvsG23bFX5SgwimfgFwMu9IcoAtf0tQBaI2J",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
},
{
"name":"ehr.app",
"password_hash":"IE4DR2f4KIMNiFUy2Gv3anKXfRi14uqtPH8esQoIWJEF0NkA",
"hashing_algorithm":"rabbit_password_hashing_sha256",
"tags":"application"
}
],
"vhosts": [
{
"name": "haniot"
},
{
"name": "/"
}
],
"permissions": [
{
"user": "account.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "notification.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "ds.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "ehr.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "analytics.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "haniot",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "mhealth.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "ts.app",
"vhost": "haniot",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
"topic_permissions": [
{
"user": "haniot",
"vhost": "haniot",
"exchange": "",
"write": ".*",
"read": ".*"
}
],
"parameters": [],
"global_parameters": [
{
"name": "cluster_name",
"value": "rabbit@haniot"
}
],
"policies": [],
"queues": [],
"exchanges": [],
"bindings": []
}
12 changes: 6 additions & 6 deletions create-self-signed-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ req_extensions = v3_req
[req_distinguished_name]
C = BR
ST = PB
L = HANIoT
O = HANIoT
CN = haniot.nutes.uepb.edu.br
L = PB
O = HANIoT CA
CN = localhost
# Allow client and server auth. You may want to only allow server auth.
# Link to SAN names.
[v3_req]
Expand All @@ -57,10 +57,10 @@ EOF
openssl req \
-new \
-newkey rsa:2048 \
-days 120 \
-days 365 \
-nodes \
-x509 \
-subj "/C=BR/ST=PB/L=HANIoT/O=HANIoT CA" \
-subj "/C=BR/ST=PB/L=PB/O=HANIoT CA/CN=localhost" \
-keyout "${DIR}/ca.key" \
-out "${DIR}/ca.crt"
# For each server/service you want to secure with your CA, repeat the
Expand All @@ -81,7 +81,7 @@ openssl req \
# by our CA.
openssl x509 \
-req \
-days 120 \
-days 365 \
-in "${DIR}/server.csr" \
-CA "${DIR}/ca.crt" \
-CAkey "${DIR}/ca.key" \
Expand Down
Loading

0 comments on commit 02d99cd

Please sign in to comment.