Skip to content

Commit feaf687

Browse files
authored
Merge pull request #153 from OWASP/develop
Release changes to main.
2 parents e7ba321 + cd46562 commit feaf687

File tree

203 files changed

+29725
-8115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+29725
-8115
lines changed

.gitattributes

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# https://github.com/Danimoth/gitattributes
2+
# Common settings that generally should always be used with your language specific settings
3+
4+
# Auto detect text files and perform LF normalization
5+
* text=auto
6+
7+
#
8+
# The above will handle all files NOT found below
9+
#
10+
11+
# Documents
12+
*.bibtex text diff=bibtex
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
23+
*.md text diff=markdown
24+
*.mdx text diff=markdown
25+
*.tex text diff=tex
26+
*.adoc text
27+
*.textile text
28+
*.mustache text
29+
*.csv text
30+
*.tab text
31+
*.tsv text
32+
*.txt text
33+
*.sql text
34+
*.epub diff=astextplain
35+
36+
# Graphics
37+
*.png binary
38+
*.jpg binary
39+
*.jpeg binary
40+
*.gif binary
41+
*.tif binary
42+
*.tiff binary
43+
*.ico binary
44+
# SVG treated as text by default.
45+
*.svg text
46+
# If you want to treat it as binary,
47+
# use the following line instead.
48+
# *.svg binary
49+
*.eps binary
50+
51+
# Scripts
52+
*.bash text eol=lf
53+
*.fish text eol=lf
54+
*.sh text eol=lf
55+
*.zsh text eol=lf
56+
# These are explicitly windows files and should use crlf
57+
*.bat text eol=crlf
58+
*.cmd text eol=crlf
59+
*.ps1 text eol=crlf
60+
61+
# Serialisation
62+
*.json text
63+
*.toml text
64+
*.xml text
65+
*.yaml text
66+
*.yml text
67+
68+
# Archives
69+
*.7z binary
70+
*.gz binary
71+
*.tar binary
72+
*.tgz binary
73+
*.zip binary
74+
75+
# Text files where line endings should be preserved
76+
*.patch -text
77+
78+
#
79+
# Exclude files from exporting
80+
#
81+
82+
.gitattributes export-ignore
83+
.gitignore export-ignore
84+
.gitkeep export-ignore

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ jobs:
7979
# setup Docker build action
8080
- name: Set up Docker Buildx
8181
id: buildx
82-
uses: docker/setup-buildx-action@v1
82+
uses: docker/setup-buildx-action@v2
8383
- name: Set up QEMU
8484
id: qemu
85-
uses: docker/setup-qemu-action@v1
85+
uses: docker/setup-qemu-action@v2
8686

8787
- name: Login to DockerHub
8888
if: needs.build-context.outputs.push_image == 'true'
89-
uses: docker/login-action@v1
89+
uses: docker/login-action@v2
9090
with:
9191
username: ${{ secrets.DOCKERHUB_USERNAME }}
9292
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -171,7 +171,7 @@ jobs:
171171
run: npm install -g newman
172172

173173
- name: Run Postman Collection
174-
run: (newman run "./postman_collections/crAPI Accepted.postman_collection.json" -e ./postman_collections/Crapi.postman_environment.json) || true
174+
run: (newman run "./postman_collections/crAPI.postman_collection.json" -e ./postman_collections/crAPI.postman_environment.json --verbose) || true
175175

