Commit Graph

3908 Commits

Author SHA1 Message Date
胡俊
9a26a65bc5
[ISSUE#7738]Client code should use enabled to pass parameters (#7756)
* use enabled

* add var
2022-02-16 10:25:46 +08:00
李晓双 Li Xiao Shuang
ede1df62e3
Merge pull request #7771 from KomachiSion/develop#5696
[ISSUE#5696]Auth plugin add enableAuth method to switch auth more precisely.
2022-02-15 16:23:51 +08:00
KomachiSion
5931ded303 Remove unused mock in unit test. 2022-02-15 14:29:41 +08:00
KomachiSion
eeb5268282 auth plugin add enableAuth method to switch auth more precisely. 2022-02-15 14:21:31 +08:00
杨翊 SionYang
1c3656a1b0
[ISSUE#5696] Keep original resource parse result rather than use any replace when … (#7764)
* Keep original resource parse result rathar than use any replace when resource is empty.

* Identity Builder for http will be case-insensitive.

* For checkstyle.
2022-02-15 10:21:55 +08:00
杨翊 SionYang
64dcc0ed0a
[ISSUE#5696] IdentityContext build from resource and remote ip. (#7745)
* validateIdentity add Resource input for extension.

* IdentityContext parse remoteIp.
2022-02-09 17:57:39 +08:00
李晓双 Li Xiao Shuang
080f1ff592
Merge pull request #7743 from Chaos-coder/code_optimization_config_controller
删除ConfigController类冗余代码
2022-02-09 16:47:06 +08:00
chaos
d1d451f3a2 format code style 2022-02-09 16:01:29 +08:00
chenhao26
74e421925b
InstanceUtil 分支判断优化 (#7713) 2022-02-09 15:43:13 +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
Steafan Zhou
ee26380692
Develop issue#7224 (#7318)
* For #4092,Fix the problem.

* For #7224,Fix the problem.

* For #7224,Fix the problem.
2022-02-09 10:50:38 +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
胡俊
4c45a3afd3
fix by zero error (#7724)
* fix by zero error

* fix by zero error --unit test
2022-02-07 10:38:37 +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
50879960ef
Merge pull request #7721 from alibaba/revert-7712-summer2021_issue#5696
Revert "[ISSUE#5696] Add the authentication plugin "
2022-02-07 10:05:33 +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
49d19b17b0 Fix unit test. 2022-01-26 15:21:02 +08:00
KomachiSion
e2e819379c For pmd. 2022-01-26 14:01:27 +08:00
KomachiSion
1b5e422c6f Fix compile problem. 2022-01-26 13:58:29 +08:00
KomachiSion
6efb3ce846 Remove unused constants 2022-01-26 13:49:55 +08:00
KomachiSion
9020bb9d6e Move plugin config to nacos-auth-plugin-impl module. 2022-01-26 11:54:52 +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
KomachiSion
4e4255a824 Move user controller to nacos-plugin-default-impl module. 2022-01-25 14:10:23 +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
32d7ce3b66 Repackage some class 2022-01-24 15:35:45 +08:00
胡俊
5dd094e9a8
请求参数srcUser不起作用 (#7702) 2022-01-24 14:10:53 +08:00
KomachiSion
3e10d29ee2 Use specified parser to parse resource when can't find parser by type. 2022-01-21 17:29:56 +08:00
KomachiSion
a25b128d76 remove unused parseName in ResourceParser 2022-01-21 16:50:28 +08:00
KomachiSion
79ef816277 Remove ConfigResourceParser.java 2022-01-21 16:47:51 +08:00
KomachiSion
232c667feb Remove NamingResourceParser.java 2022-01-21 16:44:44 +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
be9516d037 Remove AuthManager.java 2022-01-21 13:49:30 +08:00
KomachiSion
e606dd7333 Grpc request use new plugin. 2022-01-20 20:49:49 +08:00
KomachiSion
80a6821bb7 Http request use new plugin. 2022-01-20 17:59:05 +08:00
KomachiSion
88818d0816 Http request use new plugin. 2022-01-20 16:04:20 +08:00
KomachiSion
d2e11a3de7 Add new ProtocolAuthService to replace AuthManager. 2022-01-20 14:22:43 +08:00
KomachiSion
347494c380 Add MockAuthPluginService for unit test. 2022-01-20 14:05:14 +08:00
realJackSun
a19d3fd068
Change version to 2.0.4 (#7660) 2022-01-17 17:22:53 +08:00
KomachiSion
79e7a95e62 Add SignType 2022-01-17 17:15:42 +08:00
KomachiSion
3c9e83372c For checkstyle 2022-01-17 16:43:55 +08:00
KomachiSion
dc1c05d2dc Repackage some auth classes. 2022-01-17 16:32:23 +08:00
KomachiSion
7b7db3496b Do some refactor for IdentityContextBuilder 2022-01-17 16:17: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
Karson
cb6526c845
[ISSUE #7837] add expire checking for AutoExpireCache in common util. (#7392) 2022-01-14 15:52:16 +08:00