Skip to content

Commit

Permalink
Fix auth (#254)
Browse files Browse the repository at this point in the history
* Fix auth validation, update postman collection and gha
  • Loading branch information
piyushroshan authored May 21, 2024
1 parent 49adaa1 commit 34cbab6
Show file tree
Hide file tree
Showing 30 changed files with 383 additions and 386 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,25 +143,31 @@ jobs:
- name: Env seen
run: env

- name: Cleanup docker before running
if: always()
continue-on-error: true
run: docker-compose -f deploy/docker/docker-compose.yml down --volumes --remove-orphans

- name: Run crAPI using built images
run: VERSION=${{ env.TAG_NAME }} docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: Install newman
run: npm install -g newman

- name: Run Postman Collection
run: (newman run "./postman_collections/crAPI.postman_collection.json" -e ./postman_collections/crAPI.postman_environment.json --verbose) || true
run: newman run "./postman_collections/crAPI.postman_collection.json" -e ./postman_collections/crAPI.postman_environment.json --verbose

- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2

- name: Cleanup docker
if: always()
run: docker-compose -f deploy/docker/docker-compose.yml down --volumes --remove-orphans


Expand Down
1 change: 1 addition & 0 deletions deploy/docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ENABLE_LOG4J=false
LISTEN_IP="127.0.0.1"
TLS_ENABLED=true
VERSION=latest
LOG_LEVEL=INFO
3 changes: 3 additions & 0 deletions deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
volumes:
- ./keys:/keys
environment:
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- DB_NAME=crapi
- DB_USER=admin
- DB_PASSWORD=crapisecretpassword
Expand Down Expand Up @@ -71,6 +72,7 @@ services:
#ports:
# - "${LISTEN_IP:-127.0.0.1}:8087:8087"
environment:
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- IDENTITY_SERVICE=crapi-identity:${IDENTITY_SERVER_PORT:-8080}
- DB_NAME=crapi
- DB_USER=admin
Expand Down Expand Up @@ -110,6 +112,7 @@ services:
#ports:
# - "${LISTEN_IP:-127.0.0.1}:8000:8000"
environment:
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- IDENTITY_SERVICE=crapi-identity:${IDENTITY_SERVER_PORT:-8080}
- DB_NAME=crapi
- DB_USER=admin
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/templates/community/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
LOG_LEVEL: {{ .Values.identity.config.logLevel | upper }}
IDENTITY_SERVICE: {{ .Values.identity.service.name }}:{{ .Values.identity.port }}
DB_HOST: {{ .Values.postgresdb.service.name }}
DB_DRIVER: {{ .Values.community.config.postgresDbDriver }}
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/templates/identity/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
LOG_LEVEL: {{ .Values.identity.config.logLevel | upper }}
JWT_SECRET: {{ .Values.jwtSecret }} #Used for creating a JWT. Can be anything
APP_NAME: {{ .Values.identity.config.appName }}
ENABLE_SHELL_INJECTION: {{ .Values.enableShellInjection | quote }}
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/templates/workshop/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
release: {{ .Release.Name }}
{{- toYaml .Values.workshop.config.labels | nindent 4 }}
data:
LOG_LEVEL: {{ .Values.identity.config.logLevel | upper }}
IDENTITY_SERVICE: {{ .Values.identity.service.name }}:{{ .Values.identity.port }}
SECRET_KEY: {{ .Values.workshop.config.secretKey }}
DB_HOST: {{ .Values.postgresdb.service.name }}
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ apiGatewayServiceInstall: true
apiGatewayPassword:
tlsEnabled: false
jwtExpiration: 604800000
logLevel: INFO

waitForK8sResources:
image: groundnuty/k8s-wait-for:v1.3
Expand Down
Loading

0 comments on commit 34cbab6

Please sign in to comment.