From 8b5c9c2f7f54cc338bd5043cd62b526337e96b99 Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Tue, 24 May 2022 16:28:41 -0500 Subject: [PATCH 01/11] workaround for Oauth transport lib error --- contributions/api/contributions_rest_service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contributions/api/contributions_rest_service.py b/contributions/api/contributions_rest_service.py index 9858dd60..2a1fabfb 100644 --- a/contributions/api/contributions_rest_service.py +++ b/contributions/api/contributions_rest_service.py @@ -15,6 +15,7 @@ import connexion import logging import controllers.configs as cfg +from werkzeug.middleware.proxy_fix import ProxyFix from time import gmtime from rokwireresolver import RokwireResolver @@ -38,6 +39,9 @@ app.add_api('contribution.yaml', base_path=cfg.CONTRIBUTION_URL_PREFIX, arguments={'title': 'Rokwire'}, resolver=RokwireResolver('controllers'), resolver_error=501, strict_validation=True) +# App is behind one proxy that sets the -For and -Host headers. +app.app.wsgi_app = ProxyFix(app.app.wsgi_app, x_for=1, x_host=1) + if cors_enabled: CORS(app.app) From 0e64f94e5ab9e820d47765ab8b6c62d560c1356c Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Tue, 24 May 2022 16:33:10 -0500 Subject: [PATCH 02/11] updated changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fbe2ef8..cd3b9ca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +### Changed + +### Fixed +- ProxyFix for OAuth Lib Transport Error when deploying in docker containers. [#928](https://github.com/rokwire/rokwire-building-blocks-api/issues/928) + ## [1.14.0] - 2022-05-17 ### Added - Sending email to reviewers. [#839](https://github.com/rokwire/rokwire-building-blocks-api/issues/839) From b6df269b4d0f2b2dc15848e469379053128513f8 Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Tue, 24 May 2022 16:54:07 -0500 Subject: [PATCH 03/11] updated docker build with nocache option --- release_contributions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_contributions.sh b/release_contributions.sh index 2d6a3a7f..2ca8f99b 100755 --- a/release_contributions.sh +++ b/release_contributions.sh @@ -3,6 +3,6 @@ source release_base_script.sh ###### CONTRIBUTIONS BUILDING BLOCK ###### -docker build --pull -f contributions/Dockerfile -t ${PROJECT_NAME}/contributions-building-block:${VERSION} . +docker build --no-cache --pull -f contributions/Dockerfile -t ${PROJECT_NAME}/contributions-building-block:${VERSION} . docker tag ${PROJECT_NAME}/contributions-building-block:${VERSION} 779619664536.dkr.ecr.us-east-2.amazonaws.com/${PROJECT_NAME}/contributions-building-block:${VERSION} docker push 779619664536.dkr.ecr.us-east-2.amazonaws.com/${PROJECT_NAME}/contributions-building-block:${VERSION} From 7b85eec1b46352701be2aec2661946fe8245826c Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Wed, 25 May 2022 10:05:11 -0500 Subject: [PATCH 04/11] Master to develop after 1.14.0 (#927) * Update CHANGELOG.md * Update version numbers in the OpenAPI documents. * Update CHANGELOG.md * Update CHANGELOG.md * Update version number in YAML file. * Point to production health and talent chooser API documentation in production. * Update CHANGELOG. * Update version number in OpenAPI spec files. * Update Building Block URL in Api Doc Dockerfile. * Minor update to CHANGELOG. * Fix Auth library dependencies versions to avoid breaking changes. * Update Events Building Block Dockerfile. * Update App Config Dockerfile. * Update Authentication Building Block Dockerfile. * Update Profile Building Block Dockerfile. * Update Contributions Building Block Dockerfile and requirements. * Update Contributions Catalog Dockerfile and requirements. * Update Logging Building Block Dockerfile. * Update version numbers in API specs. * Update CHANGELOG. * Update CHANGELOG.md * Update version number. * Update CHANGELOG.md * Update CHANGELOG.md * Update version numbers in OpenAPI specification. * turn off group authentication on image get endpoint * turn off group authentication on image get endpoint * Update Events Building Block logs and related configuration. * Update CHANGELOG. * Added more information to logs * changed the log's building block name * updated to use longDescription * updated changelog * Update CHANGELOG and verson numbers. * Update API Doc Dockerfile. * Fix CHANGELOG. * Fix CHANGELOG. * Update version numbers in SECURITY.md * Fix merge conflicts. * Update CHANGELOG.md * Update CHANGELOG. * Update Dockerfile. * Update version number in API spec files. * Updater version in SECURITY.md * Update CHANGELOG. * Update Events BB version number. * Update SECURITY.md * updated for release * resolved merge conflicts * updated version in yaml files * updated version in yaml * Update Dockerfile changed to dev urls Co-authored-by: Sandeep Puthanveetil Satheesan Co-authored-by: Sandeep Puthanveetil Satheesan Co-authored-by: Bing Zhang Co-authored-by: YONG WOOK KIM --- .dockerignore | 2 +- CHANGELOG.md | 9 ++++++--- SECURITY.md | 1 + appconfigservice/appconfig.yaml | 2 +- authservice/auth.yaml | 2 +- contributions/contribution.yaml | 2 +- eventservice/events.yaml | 2 +- loggingservice/logging.yaml | 2 +- profileservice/profile.yaml | 2 +- 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.dockerignore b/.dockerignore index 934c1fb2..1e5c14a1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1 @@ -*/.env +**/*.env diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bfa993c..6fbe2ef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [1.14.0] - 2022-05-17 ### Added - Sending email to reviewers. [#839](https://github.com/rokwire/rokwire-building-blocks-api/issues/839) - Self certification information to talent [#878](https://github.com/rokwire/rokwire-building-blocks-api/issues/878) @@ -18,10 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Modified required capability in talent detail page [#877](https://github.com/rokwire/rokwire-building-blocks-api/issues/877) - Minimum end user role as text in talent detail page [#879](https://github.com/rokwire/rokwire-building-blocks-api/issues/879) -- Made person and organization display order more consitence in catalog [#908](https://github.com/rokwire/rokwire-building-blocks-api/issues/908) +- Made person and organization display order more consistence in catalog [#908](https://github.com/rokwire/rokwire-building-blocks-api/issues/908) - Show general html values instead of raw data format in catalog [#909](https://github.com/rokwire/rokwire-building-blocks-api/issues/909) - Contact information in contribution detail page shows html formatted data [#914](https://github.com/rokwire/rokwire-building-blocks-api/issues/914) -- Environmental varialbes in capability detail page shows html formatted data [#915](https://github.com/rokwire/rokwire-building-blocks-api/issues/915) +- Environmental variables in capability detail page shows html formatted data [#915](https://github.com/rokwire/rokwire-building-blocks-api/issues/915) ### Fixed - Posting contribution error when required capability is empty in talent [#874](https://github.com/rokwire/rokwire-building-blocks-api/issues/874) @@ -475,7 +477,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - References to AWS keys and variables in the Events Building Block. -[Unreleased]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.13.0...HEAD +[Unreleased]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.14.0...HEAD +[1.14.0]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.13.0...1.14.0 [1.13.0]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.12.1...1.13.0 [1.12.1]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.12.0...1.12.1 [1.12.0]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.11.3...1.12.0 diff --git a/SECURITY.md b/SECURITY.md index 2ea78eda..cbde9cca 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,6 +6,7 @@ Patches for **Rokwire Building Blocks** in this repository will only be applied | Version | Supported | | ------- | ------------------ | +| 1.14.0 | :white_check_mark: | | 1.13.0 | :white_check_mark: | | 1.12.1 | :white_check_mark: | | 1.12.0 | :white_check_mark: | diff --git a/appconfigservice/appconfig.yaml b/appconfigservice/appconfig.yaml index 20528a1e..91b7c461 100755 --- a/appconfigservice/appconfig.yaml +++ b/appconfigservice/appconfig.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire App Config Building Block API description: App Config Building Block API Documentation - version: 1.12.1 + version: 1.14.0 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/authservice/auth.yaml b/authservice/auth.yaml index 501eca87..916a903c 100644 --- a/authservice/auth.yaml +++ b/authservice/auth.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Rokwire Auth Building Block API description: Authentication Building Block API Documentation - version: 1.12.1 + version: 1.14.0 paths: /authentication/phone-initiate: post: diff --git a/contributions/contribution.yaml b/contributions/contribution.yaml index a4397aee..b00dc860 100644 --- a/contributions/contribution.yaml +++ b/contributions/contribution.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Contributions Building Block API description: Contributions Building Block API Documentation - version: 1.12.1 + version: 1.14.0 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/eventservice/events.yaml b/eventservice/events.yaml index 2b5201df..6dcab60c 100755 --- a/eventservice/events.yaml +++ b/eventservice/events.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Events Building Block API description: Events Building Block API Documentation - version: 1.13.0 + version: 1.14.0 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/loggingservice/logging.yaml b/loggingservice/logging.yaml index 8009339d..df16940d 100755 --- a/loggingservice/logging.yaml +++ b/loggingservice/logging.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Logging Building Block API description: Logging Building Block API Documentation - version: 1.12.1 + version: 1.14.0 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/profileservice/profile.yaml b/profileservice/profile.yaml index 99eb4270..6e44d091 100755 --- a/profileservice/profile.yaml +++ b/profileservice/profile.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Profile Building Block API description: Profile Building Block API Documentation - version: 1.12.1 + version: 1.14.0 servers: - url: https://api.rokwire.illinois.edu description: Production server From f8c16ffba7c1347369bdf74db767a5e6ffe8d75d Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Wed, 25 May 2022 14:00:03 -0500 Subject: [PATCH 05/11] moved ProxyFix to catalog --- contributions/api/contributions_rest_service.py | 3 --- contributions/catalog/catalog_rest_service.py | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contributions/api/contributions_rest_service.py b/contributions/api/contributions_rest_service.py index 2a1fabfb..070a350b 100644 --- a/contributions/api/contributions_rest_service.py +++ b/contributions/api/contributions_rest_service.py @@ -15,7 +15,6 @@ import connexion import logging import controllers.configs as cfg -from werkzeug.middleware.proxy_fix import ProxyFix from time import gmtime from rokwireresolver import RokwireResolver @@ -39,8 +38,6 @@ app.add_api('contribution.yaml', base_path=cfg.CONTRIBUTION_URL_PREFIX, arguments={'title': 'Rokwire'}, resolver=RokwireResolver('controllers'), resolver_error=501, strict_validation=True) -# App is behind one proxy that sets the -For and -Host headers. -app.app.wsgi_app = ProxyFix(app.app.wsgi_app, x_for=1, x_host=1) if cors_enabled: CORS(app.app) diff --git a/contributions/catalog/catalog_rest_service.py b/contributions/catalog/catalog_rest_service.py index 1cebce24..82127068 100644 --- a/contributions/catalog/catalog_rest_service.py +++ b/contributions/catalog/catalog_rest_service.py @@ -25,6 +25,7 @@ from controllers.config import Config as cfg from controllers.contribute import bp as contribute_bp from db import init_app +from werkzeug.middleware.proxy_fix import ProxyFix debug = cfg.DEBUG @@ -50,6 +51,9 @@ template_folder=template_dir) app.config.from_object(cfg) +# App is behind one proxy that sets the -For and -Host headers. +app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_host=1) + init_app(app) app.register_blueprint(contribute_bp) From d89159da61e27bcb607418080348e64c3d50cf57 Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Thu, 26 May 2022 09:31:43 -0500 Subject: [PATCH 06/11] removed no-cache from docker build --- release_contributions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_contributions.sh b/release_contributions.sh index 2ca8f99b..2d6a3a7f 100755 --- a/release_contributions.sh +++ b/release_contributions.sh @@ -3,6 +3,6 @@ source release_base_script.sh ###### CONTRIBUTIONS BUILDING BLOCK ###### -docker build --no-cache --pull -f contributions/Dockerfile -t ${PROJECT_NAME}/contributions-building-block:${VERSION} . +docker build --pull -f contributions/Dockerfile -t ${PROJECT_NAME}/contributions-building-block:${VERSION} . docker tag ${PROJECT_NAME}/contributions-building-block:${VERSION} 779619664536.dkr.ecr.us-east-2.amazonaws.com/${PROJECT_NAME}/contributions-building-block:${VERSION} docker push 779619664536.dkr.ecr.us-east-2.amazonaws.com/${PROJECT_NAME}/contributions-building-block:${VERSION} From dfb60c5c11bdaf9d2aa65b277d53369e78294c63 Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Thu, 26 May 2022 09:36:10 -0500 Subject: [PATCH 07/11] updated version in yaml --- appconfigservice/appconfig.yaml | 2 +- authservice/auth.yaml | 2 +- contributions/contribution.yaml | 2 +- eventservice/events.yaml | 2 +- loggingservice/logging.yaml | 2 +- profileservice/profile.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/appconfigservice/appconfig.yaml b/appconfigservice/appconfig.yaml index 91b7c461..a12a8d80 100755 --- a/appconfigservice/appconfig.yaml +++ b/appconfigservice/appconfig.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire App Config Building Block API description: App Config Building Block API Documentation - version: 1.14.0 + version: 1.14.1 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/authservice/auth.yaml b/authservice/auth.yaml index 916a903c..5df23e53 100644 --- a/authservice/auth.yaml +++ b/authservice/auth.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Rokwire Auth Building Block API description: Authentication Building Block API Documentation - version: 1.14.0 + version: 1.14.1 paths: /authentication/phone-initiate: post: diff --git a/contributions/contribution.yaml b/contributions/contribution.yaml index b00dc860..d04cd77c 100644 --- a/contributions/contribution.yaml +++ b/contributions/contribution.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Contributions Building Block API description: Contributions Building Block API Documentation - version: 1.14.0 + version: 1.14.1 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/eventservice/events.yaml b/eventservice/events.yaml index 6dcab60c..ffb30473 100755 --- a/eventservice/events.yaml +++ b/eventservice/events.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Events Building Block API description: Events Building Block API Documentation - version: 1.14.0 + version: 1.14.1 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/loggingservice/logging.yaml b/loggingservice/logging.yaml index df16940d..7084cc26 100755 --- a/loggingservice/logging.yaml +++ b/loggingservice/logging.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Logging Building Block API description: Logging Building Block API Documentation - version: 1.14.0 + version: 1.14.1 servers: - url: https://api.rokwire.illinois.edu description: Production server diff --git a/profileservice/profile.yaml b/profileservice/profile.yaml index 6e44d091..27c96de0 100755 --- a/profileservice/profile.yaml +++ b/profileservice/profile.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Rokwire Profile Building Block API description: Profile Building Block API Documentation - version: 1.14.0 + version: 1.14.1 servers: - url: https://api.rokwire.illinois.edu description: Production server From b7ed28ca8116d427b79657c50a3178b5226cda2e Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Thu, 26 May 2022 09:37:03 -0500 Subject: [PATCH 08/11] updated security --- SECURITY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SECURITY.md b/SECURITY.md index cbde9cca..7ed077bd 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,6 +6,7 @@ Patches for **Rokwire Building Blocks** in this repository will only be applied | Version | Supported | | ------- | ------------------ | +| 1.14.1 | :white_check_mark: | | 1.14.0 | :white_check_mark: | | 1.13.0 | :white_check_mark: | | 1.12.1 | :white_check_mark: | From b82178beffc1a0591a7ab861f496ab94d72ef83a Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Thu, 26 May 2022 10:18:52 -0500 Subject: [PATCH 09/11] Update contributions/api/contributions_rest_service.py remove blank line Co-authored-by: Sandeep Puthanveetil Satheesan --- contributions/api/contributions_rest_service.py | 1 - 1 file changed, 1 deletion(-) diff --git a/contributions/api/contributions_rest_service.py b/contributions/api/contributions_rest_service.py index 070a350b..9858dd60 100644 --- a/contributions/api/contributions_rest_service.py +++ b/contributions/api/contributions_rest_service.py @@ -38,7 +38,6 @@ app.add_api('contribution.yaml', base_path=cfg.CONTRIBUTION_URL_PREFIX, arguments={'title': 'Rokwire'}, resolver=RokwireResolver('controllers'), resolver_error=501, strict_validation=True) - if cors_enabled: CORS(app.app) From b04a71d48ab26b808d0754c6634e0b44eca5321d Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Thu, 26 May 2022 10:21:15 -0500 Subject: [PATCH 10/11] added version comparison --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f1232a..072e3508 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -481,7 +481,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - References to AWS keys and variables in the Events Building Block. -[Unreleased]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.14.0...HEAD +[Unreleased]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.14.1...HEAD +[1.14.1]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.14.0...1.14.1 [1.14.0]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.13.0...1.14.0 [1.13.0]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.12.1...1.13.0 [1.12.1]: https://github.com/rokwire/rokwire-building-blocks-api/compare/1.12.0...1.12.1 From 4c5894eec89888a5608d3836db14a0eabcd98e95 Mon Sep 17 00:00:00 2001 From: Minu Mathew Date: Thu, 26 May 2022 10:26:51 -0500 Subject: [PATCH 11/11] Update catalog_rest_service.py Comment on the proxyFix Co-authored-by: Sandeep Puthanveetil Satheesan --- contributions/catalog/catalog_rest_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributions/catalog/catalog_rest_service.py b/contributions/catalog/catalog_rest_service.py index 82127068..37fd68a9 100644 --- a/contributions/catalog/catalog_rest_service.py +++ b/contributions/catalog/catalog_rest_service.py @@ -51,7 +51,7 @@ template_folder=template_dir) app.config.from_object(cfg) -# App is behind one proxy that sets the -For and -Host headers. +# TODO: Experimental fix for running behind the load balancer. Revisit to verify that this fix matches the actual deployment environment. Ref: https://werkzeug.palletsprojects.com/en/2.1.x/middleware/proxy_fix/ app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_host=1) init_app(app)