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

[Q] Nacos client 1.x policy and 2.x package mode #9091

Closed
wu-sheng opened this issue Sep 5, 2022 · 16 comments
Closed

[Q] Nacos client 1.x policy and 2.x package mode #9091

wu-sheng opened this issue Sep 5, 2022 · 16 comments
Labels
area/Client Related to Nacos Client SDK
Milestone

Comments

@wu-sheng
Copy link
Contributor

wu-sheng commented Sep 5, 2022

Is your feature request related to a problem? Please describe.
SkyWalking community received a CVE report due to a Nacos client CVE issue. 1.x seems not released by Nacos team, so, we may not be able to find a version to upgrade.

When we consider v2 as option, we noticed,

they started to package all dependencies by shading into their client SDK so the package becomes really large, what's more, the dependencies that are packed into the SDK also have CVE, so we have literally NO way to upgrade them.

This means, on one side, we have to depend on Nacos' a new release to fix this CVE, rather than using dependency management to override; on the other side, using a shaded uber jar would be an issue for another OSS project like SkyWalking. This would increase our binary tar a lot, and make us hard to observe the dependencies' licenses as they could be changed w/o any update.

Describe the solution you'd like
Could Nacos 1.x release a CVE release or could nacos 2.x release a pure Nacos client jar with dependencies in the pom only w/o shaded dependencies?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@KomachiSion
Copy link
Collaborator

KomachiSion commented Sep 6, 2022

I see the issues and CVE, I think it's not a client problem. nacos use a default value as the token generator, users can avoid it by setting the default token when they setup cluster.

The issue author has provide solution in #7182

About released 2.x client without shaded dependencies. It can be considered.

@KomachiSion KomachiSion added the area/Client Related to Nacos Client SDK label Sep 6, 2022
@KomachiSion KomachiSion added this to the 2.1.2 milestone Sep 6, 2022
@wu-sheng
Copy link
Contributor Author

wu-sheng commented Sep 6, 2022

I see the issues and CVE, I think it's not a client problem. nacos use a default value as the token generator, users can avoid it by setting the default token when they setup cluster.
The issue author has provide solution in #7182

Thanks for the explanation, Then maybe some security tools report this incorrectly.

@wu-sheng
Copy link
Contributor Author

wu-sheng commented Sep 6, 2022

About released 2.x client without shaded dependencies. It can be considered.

Should we keep this issue open for a conclusion about this consideration?

@KomachiSion
Copy link
Collaborator

About released 2.x client without shaded dependencies. It can be considered.

Should we keep this issue open for a conclusion about this consideration?

Sure. In fact, releasing a client without shaded dependencies is easy. The discussion point is which one use nacos-client artifactId.
If the simple client use nacos-client artifactId, most of users will solve the dependencies conflict about grpc and netty.

So I think the shaded client still use nacos-client artifactId, the simple client use a new artifactId like nacos-client-simple

@kezhenxu94
Copy link

About released 2.x client without shaded dependencies. It can be considered.

Should we keep this issue open for a conclusion about this consideration?

Sure. In fact, releasing a client without shaded dependencies is easy. The discussion point is which one use nacos-client artifactId.

If the simple client use nacos-client artifactId, most of users will solve the dependencies conflict about grpc and netty.

So I think the shaded client still use nacos-client artifactId, the simple client use a new artifactId like nacos-client-simple

Another idea to use different version format like 2.4.0-with-dependencies and 2.4.0 or 2.4.0 and 2.4.0-without-dependencies. So when users upgrade they can be aware of there are two variants of the new versions.

@linghengqian
Copy link

@KomachiSion
Copy link
Collaborator

The new idea is use classifier. like

        <dependency>
            <groupId>com.alibaba.nacos</groupId>
            <artifactId>nacos-client</artifactId>
            <version>2.1.2</version>
            <classifier>pure</classifier>
        </dependency>

If no classifier set, use default shaded version.

@wu-sheng
Copy link
Contributor Author

@kezhenxu94 Does this work for us? We may consider to bump up?

@wu-sheng
Copy link
Contributor Author

@KomachiSion Is 2.1.2 going to release soon? I would post an issue on SkyWalking issue list to see who could help to bump up to the latest release.

@kezhenxu94
Copy link

@kezhenxu94 Does this work for us? We may consider to bump up?

I'm tracking on this, but since the 2.1.2 is not yet released, I can bump up to 2.1.2 when it's released

@KomachiSion
Copy link
Collaborator

@KomachiSion Is 2.1.2 going to release soon? I would post an issue on SkyWalking issue list to see who could help to bump up to the latest release.

Yes, plan to release in this month

@KomachiSion
Copy link
Collaborator

KomachiSion commented Oct 17, 2022

2.1.2 version has released.

how to use pure sdk has update to document https://nacos.io/en-us/docs/sdk.html

@kezhenxu94
Copy link

    <!-- Same version of nacos-api and nacos-common must be introduced for pure SDK, otherwise there may be a problem that the class cannot be found at runtime -->

This looks weird to me as "pure" means the dependency doesn't include third-party dependencies, but I suppose it includes "self dependencies" like nacos-common / nacos-api.

@KomachiSion
Copy link
Collaborator

Because shaded version and pure version is same pom file, shaded version shaded api and common into client, so the pom dependencies is optional.

pure version should depend them by self. Use pure version need user set classifier, and set an api and common.

@KomachiSion
Copy link
Collaborator

I think the issue has been solved after 2.1.2 released, I will close issue and close the related millstone.
If there are some problem for 2.1.2 client, I think we should submit new issue.

@wu-sheng
Copy link
Contributor Author

Hi @KomachiSion Yesterday, we just realized this would somehow block the Maven(mvnw). We still can't find out the reason yet.

apache/skywalking#9799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Client Related to Nacos Client SDK
Projects
None yet
Development

No branches or pull requests

4 participants