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

Support multiple JWT keys #395

Merged
merged 9 commits into from
Jan 3, 2025
Merged

Support multiple JWT keys #395

merged 9 commits into from
Jan 3, 2025

Conversation

hirenkp2000
Copy link
Member

No description provided.

Copy link

Code Coverage

Overall Project 42.68% -0.02% 🍏
Files changed 45.83% 🍏

Module Coverage
here-naksha-app-service 71.14% 🍏
here-naksha-lib-hub 25.01% -0.53% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
here-naksha-lib-hub NakshaHub.java 1.43% -1.69% 🍏

Copy link

Code Coverage

Overall Project 42.68% -0.08% 🍏
Files changed 50% 🍏

Module Coverage
here-naksha-app-service 71.21% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

Copy link

Code Coverage

Overall Project 42.68% -0.08% 🍏
Files changed 50% 🍏

Module Coverage
here-naksha-app-service 71.21% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

Copy link

Code Coverage

Overall Project 42.67% -0.08% 🍏
Files changed 51.49% 🍏

Module Coverage
here-naksha-app-service 71.21% 🍏
here-naksha-lib-core 32.8% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% 🍏
here-naksha-lib-core NakshaVersion.java 42.31% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

@hirenkp2000 hirenkp2000 marked this pull request as ready for review December 24, 2024 08:41
Copy link

Code Coverage

Overall Project 42.67% -0.08% 🍏
Files changed 51.49% 🍏

Module Coverage
here-naksha-app-service 71.21% 🍏
here-naksha-lib-core 32.81% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% 🍏
here-naksha-lib-core NakshaVersion.java 42.31% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

Copy link

Code Coverage

Overall Project 42.69% -0.08% 🍏
Files changed 51.49% 🍏

Module Coverage
here-naksha-app-service 71.21% 🍏
here-naksha-lib-core 32.81% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% 🍏
here-naksha-lib-core NakshaVersion.java 42.31% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

docker/README.md Outdated
--env NAKSHA_JWT_PVT_KEY=<your naksha JWT private key with '\n' for new lines> \
--env NAKSHA_JWT_PUB_KEY=<your naksha JWT public key with '\n' for new lines> \
--env NAKSHA_CONFIG_ID="<your Naksha config id>" \
--env NAKSHA_ADMIN_DB_URL="<your DB uri that Naksha should use>" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it might be better to leave out the double quotes for any beginners of shell scripting, then the errors will give hint, and they should supply their own inputs. That is easier to learn, rather than searching docker log for the eventual errors from dummy settings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, reverted the changes

Copy link

github-actions bot commented Jan 2, 2025

Code Coverage

Overall Project 42.67% -0.08% 🍏
Files changed 51.49% 🍏

Module Coverage
here-naksha-app-service 71.21% 🍏
here-naksha-lib-core 32.81% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% 🍏
here-naksha-lib-core NakshaVersion.java 42.31% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

