Commit Graph

911 Commits

Author SHA1 Message Date
杨翊 SionYang
1968b3fc98
Develop revert#9851 #9967 (#10069)
* Revert "[ISSUE #9821] Update ConfigInfoBetaMapper data-source-plugin input and output parameters (#9967)"

This reverts commit d16023c1

* Revert "[ISSUE #9821] Update data-source-plugin input and output parameters (#9851)"

This reverts commit 1ff7a3f6
2023-03-10 10:25:25 +08:00
云野
02a5e38981
fix #10044 -- only update existed config. (#10045) 2023-03-09 15:20:36 +08:00
chenyiqin
920fd4c211
Remove http data change (#10043)
* Remove http way to report data change

* Remove http controller method to receive data change
2023-03-06 10:20:25 +08:00
Karson
e58c4441f4
[ISSUE #9943] Resolve issue Config cas update not work (#9952)
* fix issue 9943

* add some description

* add some log for roll back transaction

* add some log for roll back transaction

* set default rollBackOnUpdateFail false.

* format style

* fix some bug
2023-03-03 11:14:08 +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
zhanghong
a6332b250d
[ISSUE #9276] 新增根据配置信息检索内容的功能 (#9925)
* 新增根据配置信息检索内容的功能

* use offer replace add

* use offer replace add

* use offer replace add

* update exception type and  limit some config as configurable

* update

* update params

* update params

* update params
2023-02-21 10:25:19 +08:00
The-Gamer-01
d16023c156
[ISSUE #9821] Update ConfigInfoBetaMapper data-source-plugin input and output parameters (#9967)
* Add MapperContext and MapperResult.

* Update ConfigInfoAggrMapper by MapperContext and MapperResult.

Update ConfigInfoAggrMapper by MapperContext and MapperResult.

* resolve git conflicts.

* Added Map mapping refinement corresponding to UPDATE and WHERE.

* [ISSUE #9821] Fix API of return class of ConfigInfoAggrMapper.

* [ISSUE #9821] Update ConfigInfoBetaMapper data-source-plugin input and output parameters
2023-02-20 10:04:10 +08:00
The-Gamer-01
1ff7a3f6bd
[ISSUE #9821] Update data-source-plugin input and output parameters (#9851)
* Add MapperContext and MapperResult.

* Update ConfigInfoAggrMapper by MapperContext and MapperResult.

Update ConfigInfoAggrMapper by MapperContext and MapperResult.

* resolve git conflicts.
2023-02-10 09:45:14 +08:00
云野
98d3da4a48
fix typo 'curcuit';remove unused variable. (#9901) 2023-02-07 10:24:14 +08:00
liu-xg
65da789215
fix(修复配置历史分页异常): 配置历史分页异常,所有页都是全部记录 (#9828)
* fix(修复配置历史分页异常): 配置历史分页异常,所有页都是全部记录

* fix(修复配置历史分页异常): 修复代码格式不满足nacos要求

* fix(修复配置历史分页异常): 修复代码格式不满足nacos要求
2023-02-03 15:41:13 +08:00
李云飞
d45ba449ca
[ISSUE #8460]add config change plugin (#9820) 2023-01-16 10:04:24 +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
Korov
d51ad454a4
remove unused local variables (#9781) 2023-01-03 12:09:04 +08:00
wenxuan70
60528cd21b
fix: replace the concatenated string with a placeholder in the batchRemoveAggr method (#9646) (#9659) 2023-01-03 12:05:31 +08:00
zhuyou1234
ef212ccad1
代码优化 (#9752)
调整timeout位置
2023-01-03 11:57:36 +08:00
nov.lzf
69047073c6
修改长连接request response 类注册逻辑,由类扫描改成手动注册 (#9738)
* 修改request response 类加载逻辑,有类扫描改成手动注册

* 优化注册方式,直接SPI注册payload
2022-12-21 19:56:21 +08:00
npk191954
99ea570e7a
1.Update 更新Config模块测试用例。 (#9687)
* 1.Update 更新config模块的测试用例。

* 1.Update 更新config模块的测试用例。

* 1.Update 更新config模块的测试用例。

* 1.Update 更新config模块的测试用例。
2022-12-13 13:54:10 +08:00
杨翊 SionYang
dfcdd391af
Add auth for some v2 api. (#9671) 2022-12-08 10:31:32 +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
zhanghong
2d317227b3
[ISSUE #9655] fix ExceptionHandler order bug (#9657)
* fix #9655 ExceptionHandler order bug

* Change GlobalExceptionHandler order
2022-12-03 19:24:39 +08:00
zhanghong
014eb69b46
[ISSUE #9648] 修复关于tagList传入参数有误 (#9650)
* #9648 fix this bug

* fix some Deprecated-Method bug
2022-12-02 17:40:08 +08:00
zume0127
62b03ff915
[ISSUE #9631] return value of putIfAbsent ignored, value passed to putIfAbsent reused (#9633)
Signed-off-by: zume0127 <790589151@qq.com>

Signed-off-by: zume0127 <790589151@qq.com>
2022-11-28 09:28:00 +08:00
ZhongJinHacker
93c6fe0167
fix SonarLint check (#9608)
1. slf4j.Logger 在确定满足日志等级情况下会去调用ex的toString,这里直接toString,会造成即使没满足日志等级的情况下也会执行toString
2. 删除注释代码
3. 解除sonar访问成员权限警告,外部类可以访问到内部类的私有成员,编译执行没有问题,和其他内部类成员访问权限保持一致(其他内部类成员也是采用相同的方式被外部类访问,例如isBeta)
2022-11-22 15:27:01 +08:00
李晓双 Li Xiao Shuang
ba37d63ad4
[ISSUE #9571] Replace PersistService (#9583)
* replace PersistService

* replace PersistService

* fix test
2022-11-18 11:08:18 +08:00
李晓双 Li Xiao Shuang
fcf633a52d
[ISSUE #9571] Split the PersistService class because it's too big (#9572)
* Split the PersistService class

* add ConfigInfoAggrPersistService implements

* add ConfigInfoBetaPersistService implements

* add ConfigInfoPersistService implements

* add ConfigInfoTagPersistService implements

* add HistoryConfigInfoPersistService implements

* add OtherPersistService implements

* check style

* Specify the class name to inject service

* Specify the class name to inject service

* Initialize the property using the constructor

* rename OutherPersistService to CommonPersistService
2022-11-14 16:31:22 +08:00
The-Gamer-01
b14cc257bf
[ISSUE #9510]Add sql log print function. (#9511)
* [ISSUE #9510]Add sql log print function.

* [ISSUE #9510]Remove AspectJ and add sql proxy.

* [ISSUE #9510]Update data source plugin log.

* [ISSUE #9510]Update args log.

* [ISSUE #9510]Add unit test.
2022-11-11 11:28:22 +08:00
无处不在
ec7ba18792
[impr]Update some method from RETURN_GENERATED_KEYS replace to String[]{"id"},Avoid database compatibility issues (#9515) 2022-11-10 09:42:38 +08:00
李晓双 Li Xiao Shuang
3f1b96b15a
[ISSUE #9516] Clean up PersistService invalid code logic (#9517)
* Clean up PersistService invalid code logic

* Clean up PersistService invalid code logic

* Clean up PersistService invalid code logic
2022-11-10 09:42:35 +08:00
李晓双 Li Xiao Shuang
00dea25de0
[ISSUE #9506] Sql extraction of group_capacity table (#9507)
* sql extraction of group_capacity table

* sql extraction of group_capacity table

* sql extraction of group_capacity table

* sql extraction of group_capacity table
2022-11-09 09:24:23 +08:00
李晓双 Li Xiao Shuang
0348014c17
[ISSUE #9490] Optimize datasource name configuration reading (#9491)
* Optimize data source name configuration reading

* Optimize data source name configuration reading

* Compatible with old and new datasource platform read

* Compatible with old and new datasource platform read

* Compatible with old and new datasource platform read

* Compatible with old and new datasource platform read

* fix unit test

* fix unit test
2022-11-08 09:22:33 +08:00
无处不在
21683957e5
[ISSUE #9415]update setExternalStorage logic,support more db check,add 8 count unit test (#9470)
* [impr]update setExternalStorage method logic,support more db check,add 8 count unit test method

* update comment desc
2022-11-07 17:17:52 +08:00
The-Gamer-01
3750f73bd4
[ISSUE #9486]Optimizing paging parameters. (#9488) 2022-11-06 17:25:04 +08:00
李晓双 Li Xiao Shuang
6849af1547
Optimizing paging parameters (#9487) 2022-11-06 16:59:27 +08:00
李晓双 Li Xiao Shuang
40519a22d5
[ISSUE #9475] Abstract common count method (#9481)
* Abstract common count method

* Abstract common count method

* Abstract common count method

* Abstract common count method

* Abstract common count method

* Abstract common count method
2022-11-06 15:53:05 +08:00
The-Gamer-01
ff2497d999
[ISSUE #9449]Add Tenant Capacity mapper. (#9456) 2022-11-05 00:44:21 +08:00
李晓双 Li Xiao Shuang
d5fb300dd2
[ISSUE #9475] Abstract common count method (#9476)
* Abstract common count method

* Abstract common count method

* Abstract common count method

* Abstract common count method
2022-11-04 22:52:30 +08:00
李晓双 Li Xiao Shuang
9ea8333373
[ISSUE #9466] Modify the findMapper method of MapperManager to be a generic method (#9467)
* Modify the findMapper method of MapperManager to be a generic method

* Modify the findMapper method of MapperManager to be a generic method
2022-11-04 16:52:27 +08:00
The-Gamer-01
0aeb2bd2cc
[ISSUE #9449]Add Tenant Information mapper. (#9454) 2022-11-03 13:58:21 +08:00
无处不在
98f7066519
[ISSUE #9423] ExternalDataSourceProperties add isEmpty check to support external config (#9439)
* [conf]Update group_id length from 255 to 128

* [impr]修改外部数据源加载驱动名称判断逻辑,外部配置为空时,才设置为默认mysql配置

* [impr]修改外部数据源加载驱动名称判断逻辑,外部配置为空时,才设置为默认mysql配置

* [impr]修改变量名称,确保CI可以通过
2022-11-02 14:14:29 +08:00
无处不在
4a305f6584
[conf]Update group_id length from 255 to 128 (#9412) 2022-10-28 10:51:45 +08:00
KomachiSion
68d7f042d1 Fix update config info cas error. 2022-10-27 14:08:11 +08:00
The-Gamer-01
af897bc656
[ISSUE #8312]Fix Persist Service Implementation。 (#9395) 2022-10-25 22:24:37 +08:00
KomachiSion
8410fbccf3 Merge remote-tracking branch 'upstream/2.2.0' into asoc2022_issue#8461
# Conflicts:
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java
2022-10-25 14:52:32 +08:00
KomachiSion
7c36c36201 Fix checkstyle. 2022-10-25 14:31:15 +08:00
李晓双 Li Xiao Shuang
284acbfd02
[ISSUE #8312] Fixed some problems with configuration sql (#9388)
* fix sql

* fix history sql

* fix clone sql

* fix beta sql
2022-10-25 13:02:13 +08:00
Liu Yixiao
03345fd923
[ISSUE #8461] Enhance Nacos monitor observability system (#9038)
* Enhance MetricsMonitor with several new metrics

* Add config read and write rt

* Add ServiceEvent publisher queue size

* Add fuzzy search count

* Add naming subscriber and publisher count with v1 or v2 version tag

* Add config subscriber count with v1 or v2 version tag

* Add pending push task count and empty push count metrics

* collect pending push task count by scheduled task

* add unit test for increment metrics in NacosMonitorPushResultHook

* Add topn counter container and topn config change

* Create private MeterRegistry for config change

* Add scheduled clear for config change count, add removeAll for TopnCounterMetricsContainer

* Add topn service change

* Reconstruct metrics monitor with NacosMeterRegistryCenter.

* divide globalRegistry to different modules' CompositeMeterRegistry

* Add dynamic meters refresh service for config and naming module

* fix unit test

* Add try catch when init NacosMeterRegistryCenter
2022-10-25 11:31:29 +08:00
李晓双 Li Xiao Shuang
97ca821cee
fix sql (#9386) 2022-10-25 00:58:34 +08:00
The-Gamer-01
7a4897830b
[ISSUE #8312]Merge sql. (#9385)
* [ISSUE #8312]Merge sql.

* [ISSUE #8312]Fix bugs.
2022-10-24 23:07:05 +08:00
KomachiSion
3863ede017 Change datasource plugin version as revision. 2022-10-24 16:09:50 +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
The-Gamer-01
398959d931 [ISSUE #8312]Finish the datasource plugin. (#9226)
* [ISSUE #8312]Finish the datasource plugin.

* [ISSUE #8312]Update derby PersistService impl.
2022-10-24 15:34:40 +08:00
KomachiSion
aa6816b69f Merge remote-tracking branch 'upstream/2.2.0' into summer2022_issue#8308
# Conflicts:
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/InstanceControllerV2.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/ServiceControllerV2.java
#	naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java
2022-10-21 14:16:18 +08:00
无处不在
2051855117
Update Generate serialVersionUID Value to idea random (#9304)
* update Generate serialVersionUID Value to idea random

* update Generate serialVersionUID Value to idea random
2022-10-12 14:12:11 +08:00
无处不在
83e3e50b71
[impr]update Generate serialVersionUID Value to idea random (#9297) 2022-10-11 14:07:35 +08:00
Roger3581321
5647101f7d
Generate the serialVersionUID by IDEA (#9291) 2022-10-11 09:23:36 +08:00
The-Gamer-01
4c8130ce4e
[ISSUE #6112]Unified derby-data variables (#9260) 2022-10-10 09:47:10 +08:00
DongYafei
94d812a269
fix api result (#9237) 2022-09-29 10:39:23 +08:00
杨翊 SionYang
2d84c0aea7
For #8611, Close old datasource connection. (#9212) 2022-09-26 15:51:08 +08:00
DongYafei
0032b8cfc1
Add ClientInfoControllerV2 (#9197)
* add ClientInfoControllerV2

* rename tenant to namespaceId
2022-09-23 14:11:59 +08:00
jiaoja
e2468a4c8e
[ISSUE #9172] Solve wrong use of GroupKey2 in GroupKeyTest. (#9173)
* [ISSUE #9172] Solve wrong use of GroupKey2 in GroupKeyTest.

* [ISSUE #9172] Solve wrong use of GroupKey2 in GroupKeyTest.
2022-09-21 14:08:06 +08:00
jiaoja
a89a46e2ad
[ISSUE #9135] Remove redundant nullcheck code. (#9137)
* [ISSUE #9135] Remove redundant nullcheck code.

* [ISSUE #9135] Refactor method to not always return the same value.
2022-09-15 10:40:37 +08:00
无处不在
a09058169c
[fix]修复数据源连接DataSource中动态的ConnectionTimeout属性被覆盖问题 (#9115) 2022-09-09 16:50:36 +08:00
阿魁
a9af1bfe38
Fix spelling mistakes. (#9097)
* Fix spelling mistakes.

* Fix spelling mistakes.
2022-09-07 16:46:16 +08:00
DongYafei
02b7280b69
[fix] rename ConfigVo, ConfigRequestInfoVo and NamespaceVo to ConfigForm, ConfigRequestInfo and NamespaceForm respectively (#9077) 2022-09-05 17:38:32 +08:00
阿魁
6552aaed3f
Fix spelling mistakes. (#9088) 2022-09-05 17:33:42 +08:00
DongYafei
f9824c8acb
fix NacosApiException (#9059) 2022-09-01 10:06:43 +08:00
hutt
40651f650f
[ISSUE #9023] fix corner case config dataId 'cipher-' that cannot create (#9024)
* [ISSUE #9023] fix corner case config dataId 'cipher-' that cannot create

* [ISSUE #9023] remove unused import

* [ISSUE #9023] PMD fix

* [ISSUE #9023] add comments

* [ISSUE #9023] should return first token instead of any

* [ISSUE #9023] add more EncryptionHandler ut

* [ISSUE #9023] fix style

* [ISSUE #9023] fix style, keep indentation in blank line
2022-08-31 20:15:18 +08:00
yjqg6666
cb3c78b93b
[#344] rename initialization sql files (#8969) 2022-08-25 16:54:18 +08:00
DongYafei
0df376afd5
for issue#8308, add config and config history api v2.0 (#8953)
* Add ConfigV2Controller and HistoryV2Controller

* fix ConfigControllerV2 and HistoryControllerV2

* fix ConfigControllerV2Test and HistoryControllerV2Test

* add ConfigService and HistoryService

* fix HistoryControllerV2 and HistoryControllerV2Test

* rename ConfigService to ConfigOperationService
2022-08-22 09:37:40 +08:00
KomachiSion
882be9e726 Add comment for config aspect. 2022-07-28 17:58:33 +08:00
KomachiSion
e9dbe8361d Fix checkstyle 2022-07-19 13:12:13 +08:00
李云飞
014161aba1
[fix] Solve the problem that request log section publishConfig and invalid because the section parameter is inconsistent with the Controller parameter (#8721) 2022-07-19 10:53:20 +08:00
ZhangShenao
113b365a65
Fix word spelling (#8714)
* Fix Word Spelling 'Naocs' in Comment

* Fix Word Spelling in Comment and Log of `ServiceInfo`

* Fix Word Spelling `listener`
2022-07-11 09:55:09 +08:00
The-Gamer-01
ccce9da5a6
Test unit tests (#8638) 2022-06-28 13:45:46 +08:00
wangshengji
6ed9d77247
remove @Component annotation and constructor privatization (#8628) 2022-06-28 11:22:18 +08:00
Oliver
cc4cf1b428
[ISSUE #8532]Remove component annotation (#8627)
* Remove component annotation

* checkstyle
2022-06-26 11:05:45 +08:00
chenhao26
7a3757c751
Extract Constant in LimitType (#8587) 2022-06-20 10:21:05 +08:00
david6969xin
20af725205
use StandardCharsets.UTF_8 instead of Charsets.UTF_8 (#8581)
* use StandardCharsets.UTF_8 instead of Charsets.UTF_8

* remove unused import
2022-06-17 11:00:40 +08:00
drgnchan
10e0490359
fix typo (#8566) 2022-06-13 23:28:59 +08:00
david6969xin
9e53f7c6ee
[ISSUE#8485] (module-config) replace the type specification in this constructor call with the diamond operator ("<>") (#8555) 2022-06-13 10:32:46 +08:00
Cherish 蔡梦缘
703925a84f
feat(#8472): [Dependency Governance] Remove useless dependencies. (#8472) (#8473) 2022-06-13 10:31:11 +08:00
chenhao26
0eb530ef99
optimizing metricsmonitor code structure (#8468) 2022-05-27 21:59:09 +08:00
david6969xin
f8d307521c
[ISSUE#8358] make this anonymous inner class a lambda (config module) (#8388) 2022-05-18 10:23:51 +08:00
李晓双 Li Xiao Shuang
2bef9b6020
显式类型可替换为 <> (#8378) 2022-05-16 10:12:44 +08:00
onewe
6de92e40c5
Fix some failing unit tests in nacos config module (#8379)
* [ISSUE #8348] fix mockito's mockStatic method error

* [ISSUE #8348] fix all the unit test's error

Close #8348
2022-05-16 10:12:04 +08:00
onewe
eff327d623
[ISSUE #8318] fix findAllConfigInfoForDumpAll sql args error (#8319)
* [ISSUE #8318] fix findAllConfigInfoForDumpAll sql args error

Close #8318

* [ISSUE #8318] remove the unnecessary arg

Close #8318
2022-05-13 09:53:52 +08:00
onewe
234e6f2a11
[ISSUE #8295] fix can't login when use embedded storage in cluster model (#8304)
Close #8295
2022-05-09 13:09:38 +08:00
bangbang2333
341bc298a2
## @Desc: (#8063)
[ISSUE #8038] Fix config_tags_relation Table can Repeat Insert bug
## @Issue Link:
https://github.com/alibaba/nacos/issues/8038
2022-05-06 11:50:40 +08:00
Cherish 蔡
2233c2de1c
feat(#6506): Can change betaIps multiple times in beta(or gray). (#8234)
1. And fix SQL `encrypted_data_key=?WHERE`.
2022-05-06 11:46:12 +08:00
Roger3581321
fac7a1c6a1
Deleting redundant toString() method (#8291) 2022-05-05 22:04:21 +08:00
NailCui
92a0eb0988
[ISSUE#7780] Fix a-b-a problem (#7783) 2022-04-27 13:51:24 +08:00
chenhao26
028075138c
optimize method calls (#8219)
* add log Loggers.REMOTE_PUSH.warn format word and optimize method calls

* update log warn
2022-04-22 16:49:52 +08:00
Oliver
a9e2cbd4d8
Set interrupted flag to caller (#8116) 2022-04-20 10:49:00 +08:00
Oliver
c5bc9dc1e7
Polish method comment (#8111) 2022-04-11 10:19:15 +08:00
Oliver
d52db5c81d
[Optimize] Use StandardCharsets.UTF_8 replace Charset.forName("UTF-8") (#8115)
* Improve performance

* checkstyle

* checkstyle
2022-04-11 10:10:01 +08:00
chenhao26
b29a25533a
bug fix config history data error (#8104)
* bug fix config history data error

* update Objects.isNull replace Assert.hasText

* check code style
2022-04-09 19:57:59 +08:00
李晓双 Li Xiao Shuang
d074a98237
fix newline (#8064) 2022-04-01 12:03:38 +08:00
chenhao26
b2e81d8e37
delete redundant toString() method (#8049) 2022-03-31 16:27:05 +08:00
李晓双 Li Xiao Shuang
5a781dee4b
Merge pull request #7742 from onewe/optimize/config-2
[Optimize] Optimize some code of config controller
2022-03-31 08:26:53 +08:00
MajorHe1
5665cfe072
[ISSUE #7966] modify returned msg in Auth/Distro/Curcuit-Filter when internal server error (#7967)
* [ISSUE #7966] modify returned msg in Auth/Distro/Curcuit-Filter when internal server error

* [ISSUE #7966] add log output instead of return stacktrace
2022-03-28 10:22:55 +08:00
Oliver
5a8c088a2f
remove unused variety and define constant (#8010)
* remove unused variety and define constant

* fix spelling error
2022-03-28 10:18:56 +08:00
chenhao26
b4cc3fcddb
Optimize HTTP constants (#7998)
* Optimize HTTP constants

* check nacos style

* check nacos style2

* check nacos style3

* deleet Unused constants in UtilAndComs
2022-03-25 16:05:42 +08:00
myifeng
6aa867337e
[ISSUE #7941] FIX: Missing parameters 'dataId' and 'group'. (#7964)
* [ISSUE #7941] FIX: Missing parameters 'dataId' and 'group'.

* check tenant.
2022-03-24 09:50:44 +08:00
onewe
4a7d875eca remove duplicate import 2022-03-22 09:07:29 +08:00
onewe
9110dd8aa9
Merge branch 'develop' into optimize/config-2 2022-03-22 08:58:19 +08:00
李晓双 Li Xiao Shuang
f93813b38d
配置接口兼容解密 (#7949) 2022-03-21 15:17:35 +08:00
onewe
97deaae995
remove unused import 2022-03-19 13:36:14 +08:00
onewe
c69339fd0d
Merge branch 'develop' into optimize/config-2 2022-03-19 13:31:28 +08:00
chaos
37a1083e58 fix ConfigSubService memberManager null 2022-03-16 18:31:48 +08:00
李晓双 Li Xiao Shuang
88fb26cfc6
[ISSUE #5695] Add config encrypt spi for nacos server. (#7934)
* [ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0 (#6655)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* fix code quality (#6727)

* [ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0, EncryptedDataKey is persisted (#6740)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化

* [ISSUE#5695] Summer2021 Cache encryptedDataKey  (#6878)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化

* 秘钥缓存到内存中

* 解决冲突

* 修改filter继承AbstractConfigFilter (#6879)

* [ISSUE#5695] Summer2021   EncryptedDataKey is persisted to Derby (#6882)

* [ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0 (#6655)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* fix code quality (#6727)

* # This is a combination of 6 commits.tree cf7a399f99c4d81b8667c8de06f5ceb8c79fb6f0
parent 8024ecf31bf23a9edab416be8a3bfd1c0e48ce5e
author 李晓双 Li Xiao Shuang <644968328@qq.com> 1630028256 +0800
committer lixiaoshuang <644968328@qq.com> 1631804378 +0800

# This is a combination of 3 commits.
# This is the 1st commit message:

[ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0, EncryptedDataKey is persisted (#6740)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化
# This is the commit message #2:

[ISSUE#5695] Summer2021 Cache encryptedDataKey  (#6878)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化

* 秘钥缓存到内存中

* 解决冲突
# This is the commit message #3:

修改filter继承AbstractConfigFilter (#6879)


# This is the commit message #6:

客户端、服务端加解密实现

* parent 8024ecf31bf23a9edab416be8a3bfd1c0e48ce5e
author 李晓双 Li Xiao Shuang <644968328@qq.com> 1630028256 +0800
committer lixiaoshuang <644968328@qq.com> 1631805204 +0800

parent 8024ecf31bf23a9edab416be8a3bfd1c0e48ce5e
author 李晓双 Li Xiao Shuang <644968328@qq.com> 1630028256 +0800
committer lixiaoshuang <644968328@qq.com> 1631804378 +0800

[ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0, EncryptedDataKey is persisted (#6740)

* 配置加解密插件

* derby支持秘钥存储

* 克隆功能兼容配置加解密 (#6913)

* [ISSUE#5695] Summer2021 Import/export compatible with configuration encryption and decryption (#6956)

* 克隆功能兼容配置加解密

* 导入导出兼容配置加解密

* 秘钥base64编码、更换AES加密模式 (#6974)

* [ISSUE#5695] Summer2021 add unit test for ConfigCryptoFilter (#6991)

* add unit test for ConfigCryptoFilter

* add unit test for ConfigCryptoFilter

* [ISSUE#5695] Summer2021 add unit test for CryptoExecutor (#6990)

* add unit test for CryptoExecutor

* add Copyright

* [ISSUE#5695] Summer2021  add unit test for CryptoManager (#6989)

* add unit test for CryptoManager

* add unit test for CryptoManager

* [ISSUE#5695] Summer2021 add unit test for AesCrypto (#6988)

* add unit test for AesCrypto

* update AesCryptoTest

* Increased iv randomness

* add default Iv

* fix javadoc

* fix unit test

* defining plugin intergace

* Replace the client encryption and decryption actuator

* Replace the server encryption and decryption actuator

* add unit test

* add unit test

* remove old code

* fix NacosConfigServiceTest

* Encryption and decryption to achieve migration

Co-authored-by: 杨翊 SionYang <263976490@qq.com>
2022-03-16 10:54:11 +08:00
胡俊
2e07c6a0c1
Package scan (#7917)
* PayloadRegistry update use spi

* PayloadRegistry update use spi

* PayloadRegistry update use spi

* PayloadRegistry update use spi

* add test

* update comment

* remove code
rename code
2022-03-11 15:50:44 +08:00
chenhao26
9543b6b613
add junit test for RpcConfigChangeNotifier (#7884) 2022-03-04 16:22:19 +08:00
胡俊
f8e83e4a12
[ISSUE#5092]Config change batch listen request handler test (#7800)
* add ConfigChangeBatchListenRequestHandlerTest

* style

* style
2022-03-03 13:59:50 +08:00
MajorHe1
47f0c36235
[ISSUE #5092] add unit test for ExternalDataSourceServiceImpl (#7834)
* [ISSUE #5092] add unit test for ExternalDataSourceServiceImpl

* [ISSUE #5092] delete line about ExternalDataSourceServiceImplTest to make ci re-run
2022-03-03 13:59:19 +08:00
MajorHe1
29bb690abc
[ISSUE #5092] add test for LocalDataSourceServiceImpl (#7835)
* [ISSUE #5092] add test for LocalDataSourceServiceImpl

* [ISSUE #5092] delete line about LocalDataSourceServiceImpl to test cla check
2022-03-03 13:59:04 +08:00
胡俊
f8cc85d6a8
add ConfigChangeListenContextTest (#7847) 2022-03-03 13:58:29 +08:00
胡俊
1ecdee3a26
add InternalConfigChangeNotifierTest (#7852) 2022-03-03 13:58:09 +08:00
李晓双 Li Xiao Shuang
21c48dd0cf
Merge pull request #7848 from hujun-w-2/add_ConfigQueryGroupParserTest
[ISSUE#5092]ConfigQueryGroupParserTest
2022-03-02 15:04:33 +08:00
李晓双 Li Xiao Shuang
81d1dc7d6e
Merge pull request #7849 from hujun-w-2/ConfigPublishGroupParserTest
[ISSUE#5092]ConfigPublishGroupParserTest
2022-03-02 15:01:20 +08:00
李晓双 Li Xiao Shuang
c34fc09b2a
Merge pull request #7851 from hujun-w-2/ConfigRemoveRequestHandlerTest
[ISSUE#5092]add ConfigRemoveRequestHandlerTest
2022-03-01 10:05:06 +08:00
hujun3
3e1f00362c add ConfigRemoveRequestHandlerTest 2022-02-26 14:28:46 +08:00
hujun3
b553dac47e add ConfigRemoveRequestHandlerTest 2022-02-26 14:25:19 +08:00
hujun3
d4c499aec5 add ConfigQueryGroupKeyParserTest 2022-02-26 13:35:35 +08:00
hujun3
9c805fd4f3 ConfigPublishGroupParserTest 2022-02-26 13:30:04 +08:00
hujun3
92964a66db ConfigQueryGroupParserTest 2022-02-26 13:21:50 +08:00
MajorHe1
c5c72ab874
[ISSUE #5092] add unit test for TenantCapacityPersistService (#7826) 2022-02-24 14:22:11 +08:00
MajorHe1
4a3dec75f4 [ISSUE #5092] add unit test for DynamicDataSourceTest 2022-02-23 20:58:12 +08:00
胡俊
bcf2951ac1
fix his_config query (#7763) 2022-02-23 16:48:56 +08:00
MajorHe1
46cb3c8d6e
[ISSUE #5092] add unit test for GroupCapacityPersistService (#7819) 2022-02-23 09:45:43 +08:00
胡俊
b695036c88
add ConfigPublishGroupKeyParserTest (#7820) 2022-02-23 09:44:54 +08:00
hujun3
f8e2e87b58 add ConfigChangeClusterSyncRequestHandlerTest 2022-02-22 20:21:37 +08:00
MajorHe1
ade162c4be
[ISSUE #7593] judge whether file exists in disk (#7677) 2022-02-21 18:33:16 +08:00
chaos
d1d451f3a2 format code style 2022-02-09 16:01:29 +08:00
chaos
af34095b3e Delete redundant code 2022-02-09 15:09:58 +08:00
chaos
48a7af4610 Delete redundant code 2022-02-09 15:07:58 +08:00
onewe
3f31ac08aa [Optimize] Optimize some code of config controller
- Remove unnecessary annotation `Autowired`
- Replace with <>
- Remove unnecessary init statement
- Change injection method from field injection to constructor injection
- Remove unnecessary bool string
- Remove unnecessary judgment statement
2022-02-09 14:35:50 +08:00
onewe
2afad2a22f
[Optimize] Optimize some code (#7736)
- Remove unnecessary annotation `Autowired`
- Replace with <>
- Remove unnecessary judgment statement
- Remove unnecessary init statement
- Remove unnecessary exception declaration statement
2022-02-09 10:36:59 +08:00
Roger3581321
939e381d36
Strengthening the code (#7729) 2022-02-08 09:53:23 +08:00
杨翊 SionYang
6a6f32ce6d
Merge pull request #7732 from alibaba/summer2021_issue#5696
[ISSUE#5696] Add the authentication plugin
2022-02-07 10:30:53 +08:00
杨翊 SionYang
f654026d69 Revert "[ISSUE#5696] Add the authentication plugin (#7712)"
This reverts commit 97c7b9b849.
2022-01-28 18:01:52 +08:00
杨翊 SionYang
97c7b9b849
[ISSUE#5696] Add the authentication plugin (#7712)
* [ISSUE#5696] Add auth plugin interface. (#6593)

* define plugin

* add User model

* add authContext

* add SPI

* add resource, modify request, reformat code

* copyright, Serverloader, IdentityContext

* add unit test

* modify ClassLoader, and delete GrantType

* delete redundancy code

* remove authservice default name

* Change to StringUtils

* Add auth client: plugin and implement (#6883)

* Revise Auth server plugin (#6890)

* [ISSUE # 5696] Replace original auth client (#6885)

* Replace auth client

* Replace auth client original implement

* Replace original auth client

* Revise client: combine function and modify name

* [ISSUE #5696] Add auth server implement (#6901)

* Add auth server implement.

* Modify auth server: class name

* Add MySQL DataBase (#6968)

* add derby database (#6996)

* [ISSUE#5696] Fix auth server type (#7004)

* Add MySQL DataBase

* Add Derby Database

* Replace Auth Server

* Revise: change to AuthSystemType

* [ISSUE#5696] repackage client (#7029)

* Rename and move classes make them more readable.

* Rename and move test classes.

* [ISSUE#5696] Add Ram client auth service impl. (#7036)

* Add Resource abstract.

* Add Ram client auth service impl.

* [ISSUE#5695] Replace the usage of Ram in naming and config module. (#7038)

* Change SecurityProxy usage

* Replace ram usage in naming module

* Replace ram usage in naming module

* Replace ram usage in config module

* Remove unused field and fix unit test.

* [ISSUE#5696] Move and repackage some ram class to ram package. (#7040)

* move client.identity package to auth.ram.identity.

* move SignUtil to ram.utils.

* Add shutdown for auth plugin.

* Move SpasAdapter to new package.

* For PMD.

* For PMD and copyright.

* Fix ram type plugin not login for config module.

* [ISSUE #7114] Enhance the constants for auth module. (#7170)

- Create a Constants.java
- Move all the string literal to the Constants.java
- Delete the PropertiesConstant.java

* [ISSUE#5696] revert nacos server plugin implementation moved operation (#7636)

* Revert "[ISSUE#5696] Fix auth server type (#7004)"

This reverts commit e3b7f0e7

* Revert "add derby database (#6996)"

This reverts commit fea9d727

* Revert "Add MySQL DataBase (#6968)"

This reverts commit 3c0508d2

* Revert "[ISSUE #5696] Add auth server implement (#6901)"

This reverts commit 76ac8434

* Move JwtAuthenticationTokenFilter to security package.

* refactor constants about auth.

* Solve conflicts.

* Add resource parser

* Do some refactor for IdentityContextBuilder

* Repackage some auth classes.

* For checkstyle

* Add SignType

* Add MockAuthPluginService for unit test.

* Add new ProtocolAuthService to replace AuthManager.

* Http request use new plugin.

* Http request use new plugin.

* Grpc request use new plugin.

* Remove AuthManager.java

* Add plugin and auth-plugin module, and move class into module.

* Move client spi to nacos-auth-plugin module

* Remove NamingResourceParser.java

* Remove ConfigResourceParser.java

* remove unused parseName in ResourceParser

* Use specified parser to parse resource when can't find parser by type.

* Repackage some class

* Move default auth impl from console to nacos-plugin-default-impl module.

* Move user controller to nacos-plugin-default-impl module.

* Move auth persistence to nacos-plugin-default-impl module.

* Move user to nacos-plugin-default-impl module.

* Move plugin config to nacos-auth-plugin-impl module.

* Remove unused constants

* Fix compile problem.

* For pmd.

* Fix unit test.

Co-authored-by: Wuyunfan-BUPT <30968107+Wuyunfan-BUPT@users.noreply.github.com>
Co-authored-by: onewe <admin@onew.me>
2022-01-28 17:26:42 +08:00
KomachiSion
aba0facf90 Move user to nacos-plugin-default-impl module. 2022-01-26 10:05:39 +08:00
KomachiSion
1e2f938f7b Move auth persistence to nacos-plugin-default-impl module. 2022-01-25 16:01:44 +08:00
胡俊
5dd094e9a8
请求参数srcUser不起作用 (#7702) 2022-01-24 14:10:53 +08:00
KomachiSion
79ef816277 Remove ConfigResourceParser.java 2022-01-21 16:47:51 +08:00
KomachiSion
89cc6caade Add plugin and auth-plugin module, and move class into module. 2022-01-21 15:06:09 +08:00
KomachiSion
be9516d037 Remove AuthManager.java 2022-01-21 13:49:30 +08:00
KomachiSion
79e7a95e62 Add SignType 2022-01-17 17:15:42 +08:00
KomachiSion
dc1c05d2dc Repackage some auth classes. 2022-01-17 16:32:23 +08:00