From f96389ae7421febb5eefd0fa73e3e71e7fe56cc8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Feb 2025 06:02:46 +0000 Subject: [PATCH] [WSO2 Release] [GitHub Action] [Release] [skip ci] update package versions --- .changeset/khaki-eyes-film.md | 108 --------------------------------- apps/console/CHANGELOG.md | 109 ++++++++++++++++++++++++++++++++++ apps/console/package.json | 2 +- apps/myaccount/CHANGELOG.md | 109 ++++++++++++++++++++++++++++++++++ apps/myaccount/package.json | 2 +- 5 files changed, 220 insertions(+), 110 deletions(-) delete mode 100644 .changeset/khaki-eyes-film.md diff --git a/.changeset/khaki-eyes-film.md b/.changeset/khaki-eyes-film.md deleted file mode 100644 index 0bdb397c6dd..00000000000 --- a/.changeset/khaki-eyes-film.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -"@wso2is/myaccount": minor -"@wso2is/console": minor ---- - -This pull request introduces support for a configurable proxy context path across multiple files in the project. The changes ensure that the application can dynamically handle different proxy context paths based on the server configuration. - -Ex: The My Account can be hosted under `https://is.dev.wso2.com/auth/t/brionmario.com/myaccount`. -⚠️ Note that `auth` is the context path. - -#### Pre-requisites - -We currently need the following NGINX configuration. - -- `auth` is the proxy context path. -- `https://is.dev.wso2.com` is the server host. - -```nginx -upstream ssl.is.dev.wso2.com { - server 127.0.0.1:9443; - ip_hash; -} - -server { -listen 443 ssl; - server_name is.dev.wso2.com; - ssl_certificate /opt/homebrew/etc/nginx/ssl/certificate.crt; - ssl_certificate_key /opt/homebrew/etc/nginx/ssl/privateKey.key; - - location /auth/ { - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Server $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_read_timeout 5m; - proxy_send_timeout 5m; - proxy_pass https://ssl.is.dev.wso2.com/; - - # Dynamically rewrite cookie paths based on the tenant - proxy_cookie_path ~^/(/)? /auth/$1; - proxy_cookie_path / /auth; - - # Match and rewrite tenant-specific cookie paths - proxy_cookie_path ~^/auth/(t/[^/]+)/ /auth/$1; - - proxy_redirect https://is.dev.wso2.com/auth/ https://is.dev.wso2.com/auth/; - proxy_redirect https://is.dev.wso2.com/ https://is.dev.wso2.com/auth/; - proxy_redirect https://is.dev.wso2.com:443/ https://is.dev.wso2.com/auth/; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - - location /console { - rewrite ^/console(.*)$ /auth/console$1 last; - - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Server $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - - proxy_read_timeout 5m; - proxy_send_timeout 5m; - - # Forward the rewritten path to the backend - proxy_pass https://ssl.is.dev.wso2.com/; - - # Dynamically handle tenant-specific redirects - proxy_redirect ~^https://is\.dev\.wso2\.com/auth/(t/[^/]+)/console https://is.dev.wso2.com/console; - } - - location /myaccount { - rewrite ^/myaccount(.*)$ /auth/myaccount$1 last; - - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Server $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - - proxy_read_timeout 5m; - proxy_send_timeout 5m; - - # Forward the rewritten path to the backend - proxy_pass https://ssl.is.dev.wso2.com/; - - # Dynamically handle tenant-specific redirects - proxy_redirect ~^https://is\.dev\.wso2\.com/auth/(t/[^/]+)/myaccount https://is.dev.wso2.com/myaccount; - } -} -``` - -#### Consuming the context path - -Context path configuration is consumed in different ways. - -1. Get the `proxy context` path defined in `server.proxy_context_path` using the Java Util in the JSP files. - -```js -var proxyContextPathGlobal = "<%=ServerConfiguration.getInstance().getFirstProperty(PROXY_CONTEXT_PATH)%>"; -``` - -2. Additionally, can override the context path per app with a TOML config. - -```toml -[console] -proxy_context_path = "auth" -``` diff --git a/apps/console/CHANGELOG.md b/apps/console/CHANGELOG.md index 19d4bf3ec3c..6107416c4d3 100644 --- a/apps/console/CHANGELOG.md +++ b/apps/console/CHANGELOG.md @@ -1,5 +1,114 @@ # @wso2is/console +## 2.41.0 + +### Minor Changes + +- [#7484](https://github.com/wso2/identity-apps/pull/7484) [`935b7aba2e1cc618588ec76325945dc00c12cba5`](https://github.com/wso2/identity-apps/commit/935b7aba2e1cc618588ec76325945dc00c12cba5) Thanks [@brionmario](https://github.com/brionmario)! - This pull request introduces support for a configurable proxy context path across multiple files in the project. The changes ensure that the application can dynamically handle different proxy context paths based on the server configuration. + + Ex: The My Account can be hosted under `https://is.dev.wso2.com/auth/t/brionmario.com/myaccount`. + ⚠️ Note that `auth` is the context path. + + #### Pre-requisites + + We currently need the following NGINX configuration. + + - `auth` is the proxy context path. + - `https://is.dev.wso2.com` is the server host. + + ```nginx + upstream ssl.is.dev.wso2.com { + server 127.0.0.1:9443; + ip_hash; + } + + server { + listen 443 ssl; + server_name is.dev.wso2.com; + ssl_certificate /opt/homebrew/etc/nginx/ssl/certificate.crt; + ssl_certificate_key /opt/homebrew/etc/nginx/ssl/privateKey.key; + + location /auth/ { + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_read_timeout 5m; + proxy_send_timeout 5m; + proxy_pass https://ssl.is.dev.wso2.com/; + + # Dynamically rewrite cookie paths based on the tenant + proxy_cookie_path ~^/(/)? /auth/$1; + proxy_cookie_path / /auth; + + # Match and rewrite tenant-specific cookie paths + proxy_cookie_path ~^/auth/(t/[^/]+)/ /auth/$1; + + proxy_redirect https://is.dev.wso2.com/auth/ https://is.dev.wso2.com/auth/; + proxy_redirect https://is.dev.wso2.com/ https://is.dev.wso2.com/auth/; + proxy_redirect https://is.dev.wso2.com:443/ https://is.dev.wso2.com/auth/; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /console { + rewrite ^/console(.*)$ /auth/console$1 last; + + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + + proxy_read_timeout 5m; + proxy_send_timeout 5m; + + # Forward the rewritten path to the backend + proxy_pass https://ssl.is.dev.wso2.com/; + + # Dynamically handle tenant-specific redirects + proxy_redirect ~^https://is\.dev\.wso2\.com/auth/(t/[^/]+)/console https://is.dev.wso2.com/console; + } + + location /myaccount { + rewrite ^/myaccount(.*)$ /auth/myaccount$1 last; + + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + + proxy_read_timeout 5m; + proxy_send_timeout 5m; + + # Forward the rewritten path to the backend + proxy_pass https://ssl.is.dev.wso2.com/; + + # Dynamically handle tenant-specific redirects + proxy_redirect ~^https://is\.dev\.wso2\.com/auth/(t/[^/]+)/myaccount https://is.dev.wso2.com/myaccount; + } + } + ``` + + #### Consuming the context path + + Context path configuration is consumed in different ways. + + 1. Get the `proxy context` path defined in `server.proxy_context_path` using the Java Util in the JSP files. + + ```js + var proxyContextPathGlobal = + "<%=ServerConfiguration.getInstance().getFirstProperty(PROXY_CONTEXT_PATH)%>"; + ``` + + 2. Additionally, can override the context path per app with a TOML config. + + ```toml + [console] + proxy_context_path = "auth" + ``` + ## 2.40.30 ### Patch Changes diff --git a/apps/console/package.json b/apps/console/package.json index 555157c9f68..c1b3b3ef8ba 100644 --- a/apps/console/package.json +++ b/apps/console/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@wso2is/console", - "version": "2.40.30", + "version": "2.41.0", "description": "WSO2 Identity Server Console", "author": "WSO2", "license": "Apache-2.0", diff --git a/apps/myaccount/CHANGELOG.md b/apps/myaccount/CHANGELOG.md index b8e72cd312c..7fe8f89bcff 100644 --- a/apps/myaccount/CHANGELOG.md +++ b/apps/myaccount/CHANGELOG.md @@ -1,5 +1,114 @@ # @wso2is/myaccount +## 2.17.0 + +### Minor Changes + +- [#7484](https://github.com/wso2/identity-apps/pull/7484) [`935b7aba2e1cc618588ec76325945dc00c12cba5`](https://github.com/wso2/identity-apps/commit/935b7aba2e1cc618588ec76325945dc00c12cba5) Thanks [@brionmario](https://github.com/brionmario)! - This pull request introduces support for a configurable proxy context path across multiple files in the project. The changes ensure that the application can dynamically handle different proxy context paths based on the server configuration. + + Ex: The My Account can be hosted under `https://is.dev.wso2.com/auth/t/brionmario.com/myaccount`. + ⚠️ Note that `auth` is the context path. + + #### Pre-requisites + + We currently need the following NGINX configuration. + + - `auth` is the proxy context path. + - `https://is.dev.wso2.com` is the server host. + + ```nginx + upstream ssl.is.dev.wso2.com { + server 127.0.0.1:9443; + ip_hash; + } + + server { + listen 443 ssl; + server_name is.dev.wso2.com; + ssl_certificate /opt/homebrew/etc/nginx/ssl/certificate.crt; + ssl_certificate_key /opt/homebrew/etc/nginx/ssl/privateKey.key; + + location /auth/ { + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_read_timeout 5m; + proxy_send_timeout 5m; + proxy_pass https://ssl.is.dev.wso2.com/; + + # Dynamically rewrite cookie paths based on the tenant + proxy_cookie_path ~^/(/)? /auth/$1; + proxy_cookie_path / /auth; + + # Match and rewrite tenant-specific cookie paths + proxy_cookie_path ~^/auth/(t/[^/]+)/ /auth/$1; + + proxy_redirect https://is.dev.wso2.com/auth/ https://is.dev.wso2.com/auth/; + proxy_redirect https://is.dev.wso2.com/ https://is.dev.wso2.com/auth/; + proxy_redirect https://is.dev.wso2.com:443/ https://is.dev.wso2.com/auth/; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /console { + rewrite ^/console(.*)$ /auth/console$1 last; + + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + + proxy_read_timeout 5m; + proxy_send_timeout 5m; + + # Forward the rewritten path to the backend + proxy_pass https://ssl.is.dev.wso2.com/; + + # Dynamically handle tenant-specific redirects + proxy_redirect ~^https://is\.dev\.wso2\.com/auth/(t/[^/]+)/console https://is.dev.wso2.com/console; + } + + location /myaccount { + rewrite ^/myaccount(.*)$ /auth/myaccount$1 last; + + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + + proxy_read_timeout 5m; + proxy_send_timeout 5m; + + # Forward the rewritten path to the backend + proxy_pass https://ssl.is.dev.wso2.com/; + + # Dynamically handle tenant-specific redirects + proxy_redirect ~^https://is\.dev\.wso2\.com/auth/(t/[^/]+)/myaccount https://is.dev.wso2.com/myaccount; + } + } + ``` + + #### Consuming the context path + + Context path configuration is consumed in different ways. + + 1. Get the `proxy context` path defined in `server.proxy_context_path` using the Java Util in the JSP files. + + ```js + var proxyContextPathGlobal = + "<%=ServerConfiguration.getInstance().getFirstProperty(PROXY_CONTEXT_PATH)%>"; + ``` + + 2. Additionally, can override the context path per app with a TOML config. + + ```toml + [console] + proxy_context_path = "auth" + ``` + ## 2.16.28 ### Patch Changes diff --git a/apps/myaccount/package.json b/apps/myaccount/package.json index aa8ffd98ac0..925bfb0acd7 100644 --- a/apps/myaccount/package.json +++ b/apps/myaccount/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@wso2is/myaccount", - "version": "2.16.28", + "version": "2.17.0", "description": "WSO2 Identity Server My Account", "author": "WSO2", "license": "Apache-2.0",