Commit Graph

47 Commits

Author SHA1 Message Date
杨翊 SionYang c3b79cf15a
V3.0 develop auth plugin (#13215)
* Change auth plugin return boolean to AuthResult.

* set AuthContext result as AuthResult.

* Refactor to remove using AuthConfigs, replaced with NacosAuthConfig.

* Refactor to remove using AuthConfigs, replaced with NacosAuthConfig.

* Move AuthConfigs to default auth plugin impl module.
2025-03-31 16:10:01 +08:00
杨翊 SionYang 971212dd3e
Client judge whether server support target ability before actual do request for fuzzy watch and distributed lock. (#13155)
* Support judge Server whether support fuzzyWatch.

* Add Fuzzy Watch ability to connection abilities table.

* Support judge Server whether support lock.

* For PMD.

* Fix lock service init NPE and add shutdown method.
2025-03-05 17:02:19 +08:00
杨翊 SionYang cdddd10494
[ISSUE#12979] Redefine some configuration model to support admin API and maintainer client. (#13100)
* Remove maintainer Capacity.java

* Redefine some configuration model to support admin API and maintainer client.

* Redefine some configuration model to support admin API and maintainer client.

* Move Page.java to nacos-api module.

* Redefine some configuration model to support admin API and maintainer client.
2025-02-12 13:52:12 +08:00
杨翊 SionYang 8eea0d380a
[ISSUE#12979] Move core module relatived VO to api module. (#13095)
* Abstract core module maintainer api to AbstractCoreMaintainerService

* Move server load metrics and id generator to api module.

* Abstract nacos member basic info to NacosMember and move to api module.

* Move connection info to api module and replace maintain client usage.
2025-02-10 15:19:07 +08:00
KomachiSion 87382160df Merge branch 'refs/heads/v3.0-develop' into summer-ospp#12028-sync-develop
# Conflicts:
#	auth/src/test/java/com/alibaba/nacos/auth/config/AuthConfigsTest.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPublishRequestHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/ConfigOperationService.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/DumpChangeConfigWorker.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/DumpConfigHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/DumpService.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/processor/DumpAllProcessor.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/merge/MergeDatumService.java
#	config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java
#	console/pom.xml
#	console/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java
#	core/src/main/java/com/alibaba/nacos/core/auth/AuthFilter.java
#	core/src/main/java/com/alibaba/nacos/core/cluster/ServerMemberManager.java
#	core/src/main/java/com/alibaba/nacos/core/listener/StartingApplicationListener.java
#	core/src/main/resources/META-INF/logback/nacos.xml
#	core/src/test/java/com/alibaba/nacos/core/auth/AuthFilterTest.java
#	core/src/test/java/com/alibaba/nacos/core/cluster/ServerMemberManagerTest.java
#	distribution/conf/nacos-logback.xml
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthManager.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/authenticate/AuthenticationManagerDelegator.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/filter/JwtAuthenticationTokenFilter.java
#	pom.xml
#	prometheus/src/main/java/com/alibaba/nacos/prometheus/conf/PrometheusSecurityConfiguration.java
2025-01-08 11:19:35 +08:00
Moritz Arena b16b90048a
Upgrade to SpringBoot 3 and support GraalVM packaging (#13020)
Upgrade to SpringBoot 3, JDK 17 and support GraalVM
2025-01-08 09:49:56 +08:00
杨翊 SionYang 1609df97df
[Nacos 3.0] Nacos support console and server start with different web container and port. (#12959)
* Support console and server api with depend port.

* enhance banners and support only start server mode.
2024-12-17 15:33:47 +08:00
阿魁 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
阿魁 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
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
杨翊 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
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
杨翊 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 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
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 939905cb56.

* 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
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
Karson 864b1f1852
add ldap auth it test case. (#9354) 2022-10-21 09:46:45 +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
Daydreamer-ia 613335e763 Add the junit test for AbilityControlManager. 2022-08-28 17:42:45 +08:00
onewe b6db08bdd4
[ISSUE #8528] update server.tomcat.basedir default value (#8529)
Close #8528
2022-06-07 15:22:16 +08:00
KomachiSion 1e2f938f7b Move auth persistence to nacos-plugin-default-impl module. 2022-01-25 16:01:44 +08:00
KomachiSion 6a4ecc1323 Move default auth impl from console to nacos-plugin-default-impl module. 2022-01-24 17:47:54 +08:00
KomachiSion 135ab364fe Move client spi to nacos-auth-plugin module 2022-01-21 15:40:02 +08:00
KomachiSion 89cc6caade Add plugin and auth-plugin module, and move class into module. 2022-01-21 15:06:09 +08:00
KomachiSion dc1c05d2dc Repackage some auth classes. 2022-01-17 16:32:23 +08:00
KomachiSion 956df153d6 Add resource parser 2022-01-14 16:52:21 +08:00
孙继峰 91706cf137
[ISSUE #6978] move unit test case that exist in integration test class (#7042)
* delete unit test case that already exist in HttpUtilsTest

* move unit test case to QueryTest

* move unit test case to ResponseHandlerTest

* delete empty test class
2021-10-11 09:50:31 +08:00
ZZQ的 e719432cfe
[ISSUE #6303] replace commons-lang3 (#6315) 2021-07-12 09:27:46 +08:00
KomachiSion 92da848375 Merge remote-tracking branch 'upstream/develop' into merge-1.X-to-2.0
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/CacheData.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	client/src/main/java/com/alibaba/nacos/client/naming/core/PushReceiver.java
#	console/src/main/resources/static/css/main.css
#	console/src/main/resources/static/js/main.js
#	naming/src/main/java/com/alibaba/nacos/naming/core/SubscribeManager.java
#	naming/src/test/java/com/alibaba/nacos/naming/core/SubscribeManagerTest.java
#	test/src/test/java/com/alibaba/nacos/test/BaseTest.java
2021-04-27 15:57:24 +08:00
杨翊 SionYang 6c064bfe41
For #5171, Fix all IT case (#5464) 2021-04-23 18:36:02 +08:00