You will be redirected to the new version in a few seconds.
+
If you see this message for more than a minute, something has gone wrong.
+
+
Sorry, something went wrong.
+
+
+
+
diff --git a/deploy/keycloak-auth/nginx/nginx.conf b/deploy/keycloak-auth/nginx/nginx.conf
new file mode 100644
index 00000000..94da1c2c
--- /dev/null
+++ b/deploy/keycloak-auth/nginx/nginx.conf
@@ -0,0 +1,98 @@
+worker_processes 1;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+
+ client_max_body_size 100M;
+
+ include mime.types;
+ default_type application/octet-stream;
+
+ map $status $status_text {
+ 400 'Bad Request';
+ 401 'Unauthorized';
+ 403 'Forbidden';
+ 404 'Not Found';
+ 405 'Method Not Allowed';
+ 406 'Not Acceptable';
+ 413 'Payload Too Large';
+ 414 'URI Too Long';
+ 431 'Request Header Fields Too Large';
+ 500 'Internal Server Error';
+ 501 'Not Implemented';
+ 502 'Bad Gateway';
+ 503 'Service Unavailable';
+ 504 'Gateway Timeout';
+ }
+
+ include /etc/nginx/conf.d/variables.conf;
+
+ server {
+ listen 80;
+ server_name localhost;
+
+ error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
+ 415 416 417 418 421 422 423 424 426 428 429 431 451 500 501 502 503
+ 504 505 506 507 508 510 511 /error.html;
+
+ location = /error.html {
+ ssi on;
+ internal;
+ root /usr/share/nginx/html;
+ }
+
+ location = /record-manager {
+ return 302 $record_manager_origin$record_manager_root_path/;
+ }
+
+ location /record-manager/ {
+ proxy_pass http://record-manager/; # keep the trailing slash to cut off matched prefix
+ }
+
+ location /record-manager/services/record-manager-server/ {
+ proxy_pass http://record-manager-server:8080/record-manager/; # keep the trailing slash to cut off matched prefix
+ proxy_cookie_path /record-manager $record_manager_root_path/services;
+ }
+
+ location = /record-manager/services/db-server {
+ return 302 $record_manager_origin$record_manager_root_path/services/db-server/;
+ }
+
+ location /record-manager/services/db-server/ {
+ proxy_pass http://db-server:7200/; # keep the trailing slash to cut off matched prefix
+ }
+
+ location /record-manager/services/s-pipes/ {
+ proxy_pass http://s-pipes-engine:8080/; # keep the trailing slash to cut off matched prefix
+ }
+
+ location = /record-manager/services/auth {
+ return 302 $record_manager_origin$record_manager_root_path/services/auth/;
+ }
+
+ location /record-manager/services/auth/ {
+ proxy_pass http://auth-server:8080/;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-Host $server_name;
+ proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Cookie $http_cookie;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ # Increase buffer sizes to handle large headers sent by Keycloak and its clients
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+ }
+
+ location /health-check {
+ return 200;
+ access_log off;
+ }
+ }
+}
diff --git a/deploy/keycloak-auth/nginx/template-variables.conf b/deploy/keycloak-auth/nginx/template-variables.conf
new file mode 100644
index 00000000..71eb7ebf
--- /dev/null
+++ b/deploy/keycloak-auth/nginx/template-variables.conf
@@ -0,0 +1,7 @@
+map $host $record_manager_origin {
+ default "$RECORD_MANAGER_ORIGIN";
+}
+
+map $host $record_manager_root_path {
+ default "$RECORD_MANAGER_ROOT_PATH";
+}
diff --git a/deploy/internal-auth/s-pipes-engine/scripts/form-generation.sms.ttl b/deploy/shared/s-pipes-engine/scripts/form-generation.sms.ttl
similarity index 100%
rename from deploy/internal-auth/s-pipes-engine/scripts/form-generation.sms.ttl
rename to deploy/shared/s-pipes-engine/scripts/form-generation.sms.ttl
diff --git a/doc/development.md b/doc/development.md
index 4c320754..fd9bf310 100644
--- a/doc/development.md
+++ b/doc/development.md
@@ -16,6 +16,17 @@ All the services, including dockerized record-manager-ui, run by default at URL
To attach simultaneously frontend for the development use setup from [.env.internal-auth](../.env.internal-auth),
e.g., by running `ln -s .env.internal-auth .env; npm run dev`.
+### Running with Dockerized Services and Keycloak Authorization
+
+This section describes the development scenario when developer uses
+[dockerized services with keycloak authorization](../deploy/keycloak-auth/docker-compose.yml) to develop.
+All the services, including dockerized record-manager-ui, run by default at URL starting with `http://localhost:1235/record-manager`.
+To attach simultaneously frontend for the development use setup from [.env.keyclaok-auth](../.env.keyclaok-auth),
+e.g., by running `ln -s .env.keycloak-auth .env; npm run dev`.
+
+`npm run dev` starts developement version of record-manager-ui at `http://localhost:3000`. In order to login to through keycloak `record-manager` realm needs to be configured: open the `record-manager` realm, under _Clients_ open the `record-manager` client and set
+_Valid redirect URIs_ (by default it should be `http://localhost:3000/*`) and _Web Origins_ (by default it should be `http://localhost:3000`).
+
### Running with all Services in Development Mode
This section describes the development scenario when the developer runs all dependent services in development mode.
@@ -23,7 +34,7 @@ By default, Record Manager UI runs at `http://localhost:3000` while Record Mana
This requires setting up the CORS policy of the server appropriately, i.e., configuring `config.properties`
to contain `security.sameSite=None` and set up also `cors.allowedOrigin` if needed.
-## Add Configuration Parameters
+## Adding Configuration Parameters
When runtime configuration parameters are added to the application, they also need to be added to Docker processing so
that environment variables can be used to set the variables. The following needs to be done:
diff --git a/doc/setup.md b/doc/setup.md
index 59caf1a5..64291c1c 100644
--- a/doc/setup.md
+++ b/doc/setup.md
@@ -54,7 +54,7 @@ RECORD_MANAGER_ROOT_PATH=/record-manager-example
### Set up with Keycloak Authorization
-The deployment is pretty much self-contained based on [docker-compose.yml](../deploy/keycloak-auth/docker-compose.yml). It sets up the corresponding repositories, imports a realm where clients
+The deployment is pretty much self-contained based on [docker-compose.yml](../deploy/keycloak-auth-no-proxy/docker-compose.yml). It sets up the corresponding repositories, imports a realm where clients
are configured for both the Record Manager backend and frontend. All the services (except PostgreSQL used by Keycloak)
in the deployment export their ports to the host system, so ensure the following ports are available on your system:
3000, 8080, 8081, 8088.
diff --git a/js/components/MainView.js b/js/components/MainView.js
index b1df3cf9..bfbee4d4 100644
--- a/js/components/MainView.js
+++ b/js/components/MainView.js
@@ -52,7 +52,7 @@ class MainView extends React.Component {
if (isUsingOidcAuth()) {
window.location = userProfileLink();
} else {
- transitionToWithOpts(Routes.editUser, {params: {username: this.props.user.username}});
+ this.props.transitionToWithOpts(Routes.editUser, {params: {username: this.props.user.username}});
}
}
@@ -157,6 +157,7 @@ function mapStateToProps(state) {
function mapDispatchToProps(dispatch) {
return {
- loadUserProfile: bindActionCreators(loadUserProfile, dispatch)
+ loadUserProfile: bindActionCreators(loadUserProfile, dispatch),
+ transitionToWithOpts: bindActionCreators(transitionToWithOpts, dispatch)
}
}
\ No newline at end of file
diff --git a/js/components/dashboard/Dashboard.js b/js/components/dashboard/Dashboard.js
index b3e44453..c7298d86 100644
--- a/js/components/dashboard/Dashboard.js
+++ b/js/components/dashboard/Dashboard.js
@@ -68,7 +68,7 @@ class Dashboard extends React.Component {
if (!formTemplate) {
return