Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use OIDC server with fine-grained authorization #386

Merged
merged 8 commits into from Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/.env
Expand Up @@ -20,6 +20,9 @@ TRUSTED_HOSTS=^(localhost|php)$
OIDC_SERVER_URL=https://localhost/oidc/realms/demo
OIDC_SERVER_URL_INTERNAL=http://keycloak:8080/oidc/realms/demo
OIDC_SWAGGER_CLIENT_ID=api-platform-swagger
OIDC_API_CLIENT_ID=api-platform-api
OIDC_API_CLIENT_SECRET=sEocbxCy7iFS8NzYzWyQ71QgxTDZ9fnU
OIDC_AUD=api-platform

###> symfony/framework-bundle ###
APP_ENV=dev
Expand Down
1 change: 1 addition & 0 deletions api/.env.test
Expand Up @@ -4,6 +4,7 @@ APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
OIDC_JWK='{"kty": "EC","d": "cT3_vKHaGOAhhmzR0Jbi1ko40dNtpjtaiWzm_7VNwLA","use": "sig","crv": "P-256","x": "n6PnJPqNK5nP-ymwwsOIqZvjiCKFNzRyqWA8KNyBsDo","y": "bQSmMlDXOmtgyS1rhsKUmqlxq-8Kw0Iw9t50cSloTMM","alg": "ES256"}'

# API Platform distribution
TRUSTED_HOSTS=^example\.com|localhost$
1 change: 1 addition & 0 deletions api/Dockerfile
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update; \
RUN set -eux; \
install-php-extensions \
apcu \
bcmath \
intl \
opcache \
zip \
Expand Down
8 changes: 6 additions & 2 deletions api/composer.json
Expand Up @@ -34,7 +34,7 @@
"symfony/uid": "7.0.*",
"symfony/validator": "7.0.*",
"symfony/yaml": "7.0.*",
"web-token/jwt-library": "^3.3",
"web-token/jwt-bundle": "^3.3",
"webonyx/graphql-php": "^15.8",
"zenstruck/foundry": "^1.36"
},
Expand Down Expand Up @@ -109,7 +109,11 @@
"symfony": {
"allow-contrib": false,
"require": "7.0.*",
"docker": false
"docker": false,
"endpoint": [
"https://api.github.com/repos/Spomky-Labs/recipes/contents/index.json?ref=main",
"flex://defaults"
]
}
}
}