Skip to content

Commit

Permalink
Merge Secret Service Library into Service (#1259)
Browse files Browse the repository at this point in the history
* Refactoring secret-service lib into service

Co-authored-by: heggert <hans@eggert.link>
  • Loading branch information
weberjm and heggert committed Jul 8, 2021
1 parent 9ad3466 commit 129fd68
Show file tree
Hide file tree
Showing 74 changed files with 220 additions and 274 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ jobs:
docker: *node_mongo_env
working_directory: ~/oih/services/scheduler
steps: *yarn_test_steps
secret-service-lib-test:
secret-service-test:
docker: *node_env
working_directory: ~/oih/lib/secret-service
working_directory: ~/oih/services/secret-service
steps: *yarn_test_steps
lib-backend-commons-lib-test:
docker: *node_env
Expand Down Expand Up @@ -180,7 +180,7 @@ workflows:
- scheduler-test:
requires:
- lib-scheduler-test
- secret-service-lib-test:
- secret-service-test:
requires:
- deps
- flow-repository-test:
Expand Down Expand Up @@ -232,7 +232,7 @@ workflows:
- app-directory-test
- component-orchestrator-test
- scheduler-test
- secret-service-lib-test
- secret-service-test
- flow-repository-test
- template-repository-test
- audit-log-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
- name: secret-service
image: node:12-alpine
command: ["/bin/sh"]
args: ["-c", "yarn install --focus --network-timeout 9000000 --verbose --non-interactive && yarn start:container"]
workingDir: /usr/src/app/services/secret-service
args: ["-c", "apk update && apk add --no-cache python && yarn install --network-timeout 9000000 --verbose --non-interactive && yarn start:container"]
workingDir: /usr/src/app
ports:
- containerPort: 3000
env:
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
volumeMounts:
- name: code
mountPath: /usr/src/app
#subPath: services/secret-service
subPath: services/secret-service
livenessProbe:
httpGet:
port: 3000
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/minikube/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ fi
minikube addons enable dashboard
minikube addons enable metrics-server
if [ "$os" == "Darwin" ] && [ "$machine" == "ARM" ]; then
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.45.0/deploy/static/provider/cloud/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.47.0/deploy/static/provider/cloud/deploy.yaml
else
minikube addons enable ingress
fi
Expand Down
11 changes: 0 additions & 11 deletions lib/secret-service/.env.test

This file was deleted.

37 changes: 0 additions & 37 deletions lib/secret-service/.eslintrc.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions lib/secret-service/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions lib/secret-service/index.js

This file was deleted.

72 changes: 0 additions & 72 deletions lib/secret-service/package.json

This file was deleted.

7 changes: 5 additions & 2 deletions services/secret-service/.env.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
MONGOMS_VERSION=4.4.2
DEBUG_MODE=false
REFRESH_TIMEOUT=600
EXPIRATION_OFFSET=-100
EXPIRATION_OFFSET=10
PAGINATION_PAGE_SIZE=10
CRYPTO_DISABLED=true
CRYPTO_KEY=HxdVXYDnbWPGCcH9
INTROSPECT_ENDPOINT_BASIC=http://localhost:3099/api/v1/tokens/introspect
INTROSPECT_ENDPOINT_OIDC=http://localhost:3099/op/token/introspection
INTROSPECT_TYPE=oidc
INTROSPECT_TYPE=oidc
LOG_LEVEL=error
61 changes: 33 additions & 28 deletions services/secret-service/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
plugins:
- jest
- jest
env:
jest: true
jest: true
extends: airbnb-base
rules:
sort-imports:
- error
- ignoreCase: false
ignoreMemberSort: false
memberSyntaxSortOrder:
- none
- all
- multiple
- single
no-empty: [error, {allowEmptyCatch: true}]
no-console: 0
no-underscore-dangle: 0
new-cap: 0
indent: [1, 4]
global-require: 0
import/no-extraneous-dependencies: 0
no-plusplus: 0
no-shadow: 0
no-return-assign: 0
no-restricted-syntax: 0
no-await-in-loop: 0
prefer-destructuring: 0
no-return-await: 0
consistent-return: 0
camelcase: 0
no-param-reassign: 0
sort-imports:
- error
- ignoreCase: false
ignoreMemberSort: false
memberSyntaxSortOrder:
- none
- all
- multiple
- single
no-empty: [error, {allowEmptyCatch: true}]
no-console: 0
no-underscore-dangle: 0
new-cap: 0
indent: [1, 4]
global-require: 0
max-len: 0
import/no-extraneous-dependencies: 0
no-plusplus: 0
no-shadow: 0
no-return-assign: 0
no-restricted-syntax: 0
no-await-in-loop: 0
prefer-destructuring: 0
no-return-await: 0
consistent-return: 0
camelcase: 0
no-param-reassign: 0
no-throw-literal: 0
max-classes-per-file: 0
no-async-promise-executor: 0
class-methods-use-this: 0
5 changes: 4 additions & 1 deletion services/secret-service/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ keystore.json
basaas-queue.json
certs/

clients.json
clients.json

run-test-container
.npmrc
File renamed without changes.
8 changes: 4 additions & 4 deletions services/secret-service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ require('dotenv').config({ path: path.join(__dirname, '.env') });

const logger = require('@basaas/node-logger');

const Server = require('@openintegrationhub/secret-service');
const { EventBus } = require('@openintegrationhub/event-bus');
const conf = require('@openintegrationhub/secret-service/src/conf');
const Server = require('./src/server');
const conf = require('./src/conf');

const log = logger.getLogger(`${conf.log.namespace}/main`);

Expand All @@ -31,9 +31,9 @@ process.on('SIGINT', exitHandler.bind(null));

const server = new Server({
adapter: {
key: require('@openintegrationhub/secret-service/src/adapter/key/global'),
key: require('./src/adapter/key/global'),
preprocessor: {
microsoft: require('@openintegrationhub/secret-service/src/adapter/preprocessor/microsoft'),
microsoft: require('./src/adapter/preprocessor/microsoft'),
},
},
eventBus,
Expand Down

0 comments on commit 129fd68

Please sign in to comment.