176176
- name: Build crapi-identity all platforms and conditionally push to Docker Hub
177177
uses: docker/build-push-action@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
deploy/vagrant/*.log
22
deploy/vagrant/.vagrant
33
.secrets
4+
.vscode/

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ know more about crAPI, please check [crAPI's overview][overview].
1010

1111
## QuickStart Guide
1212

13-
### Docker
13+
### Docker and docker-compose
1414

15-
You'll need to have Docker installed and running on your host system.
15+
You'll need to have Docker and docker-compose installed and running on your host system. Also, the version of docker-compose should be `1.27.0` or above. Check your docker-compose version using:
16+
```
17+
docker-compose version
18+
```
1619

1720
#### Using prebuilt images
1821
You can use prebuilt images generated by our CI workflow.
@@ -25,7 +28,7 @@ You can use prebuilt images generated by our CI workflow.
2528
curl -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/main/deploy/docker/docker-compose.yml
2629

2730
docker-compose pull
28-
31+
2932
docker-compose -f docker-compose.yml --compatibility up -d
3033
```
3134

@@ -35,7 +38,7 @@ You can use prebuilt images generated by our CI workflow.
3538
curl.exe -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/main/deploy/docker/docker-compose.yml
3639

3740
docker-compose pull
38-
41+
3942
docker-compose -f docker-compose.yml --compatibility up -d
4043
```
4144

@@ -45,9 +48,9 @@ You can use prebuilt images generated by our CI workflow.
4548

4649
```
4750
curl -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/develop/deploy/docker/docker-compose.yml
48-
49-
VERSION=develop docker-compose pull
50-
51+
52+
VERSION=develop docker-compose pull
53+
5154
VERSION=develop docker-compose -f docker-compose.yml --compatibility up -d
5255
```
5356
@@ -56,9 +59,11 @@ You can use prebuilt images generated by our CI workflow.
5659
```
5760
curl.exe -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/develop/deploy/docker/docker-compose.yml
5861
59-
setx VERSION develop && docker-compose pull
60-
61-
setx VERSION develop && docker-compose -f docker-compose.yml --compatibility up -d
62+
set "VERSION=develop"
63+
64+
docker-compose pull
65+
66+
docker-compose -f docker-compose.yml --compatibility up -d
6267
```
6368
6469
Visit [http://localhost:8888](http://localhost:8888)
@@ -104,3 +109,6 @@ To know more about challenges in crAPI. Visit [challenges]
104109
[setup-k8s]: docs/setup.md#kubernetes-minikube
105110
[vagrant]: https://www.vagrantup.com/downloads
106111
[virtualbox]: https://www.virtualbox.org/wiki/Downloads
112+
113+
## Troubleshooting guide for general issues while installing and running crAPI
114+
If you need any help with installing and running crAPI you can check out this guide: [Troubleshooting guide crAPI](https://github.com/OWASP/crAPI/blob/main/docs/troubleshooting.md). If this doesn't solve your problem, please create an issue in Github Issues.

deploy/docker/.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
IDENTITY_SERVER_PORT=8080
22
COMMUNITY_SERVER_PORT=8087
3-
WORKSHOP_SERVER_PORT=8000
3+
WORKSHOP_SERVER_PORT=8000
4+
ENABLE_LOG4J=false

deploy/docker/.keys/jwks.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"keys": [
3+
{
4+
"p": "-o_gG3DQK9540fR_-WM9dy1YgTR-WSH8FezYnH6I5jwwPB6ocni8XgkWCAiKOPYjK6nhmoTD7DBEetilFIWVj1P0G5fejp_c3H-uQQdd6JW2NBWHfWpADglIEc4NfUgjQ8cXjT1-oIJpXzpX6KOhWEP0yGNBYns7W8CNxbw58vU",
5+
"kty": "RSA",
6+
"q": "tW1D1JK53TIiip9uBVl6EGzXWPFwy8QXlZHbfg3TfhURUF5OYey9Ig-qxh74KvQ-uzwMZOYux0EdUe0OmV-p27huY-nusHjpxKL6xUxpqsLWrYTa6ygRHep3_A50ksN_XIn83oAjBlG4TEePzBsMQb6F4HDrEhpdPeYepKa5PNc",
7+
"d": "XJu0Vh3Uq5gV5UPMCfm_j6D5INgX7VjLSN8mup4LfUBkJAk9vpQmDYF8gVzpMr3YdBk_Y7MI1BapPVg2i-s2UQR4xJYwpDOfKJactGWzruvfiTOKNIc8Q87WhLl2D4_FGI2jfyYk6itCLOOk1zfZdkjLLNiQg1SDOqC28AT-qKh99wLRKiIuewbJVW5C-0D8YjlquBU6rXdKxONYKnA1NHWfJEbPtsyJIlfUs06wjiMcXrLLc6qy98LL8t0oQcGdUTN4rICGGj-uH3k7-evJyKXC_RECmbcMu2q8GkjZ7lvaVtHh3TGGAA5TTc-7kW3MUjpCLLL06erLxCn3CcGr6Q",
8+
"e": "AQAB",
9+
"use": "sig",
10+
"kid": "MKMZkDenUfuDF2byYowDj7tW5Ox6XG4Y1THTEGScRg8",
11+
"qi": "IChXZG2VaA05LVfN-nIX03sAZo7ayetTiFKrhGpdmsODw9AoCbBIx4T4SuPnQQBYVkaCAcseyB1XAjqA4Ebm2yvE6yYo-Q8nP-wEo5Mzm18UimCffMox-uSrig1uhuK9oziV-Y11Ytps8yEQq--9BzVTCs1sXAkLVSaO58kGsm4",
12+
"dp": "rl98fnxXU4BjIvJ-MWfAOfVj159ZotxE3FlVMivZSClxBBXt8qRVqze1jmerEhMxzMxQRkHJO9EnhzrIP-zrdbDefGmHqEhW41k0QutGjnvKLpshDMXpyBrrfgChYKPYbu3aVSALxNadUHmA_lUKDyxT6TUyJsBOQf9Sat8gkRU",
13+
"alg": "RS256",
14+
"dq": "d8mf-o-yJmj-w3ZGh0Ovw36JpREs_20GgVvfh1gLpvi0CNNrf1529jFP-SXjh0Di1m7sZAZTJn5IpJoXhI7UMN2SDWgcj-oVtx5A4tnz_qpMYh8RCCjZPF5eQE8vCuQHiIsXKbWC6p40SDELsaC-M_5emHUV0EsV-1OgMehe79s",
15+
"n": "sZKrGYja9S7BkO-waOcupoGY6BQjixJkg1Uitt278NbiCSnBRw5_cmfuWFFFPgRxabBZBJwJAujnQrlgTLXnRRItM9SRO884cEXn-s4Uc8qwk6pev63qb8no6aCVY0dFpthEGtOP-3KIJ2kx2i5HNzm8d7fG3ZswZrttDVbSSTy8UjPTOr4xVw1Yyh_GzGK9i_RYBWHftDsVfKrHcgGn1F_T6W0cgcnh4KFmbyOQ7dUy8Uc6Gu8JHeHJVt2vGcn50EDtUy2YN-UnZPjCSC7vYOfd5teUR_Bf4jg8GN6UnLbr_Et8HUnz9RFBLkPIf0NiY6iRjp9ooSDkml2OGql3ww"
16+
}
17+
]
18+
}
19+

deploy/docker/build-all.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
@echo off
22
cd /d services
3+
set "VERSION=latest"
34
for /F "delims=" %%a in ('dir /b build-image.bat /s') do call "%%a"

deploy/docker/docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ services:
1818
image: crapi/crapi-identity:${VERSION:-latest}
1919
#ports:
2020
# - "127.0.0.1:8080:8080"
21+
volumes:
22+
- ./.keys:/.keys
2123
environment:
2224
- DB_NAME=crapi
2325
- DB_USER=admin
2426
- DB_PASSWORD=crapisecretpassword
2527
- DB_HOST=postgresdb
2628
- DB_PORT=5432
2729
- SERVER_PORT=${IDENTITY_SERVER_PORT:-8080}
28-
- BLOCK_SHELL_INJECTION=false
30+
- ENABLE_SHELL_INJECTION=${ENABLE_SHELL_INJECTION:-false}
2931
- JWT_SECRET=crapi
3032
- MAILHOG_HOST=mailhog
3133
- MAILHOG_PORT=1025
@@ -37,6 +39,7 @@ services:
3739
3840
- SMTP_AUTH=true
3941
- SMTP_STARTTLS=true
42+
- ENABLE_LOG4J=${ENABLE_LOG4J:-false}
4043
depends_on:
4144
postgresdb:
4245
condition: service_healthy
@@ -59,6 +62,7 @@ services:
5962
#ports:
6063
# - "127.0.0.1:8087:8087"
6164
environment:
65+
- IDENTITY_SERVICE=crapi-identity:${IDENTITY_SERVER_PORT:-8080}
6266
- DB_NAME=crapi
6367
- DB_USER=admin
6468
- DB_PASSWORD=crapisecretpassword
@@ -70,7 +74,6 @@ services:
7074
- MONGO_DB_USER=admin
7175
- MONGO_DB_PASSWORD=crapisecretpassword
7276
- MONGO_DB_NAME=crapi
73-
- JWT_SECRET=crapi
7477
depends_on:
7578
postgresdb:
7679
condition: service_healthy
@@ -95,6 +98,7 @@ services:
9598
#ports:
9699
# - "127.0.0.1:8000:8000"
97100
environment:
101+
- IDENTITY_SERVICE=crapi-identity:${IDENTITY_SERVER_PORT:-8080}
98102
- DB_NAME=crapi
99103
- DB_USER=admin
100104
- DB_PASSWORD=crapisecretpassword
@@ -106,7 +110,6 @@ services:
106110
- MONGO_DB_USER=admin
107111
- MONGO_DB_PASSWORD=crapisecretpassword
108112
- MONGO_DB_NAME=crapi
109-
- JWT_SECRET=crapi
110113
- SECRET_KEY=crapi
111114
depends_on:
112115
postgresdb:

deploy/helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: helm
23+
appVersion: develop

deploy/helm/keys/jwks.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"keys": [
3+
{
4+
"p": "-o_gG3DQK9540fR_-WM9dy1YgTR-WSH8FezYnH6I5jwwPB6ocni8XgkWCAiKOPYjK6nhmoTD7DBEetilFIWVj1P0G5fejp_c3H-uQQdd6JW2NBWHfWpADglIEc4NfUgjQ8cXjT1-oIJpXzpX6KOhWEP0yGNBYns7W8CNxbw58vU",
5+
"kty": "RSA",
6+
"q": "tW1D1JK53TIiip9uBVl6EGzXWPFwy8QXlZHbfg3TfhURUF5OYey9Ig-qxh74KvQ-uzwMZOYux0EdUe0OmV-p27huY-nusHjpxKL6xUxpqsLWrYTa6ygRHep3_A50ksN_XIn83oAjBlG4TEePzBsMQb6F4HDrEhpdPeYepKa5PNc",
7+
"d": "XJu0Vh3Uq5gV5UPMCfm_j6D5INgX7VjLSN8mup4LfUBkJAk9vpQmDYF8gVzpMr3YdBk_Y7MI1BapPVg2i-s2UQR4xJYwpDOfKJactGWzruvfiTOKNIc8Q87WhLl2D4_FGI2jfyYk6itCLOOk1zfZdkjLLNiQg1SDOqC28AT-qKh99wLRKiIuewbJVW5C-0D8YjlquBU6rXdKxONYKnA1NHWf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9RFBLkPIf0NiY6iRjp9ooSDkml2OGql3ww"
16+
}
17+
]
18+
}
19+

0 commit comments

Comments
 (0)