@@ -1,11 +1,13 @@
{
"id": "cloud-config",
"type": "Config",
"type": "Feature",
Copy link
Collaborator

@gunplar gunplar Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this affect (de)serialization in any way, considering the annotation in NakshaHubConfig @JsonTypeName(value = "Config") still in v2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Earlier it was a problem. Now, it won't be as the said annotation is removed, allowing it to use "Feature" as standard type.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah excuse me, it was at the end of the files changed list.

Copy link

github-actions bot commented Jan 3, 2025

Code Coverage

Overall Project 42.68% -0.1% 🍏
Files changed 46.94% 🍏

Module Coverage
here-naksha-app-service 71.21% -0.13% 🍏
here-naksha-lib-core 32.8% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% -2.23% 🍏
here-naksha-lib-core NakshaVersion.java 42.31% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

HERE_NOTICE Outdated
@@ -7,7 +7,7 @@ The applicable license information is listed below:
----
(c) 2014-2023 Denis Pushkarev
Copyright (c) 2017 $YEAR HERE Europe B.V.
Copyright (c) 2017-2024 HERE Europe B.V.
Copyright (c) 2017-2025 HERE Europe B.V.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's revert here also

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link

github-actions bot commented Jan 3, 2025

Code Coverage

Overall Project 42.67% -0.1% 🍏
Files changed 46.94% 🍏

Module Coverage
here-naksha-app-service 71.21% -0.13% 🍏
here-naksha-lib-core 32.79% 🍏
here-naksha-lib-hub 24.8% -2.61% 🍏
Files
Module File Coverage
here-naksha-app-service NakshaJwtAuthHandler.java 100% 🍏
NakshaApp.java 63.92% -2.23% 🍏
here-naksha-lib-core NakshaVersion.java 42.31% 🍏
here-naksha-lib-hub NakshaHubConfig.java 4.55% -9.66% 🍏
NakshaHub.java 1.42% -4.01% 🍏

@hirenkp2000 hirenkp2000 merged commit 3f0a00d into v2 Jan 3, 2025
3 checks passed
@hirenkp2000 hirenkp2000 deleted the v2_CASL-759_multiple-pub-keys branch January 3, 2025 10:01
rlakde added a commit that referenced this pull request Jan 3, 2025
* Updated doc about existing JWT loading
* added support for additional pub key
* updated readme
* Updated version to 2.2.1
* Updated doc for pvt and pub key
* Added constants in NakshaHubConfig constructor
* addressed review comments

Co-authored-by: Hiren Patel <80465571+hirenkp2000@users.noreply.github.com>
rlakde added a commit that referenced this pull request Jan 16, 2025
* Initial Changes.

Signed-off-by: lakde <rohit.lakde@here.com>

* Fix Unit Tests

Signed-off-by: lakde <rohit.lakde@here.com>

* Review Fixes

Signed-off-by: lakde <rohit.lakde@here.com>

* Update openapi.yaml

* Update gradle.properties

* Update gradle.properties

* Rebase CASL-321 (#371)

* Fixed array patching (#365)

* Fixed array patching
* corrected patcher test expectation

* Fix thread stuck issue + addtnl logs (#368)

* Added logs to troubleshoot thread hanging issue
* CASL-258 unreleased lock fix (#358)
* Fixed array patching (#365) (#367)
* corrected patcher test expectation
* updated version
* updated changelog
---------

Co-authored-by: Pawel Mazurek <52866094+cyberhead-pl@users.noreply.github.com>

---------

Co-authored-by: Hiren Patel <80465571+hirenkp2000@users.noreply.github.com>
Co-authored-by: Pawel Mazurek <52866094+cyberhead-pl@users.noreply.github.com>

* Update reusable-build-and-publish.yml

* Update gradle.properties

* Update openapi.yaml

* Add Interface IExtensionInit

* Add instanceCache logic.

* Create ValueTuple.java

* loaderCache Changes

* Correct logger messages

* Update IExtensionInit description

* Fix bug

* Correct logger in Hub.

* Update IExtensionInit Description.

* Correct removeExtensionFromCache.

* Review Fixes for ExtensionCache

* Update ExtensionCache.java

* Update NakshaHub.java

* Extension Sub Environment Changes (#330) (#392)

* Initial Changes.
* Fix Unit Tests
* Review Fixes
* Rebase CASL-321 (#371)
* Fixed array patching (#365)
* Fix thread stuck issue + addtnl logs (#368)
* CASL-258 unreleased lock fix (#358)
* updated version
* updated changelog
* Update reusable-build-and-publish.yml
* Update gradle.properties
* Update openapi.yaml

---------

Signed-off-by: lakde <rohit.lakde@here.com>

* Update ExtensionCache.java

* Update NakshaHub.java

* Update gradle.properties

* Update openapi.yaml

* Update NakshaVersion.java

* Update gradle.properties

* Update gradle.properties

* Update NakshaVersion.java

* Update NakshaHub.java

* Support multiple JWT public keys (#395) (#396)

* Updated doc about existing JWT loading
* added support for additional pub key
* updated readme
* Updated version to 2.2.1
* Updated doc for pvt and pub key
* Added constants in NakshaHubConfig constructor
* addressed review comments

Co-authored-by: Hiren Patel <80465571+hirenkp2000@users.noreply.github.com>

* Update ExtensionCache.java

* Update gradle.properties

* Update openapi.yaml

* Update NakshaVersion.java

* Update logger as per review comment.

---------

Signed-off-by: lakde <rohit.lakde@here.com>
Co-authored-by: Hiren Patel <80465571+hirenkp2000@users.noreply.github.com>
Co-authored-by: Pawel Mazurek <52866094+cyberhead-pl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants