Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MF-1096 - Fix AuthN and Things Auth ENVARS #1066

Merged
merged 32 commits into from
Apr 7, 2020
Merged

MF-1096 - Fix AuthN and Things Auth ENVARS #1066

merged 32 commits into from
Apr 7, 2020

Conversation

manuio
Copy link
Contributor

@manuio manuio commented Mar 9, 2020

Signed-off-by: Manuel Imperiale manuel.imperiale@gmail.com

  • Replace MF_AUTHN_URL, MF_AUTH_URL and MF_USERS_URL by MF_AUTHN_GRPC_URL.
  • Replace MF_THINGS_URL by MF_THINGS_AUTH_GRPC_URL.
  • Fix MF_THINGS_AUTH_GRPC_URL default values.
  • Fix README and docker-compose.yml

Resolves #921
Resolves #1041
Resolves #1089
Resolves #1096

@manuio manuio requested a review from a team as a code owner March 9, 2020 08:29
cmd/users/main.go Show resolved Hide resolved
cmd/users/main.go Show resolved Hide resolved
cmd/postgres-reader/main.go Outdated Show resolved Hide resolved
cmd/postgres-reader/main.go Show resolved Hide resolved
cmd/postgres-reader/main.go Show resolved Hide resolved
cmd/postgres-reader/main.go Show resolved Hide resolved
cmd/postgres-reader/main.go Show resolved Hide resolved
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
@codecov-io
Copy link

codecov-io commented Mar 9, 2020

Codecov Report

Merging #1066 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1066   +/-   ##
=======================================
  Coverage   77.13%   77.13%           
=======================================
  Files          95       95           
  Lines        6769     6769           
=======================================
  Hits         5221     5221           
  Misses       1211     1211           
  Partials      337      337           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update baf680c...baf680c. Read the comment docs.

drasko
drasko previously approved these changes Mar 9, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drasko
Copy link
Contributor

drasko commented Mar 21, 2020

@manuio is this still WIP? Can it be reviewed and merged?

@manuio
Copy link
Contributor Author

manuio commented Mar 21, 2020

@drasko We want to merge this one after the next release to avoid issues with the config

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
drasko
drasko previously approved these changes Mar 30, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this one does not break us, nothing will ;)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
drasko
drasko previously approved these changes Apr 3, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manuio manuio changed the title NOISSUE - Fix AuthN and Things Auth ENVARS MF-1096 - Fix AuthN and Things Auth ENVARS Apr 3, 2020
.env Outdated Show resolved Hide resolved
env.go Outdated Show resolved Hide resolved
mteodor
mteodor previously approved these changes Apr 3, 2020
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
http/README.md Outdated Show resolved Hide resolved
http/README.md Outdated
@@ -31,15 +31,15 @@ services:
image: mainflux/http:[version]
container_name: [instance name]
ports:
- [host machine port]:8180
- [host machine port]:8185
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is this

ws/README.md Outdated Show resolved Hide resolved
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
things/README.md Show resolved Hide resolved
things/README.md Outdated Show resolved Hide resolved
writers/mongodb/README.md Outdated Show resolved Hide resolved
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
things/README.md Outdated Show resolved Hide resolved
cmd/cassandra-reader/main.go Outdated Show resolved Hide resolved
blokovi
blokovi previously approved these changes Apr 6, 2020
Comment on lines 124 to 125
Username: mainflux.Env(envDBUser, defDBUser),
Password: mainflux.Env(envDBPass, defDBPass),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use user and pass here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't because it comes from here: "github.com/influxdata/influxdb/client/v2"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Cassandra config from readers/cassandra/init.go.


envLogLevel = "MF_MONGO_READER_LOG_LEVEL"
envPort = "MF_MONGO_READER_PORT"
envDBName = "MF_MONGO_READER_DB_NAME"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to use DB instead of DB_NAME for database names, this should be applied to all the services, including all the readers and writers. Both DB and DB_NAME are OK, as long as we're consistent.

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
drasko
drasko previously approved these changes Apr 7, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
.env Outdated
MF_INFLUX_READER_DB_PORT=8086
MF_INFLUX_READER_DB_USER=mainflux
MF_INFLUX_READER_DB_PASS=mainflux
MF_INFLUX_READER_DB_NAME=mainflux
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

.env Outdated
MF_INFLUX_WRITER_DB_USER=mainflux
MF_INFLUX_WRITER_DB_PASS=mainflux
MF_INFLUX_WRITER_DB_NAME=mainflux
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be DB?

Comment on lines 124 to 125
Username: mainflux.Env(envDBUser, defDBUser),
Password: mainflux.Env(envDBPass, defDBPass),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Cassandra config from readers/cassandra/init.go.

drasko
drasko previously approved these changes Apr 7, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drasko drasko merged commit 6c39c85 into absmach:master Apr 7, 2020
@manuio manuio deleted the envs branch April 7, 2020 10:02
manuio added a commit that referenced this pull request Oct 12, 2020
* NOISSUE - Fix AuthN and Things Auth ENVARS

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add DB envars to env.go

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix envars

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add DefLogLLevelError

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix DB names

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix DB names

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix DB names and HTTP ports

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix .env

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Revert writers DB names

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm unused Twins envars

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Remove definitions from env.go

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Revert HTTP gRPC ports

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use default NATS URL as string

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Revert default ports

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix cassandra ENVARS

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix cassandra reader ENVARS

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix readers and writers envars

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix readers and writers .env

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants