Commit Graph

921 Commits

Author SHA1 Message Date
无处不在
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
KomachiSion
956df153d6 Add resource parser 2022-01-14 16:52:21 +08:00
胡俊
b90051448f
[ISSUE#7519] Optimize configuration history deletion logic (#7531)
* remove config history .for#7519

* remove config history .for#7519

* remove config history .for#7519

* update style
2022-01-14 15:55:50 +08:00
KomachiSion
4e98013f8e Solve conflicts. 2022-01-12 17:02:20 +08:00
KomachiSion
78de31dbdd Merge remote-tracking branch 'upstream/develop' into issue#5696-merge-develop
# Conflicts:
#	auth/src/main/java/com/alibaba/nacos/auth/common/AuthConfigs.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingMaintainService.java
#	client/src/main/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxy.java
#	client/src/main/java/com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegate.java
#	client/src/test/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxyTest.java
2022-01-12 16:52:14 +08:00
杨翊 SionYang
b7910a6219
[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.
2022-01-12 16:45:18 +08:00
onewe
825227ff49
[ISSUE #7623] Optimize the AggrWhitelistTest (#7624)
* [ISSUE #7623] Optimize the AggrWhitelistTest

Close #7623

* [ISSUE #7623] Remove unnecessary code
2022-01-12 11:14:35 +08:00
onewe
a6e74dd06a
[ISSUE #7627] Remove unnecessary Service annotation (#7628) 2022-01-12 11:12:59 +08:00
李晓双 Li Xiao Shuang
27ed668695
Strengthen the code (#7511) 2022-01-07 18:09:55 +08:00
guozhongkui
fd01d3614d
Update TraceLogUtilTest.java 2021-12-23 10:54:06 +08:00
guozhongkui
3975975c21 [ISSUE #5092] add unit test for TraceLogUtilTest in util 2021-12-23 10:16:45 +08:00
李晓双 Li Xiao Shuang
79ca04a737
Merge pull request #7369 from MajorHe1/add_unit_test_for_util_phase8
[ISSUE #5092] add unit test for SystemConfig/TimeoutUtils/UrlAnalysis…
2021-12-22 15:40:47 +08:00
MajorHe1
9c5307a99c [ISSUE #5092] update unit test for TimeUtils in util. 2021-12-22 14:59:05 +08:00
李晓双 Li Xiao Shuang
701f3fd93d
Merge pull request #7381 from MajorHe1/add_unit_test_for_util_phase9
[ISSUE #5092] add unit test for ConfigExecutor in util.
2021-12-22 11:47:19 +08:00
李晓双 Li Xiao Shuang
a2c807e5ce
Merge pull request #7370 from onewe/unittest/MD5UtilTest#getClientMd5Map
[ISSUE #5092] add unit test for the MD5UtilTest#getClientMd5Map
2021-12-22 11:20:27 +08:00
李晓双 Li Xiao Shuang
3eb168c6aa
Merge pull request #7365 from MajorHe1/add_unti_test_for_util_phase6
[ISSUE #5092] add unit test for SimpleCache/SimpleFlowData/SimpleIpFl…
2021-12-22 11:16:56 +08:00
MajorHe1
e5da9be27f
[ISSUE #5092] add unit test for Request/Response/RegexParser in util (#7350) 2021-12-21 12:50:37 +08:00
MajorHe1
f3e8d22b54
[ISSUE #5092] add unit test for CapacityService in service. (#7430) 2021-12-21 12:50:02 +08:00
MajorHe1
2b8f18a112
[ISSUE #5092] add unit test for SimpleReadWriteLock in util, add zero judgement when release read lock. (#7366) 2021-12-21 12:49:39 +08:00
MajorHe1
37cb76433a [ISSUE #5092] add unit test for ConfigExecutor in util. 2021-12-08 15:34:24 +08:00
onewe
9814bac80f [ISSUE #5092] add unit test for the MD5UtilTest#getClientMd5Map 2021-12-07 09:09:28 +08:00
MajorHe1
de46f8045f [ISSUE #5092] add unit test for SystemConfig/TimeoutUtils/UrlAnalysisUtils/ZipUtils in util. 2021-12-06 21:51:33 +08:00
MajorHe1
dd51e9b4b1 [ISSUE #5092] add unit test for SimpleCache/SimpleFlowData/SimpleIpFlowData in util 2021-12-06 16:18:11 +08:00
hujun
972e18fe0f Add unit tests for class ConfigPublishRequestHandlerTest in nacos 2.0 2021-12-05 16:14:20 +08:00
hujun
e93f97fd17 Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-05 00:04:59 +08:00
hujun
ce3edbc098 Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-04 23:55:46 +08:00
hujun
2d02118391 Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-04 23:52:37 +08:00
hujun
d0fee765d5 Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-04 23:51:42 +08:00
hujun
b6a733f6ce Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-04 23:34:55 +08:00
hujun
1665f3ee6e Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-04 19:58:56 +08:00
hujun
f5ad8c83ca Add unit tests for class ConfigQueryRequestHandler in nacos 2.0 2021-12-04 19:18:46 +08:00
MajorHe1
7123fedcd6
[ISSUE #5092] format unit test for utils about param\property\protocol in nacos-config (#7278) 2021-11-29 10:06:57 +08:00
MajorHe1
a0543adafc
[ISSUE #5092] add unit test for utils in nacos-config (#7251) 2021-11-24 11:19:33 +08:00
rui.zhang
d05dff5139
fix: 在请求中保存用户信息到 httpsession 修复issue:#7141 (#7252) 2021-11-24 11:18:50 +08:00
MajorHe1
33427e83bf
[ISSUE #5092] add unit test for DiskUtils in nacos-config (#7263) 2021-11-24 11:07:32 +08:00
MajorHe1
6743fe6931
[ISSUE #5092] add unit test for utils about group\log\MD5 in nacos-co… (#7271)
* [ISSUE #5092] add unit test for utils about group\log\MD5 in nacos-config

* [ISSUE #5092] format unit test for utils about group\log\MD5 in nacos-config
2021-11-24 11:06:48 +08:00
MajorHe1
21ebf4c8ee
[ISSUE #5092] uniform name of HealthController to HealthControllerTest in nacos-config (#7201) 2021-11-16 11:23:36 +08:00
MajorHe1
604034d4d8
[ISSUE #5092] add unit test for ConfigServletInner in nacos-config (#7206)
* [ISSUE #5092] add unit test for ConfigServletInner in nacos-config

* [ISSUE #5092] update ConfigServletInnerTest in nacos-config
2021-11-16 11:16:32 +08:00
MajorHe1
9e1b094985
[ISSUE #5092] add unit tests for ConfigOpsController in nacos-config (#7198) 2021-11-12 10:55:38 +08:00
MajorHe1
4fdba5f902
[ISSUE #5092] add unit tests for HistoryController in nacos-config (#7199) 2021-11-12 10:55:24 +08:00
MajorHe1
8016eb7003
[ISSUE #5092] add unit tests for ListenerController in nacos-config (#7200) 2021-11-12 10:55:09 +08:00
MajorHe1
cc568a6ee9
[ISSUE #5092] add unit tests for ConfigController in nacos-config (#7186) 2021-11-08 09:52:52 +08:00
onewe
ef5bb0a83d
[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
2021-11-04 09:57:17 +08:00
MajorHe1
d6b18120d2
[ISSUE #5092] add unit tests for CapacityController in nacos-config (#7140) 2021-11-03 10:21:58 +08:00
MajorHe1
e6ebad22d9
[ISSUE #5092] add unit tests for ClientMetricsController in nacos-config (#7143) 2021-11-03 10:21:27 +08:00
MajorHe1
093534c492
[ISSUE #5092] add unit tests for CommunicationController in nacos-config (#7144) 2021-11-03 10:21:09 +08:00
MajorHe1
70f7c5674e
[ISSUE #5092] add unit tests for configuration in nacos-config (#7135) 2021-10-28 10:13:31 +08:00
MajorHe1
ca1dfa0c94
[ISSUE #5092] add unit tests for constant in nacos-config (#7133)
* [ISSUE #5092] add unit tests for constant in nacos-config

* [ISSUE #5092] add license for CounterModeTest.java
2021-10-28 10:13:09 +08:00
Wuyunfan-BUPT
e3b7f0e79f
[ISSUE#5696] Fix auth server type (#7004)
* Add MySQL DataBase

* Add Derby Database

* Replace Auth Server

* Revise: change to AuthSystemType
2021-09-28 19:30:20 +08:00
孙继峰
c61440f32c
fix unit test fail (#6958) 2021-09-23 09:58:38 +08:00
andotorg
99e6ce9c81
support issues #6645 (#6903)
* add ldap print error log

* update history dataId and group filter is select

* fix select add showSearch properties

* To avoid unexpected NPE

* add security annotation on controller configs method
2021-09-17 19:28:26 +08:00
brotherlu-xcq
470b7bb37c
[ISSUE #6347] the delete his_config_info SQL modify in EmbeddedStorage. (#6574) 2021-08-06 11:10:39 +08:00
ZZQ的
ea864c8c5a
Remove pom dependency (#6561) 2021-08-05 09:35:49 +08:00
ZZQ的
c6c5cd45f1
Replace "google.common.base.Joiner" API with jdk API (#6501) 2021-08-02 10:07:08 +08:00
ZZQ的
b0f7bfbba7
replace "google.common.base.Preconditions" API with jdk API (#6502)
* replace "google.common.base.Preconditions" API with jdk API

* delete static method import "lenitentFoment"

* add unit test
2021-07-30 16:35:46 +08:00
ZZQ的
8282f3d617
replace "google.common.base.Stopwatch" API with jdk API (#6500) 2021-07-29 10:56:12 +08:00
ZZQ的
47c6706a63
[Reduce dependence]>[Lists] Replace "google.common.collect.*" API wit… (#6404)
* [Reduce dependence]>[Lists] Replace "google.common.collect.*" API with jdk API

* use elements.size to init the array length

* Replace IllegalArgumentException with NullPointerException

* Refactor CollectionUtilsTest#list()

* Add exception message

* update annotation

* update unit test method name
2021-07-27 13:47:41 +08:00
haoyann
26240022e1
fix yaml parse concurrent problem (#6423) 2021-07-22 11:04:15 +08:00
ZZQ的
12a9bfb3c8
[ISSUE #6314] Remove common-lang3 from pom.xml (#6334) 2021-07-13 09:32:15 +08:00
hunjipo
cdc276e829
To slightly improve performance, this commit switches to StringBuilder.append(char) instead of StringBuilder.append(String) whenever we append a single character to a StringBuilder. (#6300) 2021-07-12 13:51:14 +08:00
ZZQ的
b9e388bff9
[core module] replace *commons.lang3*.*Utils to com.alibaba.nacos.com… (#6288)
* [core module] replace *commons.lang3*.*Utils to com.alibaba.nacos.common.utils.*Utils

* Use StringUtils replace jdk String method.

* Fix error logic.
2021-07-08 15:13:34 +08:00
ZZQ的
a82a5359d6
[ISSUE #6256] [config module] replace "*commons.lang3*.*Utils" to "co… (#6265)
* [ISSUE #6256] [config module] replace "*commons.lang3*.*Utils" to "com.alibaba.nacos.common.utils.*Utils"

* fix error logic
2021-07-07 09:57:31 +08:00
mask
5aab4266eb
[ISSUE #6216] Unify SQL naming style. (#6239)
* [ISSUE #6216] Unify SQL naming style.

* [ISSUE #6216] Unify SQL naming style.

* [ISSUE #6216] Unify SQL naming style.
2021-07-05 09:53:16 +08:00
李晓双 Li Xiao Shuang
4f0900b0aa
[ISSUE #5092] Add unit tests for class ExternalUserPersistServiceImpl in nacos 2.0 (#6237)
* add unit test for ExternalUserPersistServiceImpl

* add unit test for ExternalUserPersistServiceImpl
2021-07-02 09:59:22 +08:00
ZZQ的
5fa6441099
[ISSUE #6216]All SQL keywords are modified to uppercase (#6233)
* [ISSUE #6216]All SQL keywords are modified to uppercase

* "count(0)" replace to "count(*)"

* All SQL keywords are modified to uppercase
2021-07-02 09:57:50 +08:00
孙继峰
f36556657f
[ISSUE #6197] Use java.util.Objects instead of com.alibaba.nacos.common.utils.Objects (#6218) 2021-07-01 11:32:34 +08:00
李晓双 Li Xiao Shuang
ccd674497c
add unit test for ExternalRolePersistServiceImpl (#6193) 2021-06-30 10:26:55 +08:00
李晓双 Li Xiao Shuang
95892bcd24
[ISSUE #5092] Add unit tests for class EmbeddedPermissionPersistServiceImpl in nacos 2.0 (#6183)
* add unit test for EmbeddedPermissionPersistServiceImpl

* test() to test
2021-06-29 15:14:28 +08:00
李晓双 Li Xiao Shuang
0b66c540bc
add unit test for EmbeddedRolePersistServiceImpl (#6192) 2021-06-29 15:12:04 +08:00
李晓双 Li Xiao Shuang
8648642f60
[ISSUE #5092] Add unit tests for class EmbeddedUserPersistServiceImpl in nacos 2.0 (#6194)
* add unit test for EmbeddedUserPersistServiceImpl

* add unit test for EmbeddedUserPersistServiceImpl

* add unit test for EmbeddedUserPersistServiceImpl
2021-06-29 15:11:15 +08:00
李晓双 Li Xiao Shuang
ad3b62e43c
[ISSUE #5092] Add unit tests for class ExternalPermissionPersistServiceImpl in nacos 2.0 (#6184)
* add unit test for ExternalPermissionPersistServiceImpl

* add unit test for ExternalPermissionPersistServiceImpl
2021-06-28 19:22:29 +08:00
brotherlu-xcq
01e3352e8e
[ISSUE #5884] add permission check to history config. (#6173) 2021-06-28 10:10:41 +08:00
realJackSun
c13f800c5b
[#5983] Fix unit tests in nacos-config (#5995) 2021-06-17 20:34:21 +08:00
Kamran Ahmed
08c26d6fae
Resolve dependency import path errors (#6070)
* fix #3215 bug by improve code quality for client.

* Fix line indent.

* Resolve dependency import path errors

Co-authored-by: jiele.cao <jiele.cao@sinocare.com>
2021-06-16 10:29:27 +08:00
Kamran Ahmed
4df0cd0c7c
fix #3215 bug by improve code quality for client. (#6050)
* fix #3215 bug by improve code quality for client.

* Fix line indent.

Co-authored-by: jiele.cao <jiele.cao@sinocare.com>
2021-06-15 14:01:18 +08:00
邪影oO
cdc2e3409a
fix #5934 (#6017) 2021-06-09 14:47:07 +08:00
Cherish 蔡
c025dc2c18
Feat resource parser group (#5889)
* feat(#5888): ResourceParser groupName change the splicing method.

* feat(#5888): add UT for NamingResourceParser and ConfigResourceParser
2021-06-09 09:48:18 +08:00
nov.lzf
3dc1a8cd96
fix ak sk and some tiny optimize (#5937)
* fix ak bug.

* fix ak bug.

* revert version
2021-06-04 09:41:40 +08:00
孙继峰
15c71831e7
[ISSUE #5765] fix localhost not match ip (#5852)
* rename IPUitl to InternetAddressUtil

* move isDomain to InternetAddressUtil

* [ISSUE #5765] fix localhost not match ip

* fix typo

* delete the verification IP, follow the single responsibility principle
2021-05-27 19:01:39 +08:00
李晓双 Li Xiao Shuang
d9902175a6
constant variables (#5773) 2021-05-18 19:50:58 +08:00
brotherlu-xcq
8d927c1341
[ISSUE #5727 utils] improve the code quality of nacos-config (#5761)
* [code quality] [nacos-config] [utils] the Chinese javadoc translate, return javadoc complete, the magic number fix, the code logic format

* [code quality] [nacos-config] [utils] fix space
2021-05-18 09:29:02 +08:00
brotherlu-xcq
162b0ea499
[ISSUE #5727 service-1] improve the code quality of nacos-config (#5744)
* [code quality] [nacos-config] [service-1] add change the position of variable to match common code habits , return first, reduce the if/for nest, change the Chinese javadoc to English.

* [code quality] [nacos-config] [service-1] ci problem

* [code quality] [nacos-config] [service-1] ci problem

* [code quality] [nacos-config] [service-1] indent problem fix

* [code quality] [nacos-config] [service-1] indent problem
2021-05-18 09:25:28 +08:00
brotherlu-xcq
7b912fefe7
[ISSUE #5727 service-2] improve the code quality of nacos-config (#5752)
* [code quality] [nacos-config] [service-2] add change the position of variable to match common code habits , add the mission @Override, remove the unnesessary judgement.

* [code quality] [nacos-config] [service-2] indent problem fix
2021-05-17 20:18:58 +08:00
brotherlu-xcq
5f87992321
[code quality] [nacos-config] [controller] add mission @Override, return first, reduce the if/for nest. (#5732) 2021-05-17 09:53:35 +08:00
brotherlu-xcq
26bbf08f2f
[code quality] [nacos-config] [controller] translate the Chinese log to English, the if condition nest optimized, return result optimized. (#5731) 2021-05-17 09:51:54 +08:00
brotherlu-xcq
b24d97c70b
[code quality] [nacos-config] [aspect] translate the Chinese log to English (#5730) 2021-05-17 09:50:11 +08:00
brotherlu-xcq
efd5af6dcb
improve the code quality of nacos-config [auth] (#5729) 2021-05-17 09:49:35 +08:00
KomachiSion
cf5a171ac5 Merge remote-tracking branch 'upstream/develop' into feature_support_grpc_core
# Conflicts:
#	NOTICE
#	api/pom.xml
#	common/src/main/java/com/alibaba/nacos/common/notify/DefaultPublisher.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java
#	naming/src/test/java/com/alibaba/nacos/naming/consistency/persistent/impl/NamingSnapshotOperationTest.java
#	naming/src/test/java/com/alibaba/nacos/naming/core/DomainsManagerTest.java
#	naming/src/test/java/com/alibaba/nacos/naming/healthcheck/ClientBeatCheckTaskTest.java
#	pom.xml
#	test/src/test/java/com/alibaba/nacos/test/core/JacksonUtils.java
2021-05-14 11:04:52 +08:00
brotherlu-xcq
c756da3c88
Change the invalid compare in NotifySingleService (#5587)
* optimize the compare in NotifySingleService.java

* delete the unused method setupNotifyExecutors
2021-05-14 09:37:03 +08:00
xiaoheng1
5386096b1d
Deal with the concurrency of ClientLongPolling and DataChangeTask about allSubs (#5561)
* fix #5560 Deal with the concurrency of ClientLongPolling and DataChangeTask about allSubs

* add log to default log.
2021-05-11 15:25:39 +08:00
plusmancn
7e57b90160
[ISSUE #3548] The srcUser fills with username when auth is disabled (console case) (#5566)
* feat: srcUser fills with username (console case)

* fix: code sytle of Constants.java

* fix: code style of the remaining files

* fix: the back button of HistoryDetail.js won't work

* fix: change '源 IP' to '来源 IP'

* fix: undo changes of goList
2021-05-10 20:41:35 +08:00