Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5af8737
beginnnings of work to require email confirmation for users when regi…
B3rry Apr 8, 2019
65e404e
updating messagingProtocolProvider to track the identifier of the use…
B3rry Apr 8, 2019
2bd2f09
Additional work towards email verification
B3rry Apr 9, 2019
1c0903f
Added method for providing account username via token
B3rry Apr 11, 2019
e44839c
Adding work for email verification flow
B3rry Apr 11, 2019
5d05b58
Better email messages for auth actions, restricting reset-password fl…
B3rry Apr 15, 2019
370d503
Better naming for user db columns
B3rry Apr 15, 2019
68c2c54
minor security fix for logical operator on requesting a password token
B3rry Apr 15, 2019
c3804b9
fix for preventing requesting a password for a user to hang when a us…
B3rry Apr 15, 2019
c6baf81
Merge remote-tracking branch 'origin/develop' into feature/SER-280-re…
B3rry Apr 17, 2019
62c33b4
fixing linting issues
B3rry Apr 17, 2019
938ae5b
linting and code cleanup
B3rry Apr 17, 2019
5c2238c
updating env examples and fixed config.js to prevent crash on launch
B3rry Apr 17, 2019
0d3e77b
updating test env
B3rry Apr 17, 2019
ff07f50
fixing return for reset-password
B3rry Apr 17, 2019
dc35536
fixing return for reset-password in tests (via mailer helper)
B3rry Apr 17, 2019
5ae7615
second attempt fixing return for reset-password in tests (via mailer …
B3rry Apr 17, 2019
57f64a2
third attempt fixing return for reset-password in tests (via mailer h…
B3rry Apr 17, 2019
7af184f
fourth attempt fixing return for reset-password in tests (via mailer …
B3rry Apr 17, 2019
9f8f3aa
fixing linting errors
B3rry Apr 17, 2019
103b019
Minor fixes for PR #91
rmharrison Apr 17, 2019
7c299c4
Updating the error code returned for users who have not validated the…
B3rry May 2, 2019
487f3ed
updating naming
B3rry May 2, 2019
b105b7c
updating get route for verifying users
B3rry May 2, 2019
bb73c0b
renaming verification methods to provide additional clarity
B3rry May 2, 2019
f7156dd
Merge branch 'develop' into feature/SER-280-require-email-confirmation
B3rry May 2, 2019
a74ff69
updating auth user model names for verifying an email address
B3rry May 3, 2019
7e89bb2
Merge remote-tracking branch 'origin/develop' into feature/SER-280-re…
B3rry May 8, 2019
3f5a21a
fixing erroneous linting errors
B3rry May 8, 2019
23e4931
[SER-280] Fix calls to new APIError for updated constructor signature…
May 8, 2019
353f738
[SER-280] auth.controller.js clarify regex meaning, PR #91
May 9, 2019
6a934e0
[SER-280] clarify comments, PR #91
May 9, 2019
b57c68d
[SER-280] Fix langauge in verification email, PR #91
May 9, 2019
8ef5fac
[SER-280] README.md env var updates, PR #91
May 9, 2019
278d1fa
Updating migration script
B3rry May 14, 2019
946f9a7
Merge branch 'feature/SER-280-require-email-confirmation' of https://…
B3rry May 14, 2019
1d91ad4
removing unnecessary wrapping statement to migration script
B3rry May 14, 2019
0c72010
minor cleanup to add-validation-columns migration
B3rry May 14, 2019
d664c43
Merge branch 'develop' into feature/SER-280-require-email-confirmation
B3rry May 16, 2019
4ffcb0c
[SER-280] Fix comments
May 17, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ JWT_SECRET=0a6b944d-d2fb-46fc-a85e-0295c986cd9f
AUTH_SERVICE_PUBLIC_REGISTRATION=false
AUTH_SERVICE_REGISTRAR_SCOPES=["registrar"]

AUTH_SERVICE_REQUIRE_ACCOUNT_VERIFICATION=false
AUTH_SERVICE_REQUIRE_SECURE_ACCOUNT_VERIFICATION=true

AUTH_SERVICE_JWT_MODE=hmac
// AUTH_SERVICE_JWT_PRIVATE_KEY_PATH=private.key
// AUTH_SERVICE_JWT_PUBLIC_KEY_PATH=private.key.pub
Expand Down
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ JWT_SECRET=
// AUTH_SERVICE_PORT=
AUTH_SERVICE_ONLY_ADMIN_CAN_CREATE_USERS=false

AUTH_SERVICE_REQUIRE_ACCOUNT_VERIFICATION=false
Comment thread
mountHouli marked this conversation as resolved.
AUTH_SERVICE_REQUIRE_SECURE_ACCOUNT_VERIFICATION=true

AUTH_SERVICE_JWT_MODE=hmac
AUTH_SERVICE_JWT_PRIVATE_KEY_PATH=private.key
AUTH_SERVICE_JWT_PUBLIC_KEY_PATH=private.key.pub
Expand Down
3 changes: 3 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ AUTH_SERVICE_ONLY_ADMIN_CAN_CREATE_USERS=false
AUTH_SERVICE_PUBLIC_REGISTRATION=false
AUTH_SERVICE_REGISTRAR_SCOPES=["registrar"]

AUTH_SERVICE_REQUIRE_ACCOUNT_VERIFICATION=false
AUTH_SERVICE_REQUIRE_SECURE_ACCOUNT_VERIFICATION=false

AUTH_SERVICE_REFRESH_TOKEN_ENABLED=true
AUTH_SERVICE_REFRESH_TOKEN_MULTIPLE_DEVICES=false

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
### Added
- ENV `ALWAYS_INCLUDE_ERROR_STACKS` to include full error stack, including any causal errors.
* Use with caution in production, because the full stack could leak sensitive information.
- Optional email verification for users
* When `AUTH_SERVICE_REQUIRE_ACCOUNT_VERIFICATION=true`, a user cannot sign-in without email verification
* When `AUTH_SERVICE_REQUIRE_SECURE_ACCOUNT_VERIFICATION=true`, a user password is required for email verification

### Fixed
- `auth.controller.js:login()` no longer throws duplicate errors for incorrect username or password
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,11 @@ The port this server will run on.
- When in development, by default set to `4000`, because other Amida microservices run, by default, on other `400x` ports.

##### `AUTH_SERVICE_ONLY_ADMIN_CAN_CREATE_USERS` (Deprecated)

- This environment variable is no longer used. Use `AUTH_SERVICE_PUBLIC_REGISTRATION` instead.

##### `AUTH_SERVICE_PUBLIC_REGISTRATION` (Required) [`false`]

- When `false`, only a user who has `admin` OR a scope defined in `AUTH_SERVICE_REGISTRAR_SCOPES` can create new users.
- When `true`, anyone can sign up and create a new account.

Expand All @@ -367,7 +369,16 @@ The port this server will run on.
- Otherwise must be JSON array of strings (Use double quotes!) I.e. `["registrar"]`. Each string is a scope that will be allowed to create users.
- An empty array `[]` is acceptable and will allow only the `admin` scope to create users.

##### `AUTH_SERVICE_REQUIRE_ACCOUNT_VERIFICATION [`false`]

- When `true`, a user cannot sign-in without completing contact method verification process (currently only email is supported).

##### `AUTH_SERVICE_REQUIRE_SECURE_ACCOUNT_VERIFICATION` [false`]

- When `true`, a user is required to provide their password during the contact method verification process.

##### `AUTH_SERVICE_JWT_MODE` (Required) [`hmac`]

- When set to `hmac`, json web tokens will use the shared-secret signing strategy, in which case `JWT_SECRET` needs to be specified on and match between this microservice and all other services that integrate with this microservice.
- When set to `rsa`, json web tokens will use the public/private key pair signing strategy, in which case `JWT_PRIVATE_KEY` and `JWT_PUBLIC_KEY` need to be defined.

Expand Down
Loading