From de9e825f428cdeca322560ed7644662c53c87af0 Mon Sep 17 00:00:00 2001 From: Fantix King Date: Fri, 7 Jun 2019 15:46:24 -0500 Subject: [PATCH 1/3] feat(unity): support customizing Arborist Because the behavior of the existing GEN3_ARBORIST_ENDPOINT defaults to mock if not set, a new OVERRIDE is needed to avoid changing this. If the new OVERRIDE is not set, it defaults to GEN3_ARBORIST_ENDPOINT which might be just http://arborist-service. --- src/server/config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/config.js b/src/server/config.js index 4ba9155a..605898ac 100644 --- a/src/server/config.js +++ b/src/server/config.js @@ -48,6 +48,10 @@ if (process.env.GEN3_ARBORIST_ENDPOINT) { config.arboristEndpoint = process.env.GEN3_ARBORIST_ENDPOINT; } +if (process.env.GEN3_ARBORIST_ENDPOINT_OVERRIDE) { + config.arboristEndpoint = process.env.GEN3_ARBORIST_ENDPOINT_OVERRIDE; +} + if (process.env.GUPPY_PORT) { config.port = process.env.GUPPY_PORT; } From 74b87ecb1163411809bd9fa1a8e1d19b1aa477ba Mon Sep 17 00:00:00 2001 From: Fantix King Date: Mon, 10 Jun 2019 09:09:08 -0500 Subject: [PATCH 2/3] CRF: change default mock to arborist-service --- src/server/config.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/server/config.js b/src/server/config.js index 605898ac..93aaec62 100644 --- a/src/server/config.js +++ b/src/server/config.js @@ -29,7 +29,7 @@ const config = { port: 80, path: '/graphql', - arboristEndpoint: 'mock', + arboristEndpoint: 'http://arborist-service', tierAccessLevel: 'private', tierAccessLimit: 1000, logLevel: 'INFO', @@ -48,10 +48,6 @@ if (process.env.GEN3_ARBORIST_ENDPOINT) { config.arboristEndpoint = process.env.GEN3_ARBORIST_ENDPOINT; } -if (process.env.GEN3_ARBORIST_ENDPOINT_OVERRIDE) { - config.arboristEndpoint = process.env.GEN3_ARBORIST_ENDPOINT_OVERRIDE; -} - if (process.env.GUPPY_PORT) { config.port = process.env.GUPPY_PORT; } From acf4b267ae3dbfd64622bbf592df463b09d42d9f Mon Sep 17 00:00:00 2001 From: Fantix King Date: Mon, 10 Jun 2019 12:02:25 -0500 Subject: [PATCH 3/3] fix README --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c8c94351..96228b9c 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,10 @@ You could set the endpoint by: export GEN3_ARBORIST_ENDPOINT=${arborist_service} ``` -If not set, Guppy will skip all authorization steps as default. -But if you just want to mock your own authorization behavior for local test without Arborist, just set `INTERNAL_LOCAL_TEST=true`. -Please look into `/src/server/utils/accessibilities.js` for more details. +If not set, it would default to `http://arborist-service`. You could set it to `mock` to +skip all authorization steps. But if you just want to mock your own authorization +behavior for local test without Arborist, just set `INTERNAL_LOCAL_TEST=true`. Please +look into `/src/server/auth/utils.js` for more details. #### Tier access Guppy also support 3 different levels of tier access, by setting `TIER_ACCESS_LEVEL`: