Skip to content

Commit

Permalink
Merge branch 'master' into bpmn-example
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatdubeysf authored Apr 17, 2021
2 parents 580a860 + 1e71828 commit 9c78289
Show file tree
Hide file tree
Showing 21 changed files with 300 additions and 804 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions sandbox/auth-multitenant-example/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-alpha.21](https://github.com/sourcefuse/loopback4-microservice-catalog/compare/@sourceloop/[email protected]...@sourceloop/[email protected]) (2021-03-31)

**Note:** Version bump only for package @sourceloop/auth-multitenant-example





# [2.0.0-alpha.20](https://github.com/sourcefuse/loopback4-microservice-catalog/compare/@sourceloop/[email protected]...@sourceloop/[email protected]) (2021-03-17)

**Note:** Version bump only for package @sourceloop/auth-multitenant-example
Expand Down
2 changes: 1 addition & 1 deletion sandbox/auth-multitenant-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sandbox/auth-multitenant-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sourceloop/auth-multitenant-example",
"version": "2.0.0-alpha.20",
"version": "2.0.0-alpha.21",
"description": "This is a sample application for sandbox testing of auth microservice components.",
"private": true,
"keywords": [
Expand Down Expand Up @@ -57,7 +57,7 @@
"@loopback/rest": "^9.0.0",
"@loopback/rest-explorer": "^3.0.3",
"@loopback/service-proxy": "^3.0.3",
"@sourceloop/authentication-service": "^1.0.0-alpha.45",
"@sourceloop/authentication-service": "^1.0.0-alpha.46",
"@sourceloop/core": "^1.0.0-alpha.27",
"bcrypt": "^5.0.0",
"casbin": "^5.2.1",
Expand Down
12 changes: 12 additions & 0 deletions services/authentication-service/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [1.0.0-alpha.46](https://github.com/sourcefuse/loopback4-microservice-catalog/compare/@sourceloop/[email protected]...@sourceloop/[email protected]) (2021-03-31)


### Features

* **authentication-service:** add oauth-code read and write providers ([#154](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/154)) ([90fa8e0](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/90fa8e08a927c6c6371a19ab2f75d10c23307b92))
* **authentication-service:** upgrade loopback4-authentication package to support https proxy ([#156](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/156)) ([915b85b](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/915b85b12732f677f19d960da2e88199dcd7b565))





# [1.0.0-alpha.45](https://github.com/sourcefuse/loopback4-microservice-catalog/compare/@sourceloop/[email protected]...@sourceloop/[email protected]) (2021-03-17)

**Note:** Version bump only for package @sourceloop/authentication-service
Expand Down
72 changes: 37 additions & 35 deletions services/authentication-service/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# authentication-service

[![LoopBack](https://github.com/strongloop/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)[email protected])](http://loopback.io/)
[![LoopBack](<https://github.com/strongloop/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)[email protected]>)](http://loopback.io/)

## Overview

Expand Down Expand Up @@ -28,7 +28,7 @@ import {
RestExplorerComponent,
} from '@loopback/rest-explorer';
import {ServiceMixin} from '@loopback/service-proxy';
import { AuthenticationServiceComponent } from '@sourceloop/in-mail-service';
import {AuthenticationServiceComponent} from '@sourceloop/in-mail-service';
import * as dotenv from 'dotenv';
import * as dotenvExt from 'dotenv-extended';
import path from 'path';
Expand Down Expand Up @@ -77,38 +77,36 @@ export class Client extends BootMixin(

### Environment Variables

| Name | Required | Default Value | Description |
| ----------------------------- | -------- | ------------- | ------------------------------------------------------------ |
| `NODE_ENV` | Y | | Node environment value, i.e. `dev`, `test`, `prod` |
| `LOG_LEVEL` | Y | | Log level value, i.e. `error`, `warn`, `info`, `verbose`, `debug` |
| `DB_HOST` | Y | | Hostname for the database server. |
| `DB_PORT` | Y | | Port for the database server. |
| `DB_USER` | Y | | User for the database. |
| `DB_PASSWORD` | Y | | Password for the database user. |
| `DB_DATABASE` | Y | | Database to connect to on the database server. |
| Name | Required | Default Value | Description |
| ----------------------------- | -------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `NODE_ENV` | Y | | Node environment value, i.e. `dev`, `test`, `prod` |
| `LOG_LEVEL` | Y | | Log level value, i.e. `error`, `warn`, `info`, `verbose`, `debug` |
| `DB_HOST` | Y | | Hostname for the database server. |
| `DB_PORT` | Y | | Port for the database server. |
| `DB_USER` | Y | | User for the database. |
| `DB_PASSWORD` | Y | | Password for the database user. |
| `DB_DATABASE` | Y | | Database to connect to on the database server. |
| `DB_SCHEMA` | Y | | Database schema used for the data source. In PostgreSQL, this will be `public` unless a schema is made explicitly for the service. |
| `REDIS_HOST` | Y | | Hostname of the Redis server. |
| `REDIS_PORT` | Y | | Port to connect to the Redis server over. |
| `REDIS_URL` | Y | | Fully composed URL for Redis connection. Used instead of other settings if set. |
| `REDIS_PASSWORD` | Y | | Password for Redis if authentication is enabled. |
| `REDIS_DATABASE` | Y | | Database within Redis to connect to. |
| `JWT_SECRET` | Y | | Symmetric signing key of the JWT token. |
| `JWT_ISSUER` | Y | | Issuer of the JWT token. |
| `USER_TEMP_PASSWORD` | N | | Temporary password that can be used during development. |
| `GOOGLE_AUTH_URL` | N | | Google OAuth2.0 authorization URL if authentication strategy is set to Google |
| `GOOGLE_AUTH_CLIENT_ID` | N | | Google client ID for the service |
| `GOOGLE_AUTH_CLIENT_SECRET` | N | | Google client secret for the service |
| `GOOGLE_AUTH_TOKEN_URL` | N | | Google OAuth2.0 authorization URL if authentication strategy is set to Google |
| `GOOGLE_AUTH_CALLBACK_URL` | N | | Google callback URL for the client configuration in Google |
| `FORGOT_PASSWORD_LINK_EXPIRY` | N | 1800 | Expiration period of temporary password in seconds. 1800 seconds (30 minutes) is the default. |
| `KEYCLOAK_HOST` | N | | Hostname of the Keycloak instance |
| `KEYCLOAK_REALM` | N | | Realm (tenant) in Keycloak |
| `KEYCLOAK_CLIENT_ID` | N | | Keycloak client ID for the service |
| `KEYCLOAK_CLIENT_SECRET` | N | | Keycloak client secret for the service |
| `KEYCLOAK_CALLBACK_URL` | N | | Keycloak callback URL for the client configuration in Google |
| `RATE_LIMITER_WINDOW_MS` | N | | TODO: get definition |
| `RATE_LIMITER_MAX_REQS` | N | | TODO: get definition |
| `X_FRAME_OPTIONS` | N | | TODO: get definition |
| `REDIS_HOST` | Y | | Hostname of the Redis server. |
| `REDIS_PORT` | Y | | Port to connect to the Redis server over. |
| `REDIS_URL` | Y | | Fully composed URL for Redis connection. Used instead of other settings if set. |
| `REDIS_PASSWORD` | Y | | Password for Redis if authentication is enabled. |
| `REDIS_DATABASE` | Y | | Database within Redis to connect to. |
| `JWT_SECRET` | Y | | Symmetric signing key of the JWT token. |
| `JWT_ISSUER` | Y | | Issuer of the JWT token. |
| `USER_TEMP_PASSWORD` | N | | Temporary password that can be used during development. |
| `GOOGLE_AUTH_URL` | N | | Google OAuth2.0 authorization URL if authentication strategy is set to Google |
| `GOOGLE_AUTH_CLIENT_ID` | N | | Google client ID for the service |
| `GOOGLE_AUTH_CLIENT_SECRET` | N | | Google client secret for the service |
| `GOOGLE_AUTH_TOKEN_URL` | N | | Google OAuth2.0 authorization URL if authentication strategy is set to Google |
| `GOOGLE_AUTH_CALLBACK_URL` | N | | Google callback URL for the client configuration in Google |
| `FORGOT_PASSWORD_LINK_EXPIRY` | N | 1800 | Expiration period of temporary password in seconds. 1800 seconds (30 minutes) is the default. |
| `KEYCLOAK_HOST` | N | | Hostname of the Keycloak instance |
| `KEYCLOAK_REALM` | N | | Realm (tenant) in Keycloak |
| `KEYCLOAK_CLIENT_ID` | N | | Keycloak client ID for the service |
| `KEYCLOAK_CLIENT_SECRET` | N | | Keycloak client secret for the service |
| `KEYCLOAK_CALLBACK_URL` | N | | Keycloak callback URL for the client configuration in Google |
| `HTTPS_PROXY` | N | | Https proxy url for keycloak auth |

### Setting up a `DataSource`

Expand All @@ -131,7 +129,8 @@ const config = {
};

@lifeCycleObserver('datasource')
export class AuthenticationDbDataSource extends juggler.DataSource
export class AuthenticationDbDataSource
extends juggler.DataSource
implements LifeCycleObserver {
static dataSourceName = 'authentication';
static readonly defaultConfig = config;
Expand All @@ -152,6 +151,10 @@ Refer to [Database Migrations | LoopBack Documentation](https://loopback.io/doc/

### API Documentation

### Providers

You can find documentation for some of the providers available in this service [here](./src/providers/README.md)

#### Common Headers

Authorization: Bearer <token> where <token> is a JWT token signed using JWT issuer and secret.
Expand All @@ -173,4 +176,3 @@ Authorization: Bearer <token> where <token> is a JWT token signed using JWT issu
#### API Details

Visit the [OpenAPI spec docs](OPEN_API_SPEC.md)

Loading

0 comments on commit 9c78289

Please sign in to comment.