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

[UNOMI-722] - Update Yauaa to 7.9.0 (CVE-2022-23496) #557

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

nielsbasjes
Copy link
Contributor

@nielsbasjes nielsbasjes commented Dec 8, 2022

PR Title format:

[UNOMI-722] Update Yauaa to 7.9.0

Update this dependency because of CVE-2022-23496

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Format the pull request title like [UNOMI-XXX] - Title of the pull request
  • Provide integration tests for your changes, especially if you are changing the behavior of existing code or adding
    significant new parts of code.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    Copy the description to the related JIRA issue
  • Run mvn clean install -P integration-tests to make sure basic checks pass. A more thorough check will be
    performed on your pull request automatically.

Trivial changes like typos do not require a JIRA issue (javadoc, project build changes, small doc changes, comments...).

If this is your first contribution, you have to read the Contribution Guidelines

If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement
if you are unsure please ask on the developers list.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@nielsbasjes nielsbasjes changed the title [UNOMI-722] - Update Yauaa to 7.9.0 [UNOMI-722] - Update Yauaa to 7.9.0 (CVE-2022-23496) Dec 8, 2022
Copy link
Contributor

@jkevan jkevan left a comment

Choose a reason for hiding this comment

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

Hello, thank you for the PR.

It seem's there is an error due to the upgrade to 7.9.0. It's visible in the log of the starting server in the tests executed on this PR:

org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=unomi-router-karaf-feature; type=karaf.feature; version="[2.2.0.SNAPSHOT,2.2.0.SNAPSHOT]"; filter:="(&(osgi.identity=unomi-router-karaf-feature)(type=karaf.feature)(version>=2.2.0.SNAPSHOT)(version<=2.2.0.SNAPSHOT))" [caused by: Unable to resolve unomi-router-karaf-feature/2.2.0.SNAPSHOT: missing requirement [unomi-router-karaf-feature/2.2.0.SNAPSHOT] osgi.identity; osgi.identity=unomi-kar; type=karaf.feature [caused by: Unable to resolve unomi-kar/2.2.0.SNAPSHOT: missing requirement [unomi-kar/2.2.0.SNAPSHOT] osgi.identity; osgi.identity=org.apache.unomi.plugins-request; type=osgi.bundle; version="[2.2.0.SNAPSHOT,2.2.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.apache.unomi.plugins-request/2.2.0.SNAPSHOT: missing requirement [org.apache.unomi.plugins-request/2.2.0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.brotli.dec)"]]]
	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332)
	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:401)
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1063)
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve unomi-router-karaf-feature/2.2.0.SNAPSHOT: missing requirement [unomi-router-karaf-feature/2.2.0.SNAPSHOT] osgi.identity; osgi.identity=unomi-kar; type=karaf.feature [caused by: Unable to resolve unomi-kar/2.2.0.SNAPSHOT: missing requirement [unomi-kar/2.2.0.SNAPSHOT] osgi.identity; osgi.identity=org.apache.unomi.plugins-request; type=osgi.bundle; version="[2.2.0.SNAPSHOT,2.2.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.apache.unomi.plugins-request/2.2.0.SNAPSHOT: missing requirement [org.apache.unomi.plugins-request/2.2.0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.brotli.dec)"]]
	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
	... 12 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve unomi-kar/2.2.0.SNAPSHOT: missing requirement [unomi-kar/2.2.0.SNAPSHOT] osgi.identity; osgi.identity=org.apache.unomi.plugins-request; type=osgi.bundle; version="[2.2.0.SNAPSHOT,2.2.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.apache.unomi.plugins-request/2.2.0.SNAPSHOT: missing requirement [org.apache.unomi.plugins-request/2.2.0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.brotli.dec)"]
	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
	... 13 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.apache.unomi.plugins-request/2.2.0.SNAPSHOT: missing requirement [org.apache.unomi.plugins-request/2.2.0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.brotli.dec)"
	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
	... 14 more

The package: org.brotli.dec seem's to be a new transitive dependency for Yauaa 7.9.0.
So it need to be declared either as optional in the Import-Package or embed as a an internal dependency in current bundle if it's mandatory for yauaa 7.9.0 runtime.

@nielsbasjes
Copy link
Contributor Author

I found that org.brotli.dec was added by httpcomponents-client v5.2.1.
apache/httpcomponents-client@db47570

Looking at their code I see they have already indicated this is optional (and my code does not need it at all):

    <dependency>
      <groupId>org.brotli</groupId>
      <artifactId>dec</artifactId>
      <optional>true</optional>
    </dependency>

I'm going to find a fix for this.

@nielsbasjes
Copy link
Contributor Author

@jkevan Which test gave this error? I'm having a hard time running the full build locally to reproduce the effect.

@nielsbasjes
Copy link
Contributor Author

@jkevan Please check if this is correct now.

@nielsbasjes
Copy link
Contributor Author

I'm going to see if I can get rid of this dependency that I do not need within Yauaa.

@nielsbasjes nielsbasjes marked this pull request as draft January 29, 2023 10:44
@jkevan
Copy link
Contributor

jkevan commented Jan 31, 2023

Thank you for the update !

Seem's good to me.
If it's good for you we could merge the PR but for this we would need to switch from draft to ready for review.

@nielsbasjes nielsbasjes marked this pull request as ready for review January 31, 2023 09:13
@jkevan jkevan merged commit afc28a3 into apache:master Jan 31, 2023
asfgit pushed a commit that referenced this pull request Feb 3, 2023
@nielsbasjes nielsbasjes deleted the UNOMI-722-Yauaa790 branch February 6, 2023 15:47
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