-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: Extract env/system/context config logic into LyoConfigUtil #220
Open
berezovskyi
wants to merge
4
commits into
master
Choose a base branch
from
b-registry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Discussed with Jad. Andrew will
|
berezovskyi
changed the title
Get it of Log4j and extract env/system/context config logic into LyoConfigUtil
Extract env/system/context config logic into LyoConfigUtil
Feb 15, 2022
berezovskyi
force-pushed
the
b-registry
branch
2 times, most recently
from
April 9, 2022 16:38
4d6ec16
to
efbc772
Compare
SonarCloud Quality Gate failed. |
Fails due to #284, we should instead move this code to a new module, e.g. |
github-actions
bot
force-pushed
the
b-registry
branch
3 times, most recently
from
April 27, 2023 20:53
b4956bb
to
25e6482
Compare
berezovskyi
changed the title
Extract env/system/context config logic into LyoConfigUtil
feat: Extract env/system/context config logic into LyoConfigUtil
Jun 30, 2023
github-actions
bot
force-pushed
the
b-registry
branch
2 times, most recently
from
July 14, 2023 07:43
70ed956
to
1aab254
Compare
github-actions
bot
force-pushed
the
b-registry
branch
2 times, most recently
from
August 5, 2023 07:43
3e802c4
to
8454ba0
Compare
berezovskyi
force-pushed
the
b-registry
branch
from
August 11, 2023 00:59
8454ba0
to
1c662e7
Compare
github-actions
bot
force-pushed
the
b-registry
branch
from
August 12, 2023 07:44
1c662e7
to
34183f4
Compare
Signed-off-by: Andrew Berezovskyi <[email protected]>
Signed-off-by: Andrew Berezovskyi <[email protected]>
berezovskyi
force-pushed
the
b-registry
branch
from
August 14, 2023 21:14
34183f4
to
0c7d9dc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As you know, https://blog.sonatype.com/a-new-0-day-log4j-vulnerability-discovered-in-the-wild is a big problem for the ecosystem. We are not using v2 of Log4j and are not affected but I wanted to take a bit of time to fully remove remnants of Log4j use in Lyo. As you know, Lyo uses SLF4J API in all SDK libraries and SLF4J + SimpleLogger in the webapps we ship.
Another thing this PR does is introduce the
org.eclipse.lyo.core.utils.marshallers.LyoConfigUtil
class with helper methods to scan the environment for a property. For example, if you are looking for theport
property in theorg.eclipse.lyo.oslc4j.core.servlet.ServletListener
instance, we want to check these places in the order of priority:LYO_PORT
environment variable. This is the new override mechanism for containerized environments.org.eclipse.lyo.oslc4j.core.servlet
System (JVM) property. This is the old override mechanism for multitenant application server environments.org.eclipse.lyo.oslc4j.core.servlet
Servlet Context parameter. This is the default configuration mechanism for Lyo.org.eclipse.lyo.core.utils.marshallers.LyoConfigUtil#getOslcConfigProperty
does exactly that, whileorg.eclipse.lyo.core.utils.marshallers.LyoConfigUtil#getOslcConfigPropertyNoContext
represents a fallback mechanism only looking in (1) and (2) in case it must be invoked from a place where aServletContext
reference is not available.However, after getting the
oslc4j-registry
app to run, I realized it only contains a CF only on aServiceProvider
level. My old impression was that it allows to run a single registry where mutliple SP Catalogs can be registered with the "registry" SP Catalog. In light of this discovery, I propose to markoslc4j-registry
for removal in Lyo 5.0. In current form, it's not much more than a demo app and a default output from Lyo Designer has more user-friendly look and features out of the box.Finally,
oslc4j-wink
seems to have only 2 useful things:OslcResourceShapeResource
for reuse by Wink-based OSLC Servers. We don't support Wink any more and Lyo Designer supports much more feature-rich shape resource support (e.g. Shape HTML tables like in the OSLC specs, even for custom resources).org.eclipse.lyo.oslc4j.client.OslcRestClient
. This client was long replaced by the (now obsolete)org.eclipse.lyo.client.oslc.OslcClient
. Modern apps should use one of the new clients via theorg.eclipse.lyo.client.IOslcClient
interface.With this in mind, I propose to mark the
org.eclipse.lyo.oslc4j.client.OslcRestClient
deprecated immediately (done in this PR) and also scheduleoslc4j-wink
for full removal from Lyo in 5.0.Checklist
<exclude>log4j:log4j</exclude>