-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
author Arvindh <arvindh91@gmail.com> 1688570218 +0530 committer Arvindh <arvindh91@gmail.com> 1689754950 +0530 Rebase with master and squash commits parent 1192325 author Arvindh <arvindh91@gmail.com> 1688570218 +0530 committer Arvindh <arvindh91@gmail.com> 1689174782 +0530 add: rootCA and clientCA in grpc server Signed-off-by: Arvindh <arvindh91@gmail.com> add: rootCA and client certificate in grpc client Signed-off-by: Arvindh <arvindh91@gmail.com> add: docker-compose for grpc-mtls and make target for mtls cert generation Signed-off-by: Arvindh <arvindh91@gmail.com> fix: typo in makefile Signed-off-by: Arvindh <arvindh91@gmail.com> fix: loadCertFile function in internal/clients/grpc/connect.go Signed-off-by: Arvindh <arvindh91@gmail.com> fix: env.parser test Signed-off-by: Arvindh <arvindh91@gmail.com> remove: commented lines Signed-off-by: Arvindh <arvindh91@gmail.com> add: make commands Signed-off-by: Arvindh <arvindh91@gmail.com> update: make commands and grpc clients Signed-off-by: Arvindh <arvindh91@gmail.com> fix: typo in makefile Signed-off-by: Arvindh <arvindh91@gmail.com> fix: loadCertFile function in internal/clients/grpc/connect.go Signed-off-by: Arvindh <arvindh91@gmail.com> remove: commented lines Signed-off-by: Arvindh <arvindh91@gmail.com> update: make commands and grpc clients Signed-off-by: Arvindh <arvindh91@gmail.com> update: make commands and docker-compose Signed-off-by: Arvindh <arvindh91@gmail.com> add: end of line Signed-off-by: Arvindh <arvindh91@gmail.com> fix: typos in makefile Signed-off-by: Arvindh <arvindh91@gmail.com> add: end of line Signed-off-by: Arvindh <arvindh91@gmail.com> fix: typos in makefile Signed-off-by: Arvindh <arvindh91@gmail.com> revert: grafana port in .env Signed-off-by: Arvindh <arvindh91@gmail.com> change: loadCertFile function Signed-off-by: Arvindh <arvindh91@gmail.com> change: certficate logic Signed-off-by: Arvindh <arvindh91@gmail.com> change: env name and update in compose file Signed-off-by: Arvindh <arvindh91@gmail.com> fix: makefile Signed-off-by: Arvindh <arvindh91@gmail.com>
- Loading branch information
1 parent
41be96a
commit 7e45318
Showing
42 changed files
with
749 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
services: | ||
bootstrap: | ||
environment: | ||
# Users gRPC client environmental varaibles | ||
MF_AUTH_GRPC_CLIENT_MTLS: ${MF_USERS_GRPC_CLIENT_MTLS} | ||
MF_AUTH_GRPC_CLIENT_TLS: ${MF_USERS_GRPC_CLIENT_TLS} | ||
MF_AUTH_GRPC_CLIENT_CERT: /users-grpc-client.crt | ||
MF_AUTH_GRPC_CLIENT_KEY: /users-grpc-client.key | ||
MF_AUTH_GRPC_SERVER_CA_CERTS: /users-grpc-server-ca.crt | ||
volumes: | ||
# Users gRPC client certificates | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_CERT}:/users-grpc-client.crt | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_KEY}:/users-grpc-client.key | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_SERVER_CA_CERTS}:/users-grpc-server-ca.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
docker/addons/cassandra-reader/docker-compose.grpc-mtls.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
services: | ||
cassandra-reader: | ||
environment: | ||
# Users gRPC client environmental varaibles | ||
MF_AUTH_GRPC_CLIENT_MTLS: ${MF_USERS_GRPC_CLIENT_MTLS} | ||
MF_AUTH_GRPC_CLIENT_TLS: ${MF_USERS_GRPC_CLIENT_TLS} | ||
MF_AUTH_GRPC_CLIENT_CERT: /users-grpc-client.crt | ||
MF_AUTH_GRPC_CLIENT_KEY: /users-grpc-client.key | ||
MF_AUTH_GRPC_SERVER_CA_CERTS: /users-grpc-server-ca.crt | ||
# Things gRPC client environmental varaibles | ||
MF_THINGS_AUTH_GRPC_CLIENT_MTLS: ${MF_THINGS_AUTH_GRPC_CLIENT_MTLS} | ||
MF_THINGS_AUTH_GRPC_CLIENT_TLS: ${MF_THINGS_AUTH_GRPC_CLIENT_TLS} | ||
MF_THINGS_AUTH_GRPC_CLIENT_CERT: /client.crt | ||
MF_THINGS_AUTH_GRPC_CLIENT_KEY: /client.key | ||
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: /server_ca.crt | ||
volumes: | ||
# Users gRPC client certificates | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_CERT}:/users-grpc-client.crt | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_KEY}:/users-grpc-client.key | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_SERVER_CA_CERTS}:/users-grpc-server-ca.crt | ||
# Things gRPC client certificates | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_CLIENT_CERT}:/client.crt | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_CLIENT_KEY}:/client.key | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS}:/server_ca.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
docker-compose -f docker/addons/cassandra-writer/docker-compose.yml --env-file docker/.env up -d | ||
sleep 20 | ||
docker exec mainflux-cassandra cqlsh -e "CREATE KEYSPACE IF NOT EXISTS mainflux WITH replication = {'class':'SimpleStrategy','replication_factor':'1'};" | ||
#!/usr/bin/env bash | ||
until printf "" 2>>/dev/null >>/dev/tcp/mainflux-cassandra/9042; do | ||
sleep 5; | ||
echo "Waiting for cassandra..."; | ||
done | ||
|
||
echo "Creating keyspace and table..." | ||
cqlsh mainflux-cassandra -e "CREATE KEYSPACE IF NOT EXISTS mainflux WITH replication = {'class':'SimpleStrategy','replication_factor':'1'};" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
services: | ||
certs: | ||
environment: | ||
# Users gRPC client environmental varaibles | ||
MF_AUTH_GRPC_CLIENT_MTLS: ${MF_USERS_GRPC_CLIENT_MTLS} | ||
MF_AUTH_GRPC_CLIENT_TLS: ${MF_USERS_GRPC_CLIENT_TLS} | ||
MF_AUTH_GRPC_CLIENT_CERT: /users-grpc-client.crt | ||
MF_AUTH_GRPC_CLIENT_KEY: /users-grpc-client.key | ||
MF_AUTH_GRPC_SERVER_CA_CERTS: /users-grpc-server-ca.crt | ||
volumes: | ||
# Users gRPC client certificates | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_CERT}:/users-grpc-client.crt | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_KEY}:/users-grpc-client.key | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_SERVER_CA_CERTS}:/users-grpc-server-ca.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
docker/addons/influxdb-reader/docker-compose.grpc-mtls.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
services: | ||
influxdb-reader: | ||
environment: | ||
# Users gRPC client environmental varaibles | ||
MF_AUTH_GRPC_CLIENT_MTLS: ${MF_USERS_GRPC_CLIENT_MTLS} | ||
MF_AUTH_GRPC_CLIENT_TLS: ${MF_USERS_GRPC_CLIENT_TLS} | ||
MF_AUTH_GRPC_CLIENT_CERT: /users-grpc-client.crt | ||
MF_AUTH_GRPC_CLIENT_KEY: /users-grpc-client.key | ||
MF_AUTH_GRPC_SERVER_CA_CERTS: /users-grpc-server-ca.crt | ||
# Things gRPC client environmental varaibles | ||
MF_THINGS_AUTH_GRPC_CLIENT_MTLS: ${MF_THINGS_AUTH_GRPC_CLIENT_MTLS} | ||
MF_THINGS_AUTH_GRPC_CLIENT_TLS: ${MF_THINGS_AUTH_GRPC_CLIENT_TLS} | ||
MF_THINGS_AUTH_GRPC_CLIENT_CERT: /client.crt | ||
MF_THINGS_AUTH_GRPC_CLIENT_KEY: /client.key | ||
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: /server_ca.crt | ||
volumes: | ||
# Users gRPC client certificates | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_CERT}:/users-grpc-client.crt | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_KEY}:/users-grpc-client.key | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_SERVER_CA_CERTS}:/users-grpc-server-ca.crt | ||
# Things gRPC client certificates | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_CLIENT_CERT}:/client.crt | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_CLIENT_KEY}:/client.key | ||
- ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS}:/server_ca.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.