Commit Graph

492 Commits

Author SHA1 Message Date
阿魁
4f827ca0d9
Adjust integration tests for common modules in the core module to comply with checkstyle. (#12349)
* Fix exception code error.(#10925)

* [IT]Adjust integration tests for ability, base, and client modules in the core module to comply with checkstyle.

* [IT]Optimize the class naming.

* [IT]Adjust integration tests for common modules in the core module to comply with checkstyle.
2024-07-18 11:15:38 +08:00
阿魁
c717538bd7
[IT]Adjust integration tests for cluster,code,smoke modules in the core module to comply with checkstyle. (#12350) 2024-07-18 11:12:14 +08:00
阿魁
9d0a48d54f
[IT]Adjust core module auth integration tests to meet checkstyle requirements. (#12368) 2024-07-18 09:30:26 +08:00
阿魁
de5ade75c8
Adjust integration tests for ability, base, and client modules in the core module to comply with checkstyle. (#12335)
* Fix exception code error.(#10925)

* [IT]Adjust integration tests for ability, base, and client modules in the core module to comply with checkstyle.

* [IT]Optimize the class naming.
2024-07-15 11:17:48 +08:00
shalk(xiao kun)
3b2f787d61
[ISSUE #12227] upgrade module test from junit4 to junit5 (#12251)
* upgrade module naocs-test from junit4 to junit5

* fix test/core-test

* fix some test

* fix ci
2024-06-24 09:38:38 +08:00
KomachiSion
5f7801b341 Merge branch 'refs/heads/upstream-develop' into summer-ospp#10374
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java
#	client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java
#	client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java
#	client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java
#	client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java
2024-05-31 15:21:48 +08:00
阿魁
5169f06654
Support TLS Grpc communication between clusters. (#11549)
* Fix exception code error.(#10925)

* [ISSUE #11456]Add RpcClusterClientTlsConfig.java.

* [ISSUE #11456]Add cluster rpc tls config.

* [ISSUE #11456]Add RpcClusterClientTlsConfig UT.

* [ISSUE #11456]Add cluster server tls.

* [ISSUE #11456]Remove supportCommunicationTypes.

* [ISSUE #11456]Fix unit testing and indentation handling

* [ISSUE #11456]Indentation handling

* [ISSUE #11456]Fix unit test and rpc constants.

* [ISSUE #11456]Fix unit test.

* [ISSUE #11456]Optimize code.

* [ISSUE #11456]Fix check style.

* [ISSUE #11456]Add unit test.

* [ISSUE #11456]Fix check style.

* [ISSUE #11456]Update unit test.

* [ISSUE #11456]Fix unit test.

* [ISSUE #11456]Add License.

* [ISSUE #11456]Fix unit test.

* [ISSUE #11456]Fix unit test.

* [ISSUE #11456]Rename class.

* [ISSUE #11456]Optimize code.

* [ISSUE #11456]Handling indentation issues.

* [ISSUE #11456]Handling indentation issues.

* [ISSUE #11456]Handling indentation issues.

* [ISSUE #11456]Optimize code.

* [ISSUE #11456]Fix unit test.

* [ISSUE #11456]Fix unit testing and compatibility handling.

* [ISSUE #11456]Support TLS GRPC communication between clusters.

* [ISSUE #11456] Fix bugs.

* [ISSUE #11456]Fix bugs.

* [ISSUE #11456]Adjusting parameter names (compatibility considerations).

* [ISSUE #11456]Resolve conflict.

* [ISSUE #11456]Remove ProtocolNegotiatorBuilderManager and abstract ProtocolNegotiatorBuilderSingleton.

* [ISSUE #11456]Remove CommunicationType.java.

* [ISSUE #11456]Optimize code.

* [ISSUE #11456]Revert author.

* Splitting RpcTlsConfigFactory.

* Split RpcConstants.

* Divided RpcTlsConfigFactory, adjusted cluster parameters to "nacos.remote.peer.rpc.tls".

* check style.

* check style.

* unit test.
2024-05-15 11:13:29 +08:00
hth
70ad2eb991
[ISSUE #11957] Remove default password (#11991)
* Remove default password

* admin role check fix

* remove tmp admin
2024-04-29 10:04:00 +08:00
blake.qiu
8f2150892a
build(11606): Make sql-schema consistent. (#11703) 2024-01-31 09:32:19 +08:00
喻世文
6587029851
[ISSUE #11544] Supplementary single test, when the prefix of dataId is cipher. (#11546)
* [ISSUE #11544] Supplementary single test, when the prefix of dataId is cipher.

* [ISSUE #11544] Supplementary single test, when the prefix of dataId is cipher. Adjusting code format.

* [ISSUE #11544] Supplementary single test, when the prefix of dataId is cipher. Change static code block to @Before annotation.

* [ISSUE #11544] Supplementary single test, when the prefix of dataId is cipher. run ci.
2023-12-27 11:08:23 +08:00
nov.lzf
ca9d55e264
fix config test case and remove useless code (#11521)
* 修复客户端cmsgc导致服务端推送积压直接内存oom问题

* 修复ut及bug

* 修复ut及bug,checkstyle

* 修复ut及bug

* 修复ut

* 修复覆盖率

* 修复测试用例

* 修复测试用例,覆盖率

* 修复测试用例,覆盖率,删除无用代码

* 修复测试用例,覆盖率,pmd&checkstyle

* fix test case
2023-12-18 13:42:28 +08:00
chenyiqin
a5c0a60a1a
Fix npe when setup ack response in GrpcClient (#11210)
* fix npe when setup ack response in GrpcClient

* server sync response, avoid blocking setup ack response sent to server.

* remove setup response from client to server, change way of server pushing abilities by sendNoACK

* add UT for negotiation timeout

* fix checkstyle

* fix PMD error

* private check logical into ReceiveAbilityContext.

* fix indent
2023-10-13 09:48:06 +08:00
KomachiSion
4522cbcccb For checkstyle. 2023-09-28 10:49:10 +08:00
Daydreamer-ia
cb70aaf3c7 refactor AbilityControlManager with multiple ability mode. 2023-09-25 19:24:44 +08:00
Daydreamer-ia
c565a2bdd5 extern abilities spi processor, refactor AbilityKey. 2023-09-25 14:17:18 +08:00
Daydreamer-ia
fc8549dc8f Merge remote-tracking branch 'origin/develop' into asoc2022_issue#8458
# Conflicts:
#	client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/NamingGrpcRedoServiceTest.java
#	common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClient.java
2023-09-24 15:18:17 +08:00
Dale Lee
263e223d94
[ISSUE #10374] Add default selectors (#11142)
* Add default selectors

* add tests

* Update SubscribeSelector_ITCase

* add unsubscribe test

* Removes some methods for NamingSelectorFactor

* Update SelectorManager
2023-09-22 13:55:46 +08:00
Sunrisea
8adca685f6
[ISSUE #10734] Refactor the ParamChecker and ParamExtractor (#10775)
* For #10734,refactor the paramextractor and ParamChecker

* For #10734,alter the rules of ParamCheck

* For #10734,alter the rules of ParamCheck

* For #10734,fix bug

* For #10734,fix bug and alter the ParamCheckRules.java

* For #10734,fix code style

* For #10734,fix the param check rules

* For #10734,implement the server param check config

* For #10734,optimize the logic

* For #10734,optimize the logic

* For #10734,optimize the logic
2023-07-19 16:34:03 +08:00
杨翊 SionYang
9069730a04
Refactor grpc tls (#10759)
* Move Tls negotiator to GrpcSdkServer.

* use protocol negotiator builder replace directly create.

* use SPI load negotiator and set tls as default negotiator.

* Remove tlsconfig in BaseRpcServer.

* Add some ut.

* For checkstyle.
2023-07-11 19:10:00 +08:00
Sunrisea
c7a20bd132
[ISSUE #10734] Implement http request param check filter and http param extractors (#10758)
* For #10734,Implement grpc server interceptor and grpc param extractors

* For #10734,add unit test for grpc server interceptor and grpc param extractors

* For #10734,alter the test case

* For #10734,delete the ConnectionSetupRequestParamExtractor

* For #10734,add the naming http request param check filter and implement the naming http request param extractors

* For #10734,add unit test for naming http request param extractors

* For #10734,Implement grpc server interceptor and grpc param extractors

* For #10734,add unit test for grpc server interceptor and grpc param extractors

* For #10734,delete the ConnectionSetupRequestParamExtractor

* For #10734,add the naming http request param check filter and implement the naming http request param extractors

* For #10734,add unit test for naming http request param extractors

* For #10734,add the config http request param check filter and implement the config http request param extractors and unit test

* For #10734,add the console http request param check filter and implement the console http request param extractors and unit test

* For #10734,fix code style

* For #10734,alter the logic of exception handle in filter

* For #10734,fix code style
2023-07-11 17:52:54 +08:00
Sunrisea
cae21e2dcd
[ISSUE #10734] Implement grpc server interceptor and grpc param extractors (#10745)
* For #10734,Implement grpc server interceptor and grpc param extractors

* For #10734,add unit test for grpc server interceptor and grpc param extractors

* For #10734,alter the test case

* For #10734,delete the ConnectionSetupRequestParamExtractor
2023-07-10 14:43:51 +08:00
Daydreamer-ia
fc3bb2f42c Merge branch 'develop' into asoc#8458.t
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	common/src/main/java/com/alibaba/nacos/common/remote/client/ConnectionEventListener.java
#	common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java
#	common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClient.java
#	common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java
#	core/src/main/java/com/alibaba/nacos/core/cluster/ServerMemberManager.java
#	core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcBiStreamRequestAcceptor.java
#	core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcRequestAcceptor.java
2023-06-22 15:33:05 +08:00
KomachiSion
0555619b05 Merge remote-tracking branch 'upstream/develop' into develop#10361
# Conflicts:
#	config/src/main/java/com/alibaba/nacos/config/server/constant/Constants.java
2023-05-09 15:50:12 +08:00
nov.lzf
dbe3730d69
fix sslconf out of date (#10451)
* 更新证书文件

* fix test case

* update ssl conf
2023-05-09 10:09:21 +08:00
KomachiSion
841ce677d1 Move DerbySnapshotOperation and DistributedDatabaseOperateImpl to core module. 2023-05-08 19:29:14 +08:00
杨翊 SionYang
b8e3f688fb
Fix CI problem. (#10442)
* Fix CI problem.

* Fix CI problem.

* Fix CI problem.

* Fix CI problem.
2023-05-08 16:12:07 +08:00
KomachiSion
218fe4e732 Move some events and exception to persistence module 2023-04-25 11:29:11 +08:00
KomachiSion
326b82fb06 Move Embedded operate to persistence module. 2023-04-23 18:02:27 +08:00
KomachiSion
8dfd31a87d Move QueryType to persistence module. 2023-04-23 17:54:21 +08:00
KomachiSion
6acabeca67 Move some methods from EmbeddedStorageContextUtils to EmbeddedStorageContextHolder 2023-04-23 17:37:14 +08:00
KomachiSion
f83061f47d Move some datasource and relative classes into persistence module. 2023-04-23 16:00:42 +08:00
githubcheng2978
214e0c9077
nacos grpc connection supports TLS Encryption (#9980)
support tls encryption on grpc transport on client and server side

---------

Co-authored-by: githubcheng2978 <yeliang.cheng@freemud.com>
2023-03-15 09:41:25 +08:00
WangLiang/王良
a397c10a54
Optimize the nacos-client/pom.xml for exclude google/**/*.proto (#9982)
* Optimize the pom.xml of the nacos-client

* optimize pom

* exclude `google/**/*.proto`

* tab

* Remove dependency `io.grpc:protoc-gen-grpc-java:${version}:pom`

* revert indent

* revert native-image
2023-03-01 09:42:15 +08:00
Karson
c8b04b03fa
[ISSUE #9783] 处理namespaceId=public 时 v2接口 无法创建与删除配置 (#9809)
* fix issue #9783

* fix issue #9783

* add it test for v2 config.

* fix ci problem.

* fix ci problem.

* fix ci problem.

* fix history process NamespaceParameter

* fix ci problem.

* add some unit test

* reformat code
2023-01-16 10:01:54 +08:00
gongzhongqiang
708387c277
fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
zz630
20145fd256
enhancement: CloseableHttpAsyncClient does not clean up expired and i… (#9727)
* enhancement: CloseableHttpAsyncClient does not clean up expired and invalid connections (#9708)

* enhancement: CloseableHttpAsyncClient does not clean up expired and invalid connections (#9708)

* style:satisfy style/NacosCheckStyle.xml

* add unit test(#9708)

* Revert "add unit test(#9708)"

This reverts commit 939905cb56f30af4d0ec35543d6d630f0777eb98.

* add unit test
2023-01-05 10:04:27 +08:00
nov.lzf
acc8ab46cf
Refactor connection limit module to plugin (#9653)
* 限流插件提交

* 限流插件提交

* 限流插件提交

* 限流插件重构提交

* connection control test case submit

* tps control test case submit

* tps control test case submit

* tps control test case submit

* exact model has higher priority

* exact model has higher priority

* tpsreporter

* tpsreporter

* tpsreporter

* check style

* log optimize

* interceptor

* checkstyle

* tps check

* configController query http

* rename component

* 优化参数命名

* 优化参数命名

* 优化参数命名

* 优化参数命名

* optimize connection manager

* optimize connection manager

* optimize connection manager

* optimize connection manager

* interceptor to mse

* Monitor Model

* Monitor Model

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* opensource submit

* opensource submit

* check style

* check style

* pmd ,rat

* update db params

* test case fix

* 简化开源反脆弱实现

* test case

* test  case fix

* 修复单测

* 修复单测

* 修复单测
2022-12-06 16:15:51 +08:00
Weizhan Yun
c3c7e1ba1c
[ISSUE #9367] fix auth plugin's property 'token.secret.key' base64 decode error. (#9380)
* 1. 修复密钥编码问题--为了避免歧义,密钥必须为base64编码的字符串;不再支持原始明文密钥。
2. JwtParser是线程安全的,重构为成员变量。

* 配置项保持明文字符串
2022-11-03 13:40:26 +08:00
杨翊 SionYang
0293af3329
Remove upd and beat codes in nacos-client. (#9394) 2022-10-25 17:22:47 +08:00
KomachiSion
696d489423 Merge remote-tracking branch 'upstream/2.2.0' into 2.2.0-summer#8312
# Conflicts:
#	plugin/pom.xml
2022-10-24 15:37:47 +08:00
Karson
1076d5cf61
[ISSUE #9366] Support Ldaps authentication (#9371)
* support ldaps auth

* add ldaps IT test.

* add ldaps IT test.

* add ldaps IT test.

* add ldaps IT test.
2022-10-24 09:34:47 +08:00
杨翊 SionYang
7a23c56822
[ISSUE#7930] 2.2.0 remove some deprecated codes (#9368)
* Remove double write switch and upgrade from 1.X switch.

* Remove IFilterConfig.java

* Remove some deprecated constants and methods

* Remove some deprecated classes in nacos-core

* Remove some deprecated config

* Remove some deprecated codes in naming module

* Remove some deprecated codes in sys module

* Fix unit test

* Try to make UdpConnectorTest pass more easier.
2022-10-21 17:44:26 +08:00
Karson
864b1f1852
add ldap auth it test case. (#9354) 2022-10-21 09:46:45 +08:00
杨翊 SionYang
b1ac88be78
[ISSUE#8481] Add Trace Event SPI for Naming. (#9336)
* Add Trace plugin spi.

* Add NacosCombinedTraceSubscriber

* Subscribe NamingTraceEvent when start up cluster.

* Fix test error.
2022-10-18 09:30:37 +08:00
Daydreamer-ia
a159e1261c Add integration test. 2022-09-20 20:36:34 +08:00
Daydreamer-ia
41d278d6f1 Add junit test 2022-09-01 20:31:48 +08:00
Daydreamer-ia
118cde52e7 Separate client capability and server capability: ClientAbilities and ServerAbilities. 2022-09-01 19:33:08 +08:00
Daydreamer-ia
a47f052c90 Remove the AbilityHandlePreProcessor and AbilityStatus. Change the way to get or remove AbilityTable for RpcClient. 2022-08-30 21:36:24 +08:00
KomachiSion
9df2536a1e Remove DoubleWriteEventListener.java and DistroConsistencyServiceImpl.java 2022-08-29 20:18:48 +08:00
Daydreamer-ia
613335e763 Add the junit test for AbilityControlManager. 2022-08-28 17:42:45 +08:00