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

UPS-5145 Keycloak fix UiTiDv1 fallback #197

Merged
merged 4 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CODEOWNERS are automatically assigned as possible reviewers to new PRs.

# Global owners (also need to be duplicated in later rules)
* @LucWollants @JonasVHG @simon-debruijn @grubolsch

# Jenkins / deployment owners
Gemfile* @willaerk @paulherbosch
Jenkinsfile @willaerk @paulherbosch
Rakefile @willaerk @paulherbosch
lib/ @willaerk @paulherbosch
5 changes: 3 additions & 2 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ function () use ($app, $options) {
/**
* Authentication services
*/
$app['auth0_enabled'] = isset($app['config']['auth0']['enable']) && $app['config']['auth0']['enable'] === true;
if ($app['auth0_enabled']) {
$app['external_auth_enabled'] = (isset($app['config']['auth0']['enable']) && $app['config']['auth0']['enable'] === true) || (isset($app['config']['keycloak']['enable']) && $app['config']['keycloak']['enable'] === true);
grubolsch marked this conversation as resolved.
Show resolved Hide resolved

if ($app['external_auth_enabled']) {
$app->register(new AuthServiceProvider());
} else {
$app->register(new CultuurNet\UiTIDProvider\Auth\AuthServiceProvider());
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function ($name) use ($app) {
}
);

if (!$app['auth0_enabled']) {
if (!$app['external_auth_enabled']) {
$app['uitid_auth_service'] = $app->share(
$app->extend(
'uitid_auth_service',
Expand Down
3 changes: 2 additions & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.1-apache
FROM php:7.4-apache

RUN apt-get update && apt-get install -y --no-install-recommends git zip unzip libicu-dev libtidy-dev zlib1g-dev libpng-dev libzip-dev

Expand Down Expand Up @@ -37,6 +37,7 @@ RUN npm run bower -- install &
ENV APACHE_DOCUMENT_ROOT=/var/www/html/web
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN echo "LimitRequestFieldSize 32766" >> /etc/apache2/conf-available/security.conf

RUN pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug
COPY xdebug.ini $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
2 changes: 1 addition & 1 deletion web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
/**
* API callbacks for authentication.
*/
if ($app['auth0_enabled']) {
if ($app['external_auth_enabled']) {
$app->mount('culturefeed/oauth', new AuthControllerProvider());
} else {
$app->mount('culturefeed/oauth', new \CultuurNet\UiTIDProvider\Auth\AuthControllerProvider());
Expand Down
Loading