Commit Graph

677 Commits

Author SHA1 Message Date
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
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