Commit Graph

119 Commits

Author SHA1 Message Date
melod_yi 486e198486
[ISSUE #13761]Fix: Add validation when deleting roles to prevent issues like mistakenly deleting ROLE_ADMIN. (#13764)
* Fix: Add validation when deleting roles to prevent issues like mistakenly deleting ROLE_ADMIN.

* code check: remove unused import
2025-09-02 16:45:13 +08:00
方圆 c37dd2a8e9
[ISSUE #13711]: security fixes (#13732)
* remove unnecessary comment

* [ISSUE #13711]: security fixes

* [ISSUE #13711]: security fixes

* [ISSUE #13711]: fit unit test
2025-08-28 13:53:30 +08:00
方圆 0512126369
[ISSUE #13625] create user check username and password not blank (#13635)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
* [issue #13468] fix dataIdPattern default value

* [issue #13468] fix unit test

* [issue #13367] fix ConcurrentModificationException bug

* [issue #13367] unit test

* [ISSUE #13625] create user check username and password not blank

* [ISSUE #13625] create user check username and password not blank

* [ISSUE #13625] remove repeat code

* [ISSUE #13625] unit test

* [ISSUE #13625] fix

* [ISSUE #13625] fix

* [ISSUE #13625] formatter

* [ISSUE #13625] rename

* [ISSUE #13625] formatter log

* [ISSUE #13625] add ending period
2025-07-25 14:03:44 +08:00
Faye Lin 52ef966b1e
[issue #13522] Ldap related beans are loaded into Spring properly (#13586)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
* fix: fix the ldap bean not being configured

* fix: fix NPE in AbstractCheckedRoleService
2025-07-04 10:18:40 +08:00
KomachiSion 7391f4c941 Fix ut. 2025-04-29 10:13:27 +08:00
KomachiSion 5b0b9665c3 Merge remote-tracking branch 'refs/remotes/upstream/develop' into v3.0-develop-sync-develop
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxy.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ListenerController.java
#	console/src/main/resources/static/index.html
#	console/src/main/resources/static/js/main.js
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/constant/AuthConstants.java
#	pom.xml
2025-04-22 19:47:57 +08:00
杨翊 SionYang 2760327037
[ISSUE#13246] Add nacos-default-mcp namespace into persistence. (#13274)
* Fix console deployment type, add admin user failed problem.

* Add nacos-default-mcp namespace into persistence.
2025-04-21 15:37:31 +08:00
shiyiyue1102 863581c47b
fix public namespace auth (#13259) 2025-04-16 14:44:44 +08:00
linwumingshi 89055d4793
Merge pull request #13222 from linwumingshi/fix/security-bcrypt
Continuous Integration / ci (8, ubuntu-latest) (push) Has been cancelled Details
Integration Test / test (11, ubuntu-latest) (push) Has been cancelled Details
Integration Test / test (11.0.3, ubuntu-latest) (push) Has been cancelled Details
Integration Test / test (8, ubuntu-latest) (push) Has been cancelled Details
Integration Test / test (8.0.192, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 8) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
[ISSUE #13205] Implement `SafeBcryptPasswordEncoder` to address password length vulnerability
2025-04-03 16:41:52 +08:00
杨翊 SionYang c3b79cf15a
V3.0 develop auth plugin (#13215)
* Change auth plugin return boolean to AuthResult.

* set AuthContext result as AuthResult.

* Refactor to remove using AuthConfigs, replaced with NacosAuthConfig.

* Refactor to remove using AuthConfigs, replaced with NacosAuthConfig.

* Move AuthConfigs to default auth plugin impl module.
2025-03-31 16:10:01 +08:00
杨翊 SionYang cf691fa06c
Change some console api from public api to identity check only api. (#13208) 2025-03-26 14:34:30 +08:00
杨翊 SionYang 8bbcbbbbfe
V3.0 develop fix ut (#13167)
* Fix nacos client and relative depend ut.

* Fix nacos config ut.

* Fix nacos console ut.

* Fix nacos core ut.

* Fix nacos naming ut.

* Fix nacos default-auth-plugin-impl ut.

* Fix nacos prometheus ut.
2025-03-10 15:38:27 +08:00
杨翊 SionYang 6284521fce
Enhancement Console API response for naming module and other some console enhancement. (#13146)
* console-ui list naming subscriber page use new response to show subscribers.

* console-ui naming service detail page use new console API response.

* console-ui naming service detail page use new console API response to show instance list.

* console-ui naming service list page use new console API response to show.

* Support config import and export config with console model.

* Fix v1 auth http api not be loaded problem.
2025-03-03 10:58:36 +08:00
杨翊 SionYang 07c293a53c
Refactor nacos default auth plugin to inject HTTP API by AutoConfiguration. (#13142)
* Support refresh nacos server member in console model.

* Mark old NamingMaintainService as deprecated.

* Use Import replace directly build Nacos Auth plugin bean in console.

* Using AutoConfiguration to inject nacos default auth plugin HTTP API.
2025-02-27 19:09:54 +08:00
杨翊 SionYang 2c025e20ec
V3.0 develop console mode (#13134)
* Use Page to replace List result for some maintainer api.

* Support namespace page.

* uniform Namespace model to api。

* Support console get server state from nacos-server

* Fix update namespace invalid problem.

* console support setting admin password.

* Add Console maintainer client auth plugin to support identity request.

* Support Nacos Console get users info from nacos server.

* Support Nacos Console get role and permission info from nacos server.

* Fix NPE by AuthConfig loading Circular Dependencies.
2025-02-25 18:27:01 +08:00
杨翊 SionYang cdddd10494
[ISSUE#12979] Redefine some configuration model to support admin API and maintainer client. (#13100)
* Remove maintainer Capacity.java

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

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

* Move Page.java to nacos-api module.

* Redefine some configuration model to support admin API and maintainer client.
2025-02-12 13:52:12 +08:00
杨翊 SionYang 8de4e36d7e
Support nacos console deployment independent: PR 1 (#13072)
* Support start up with console only mode: step1 - basic start up.

* Support start up with console only mode: step2 - solve server state to fix console ui loading.
2025-01-24 17:53:53 +08:00
杨翊 SionYang 762405f148
Fix prometheus auth manager problem. (#13071) 2025-01-24 11:30:22 +08:00
KomachiSion 7ccf2fbf53 Fix Unit test problem. 2025-01-10 14:35:50 +08:00
KomachiSion 68f99e5237 Fix compile error. 2025-01-08 13:44:26 +08:00
KomachiSion 87382160df Merge branch 'refs/heads/v3.0-develop' into summer-ospp#12028-sync-develop
# Conflicts:
#	auth/src/test/java/com/alibaba/nacos/auth/config/AuthConfigsTest.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPublishRequestHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/ConfigOperationService.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/DumpChangeConfigWorker.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/DumpConfigHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/DumpService.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/dump/processor/DumpAllProcessor.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/merge/MergeDatumService.java
#	config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java
#	console/pom.xml
#	console/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java
#	core/src/main/java/com/alibaba/nacos/core/auth/AuthFilter.java
#	core/src/main/java/com/alibaba/nacos/core/cluster/ServerMemberManager.java
#	core/src/main/java/com/alibaba/nacos/core/listener/StartingApplicationListener.java
#	core/src/main/resources/META-INF/logback/nacos.xml
#	core/src/test/java/com/alibaba/nacos/core/auth/AuthFilterTest.java
#	core/src/test/java/com/alibaba/nacos/core/cluster/ServerMemberManagerTest.java
#	distribution/conf/nacos-logback.xml
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthManager.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/authenticate/AuthenticationManagerDelegator.java
#	plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/filter/JwtAuthenticationTokenFilter.java
#	pom.xml
#	prometheus/src/main/java/com/alibaba/nacos/prometheus/conf/PrometheusSecurityConfiguration.java
2025-01-08 11:19:35 +08:00
Moritz Arena b16b90048a
Upgrade to SpringBoot 3 and support GraalVM packaging (#13020)
Upgrade to SpringBoot 3, JDK 17 and support GraalVM
2025-01-08 09:49:56 +08:00
KomachiSion ef2fd209ea Fix compile problem. 2025-01-06 15:44:28 +08:00
杨翊 SionYang f54edabedb
V3.0 develop enhancement configuration file and fix deploy problem (#13009)
* Sort and enhance nacos application.properties.

* fix deploy and compile problem.
2025-01-02 17:04:34 +08:00
shalk(xiao kun) cd7de01ffc
[ISSUE #12962]Feat develop 3.0 dlock (#12981)
* add simple Distributed lock

# Conflicts:
#	pom.xml

* add lock unit test.

* add lock unit test.

* add lock unit test.

* update lock instance

* add javadoc

* add nacoslock snapshot.

* add property.

* update property.

* add lock auth.

* fix lock auth.

* add lockInfo DTO.

* improve log and memory lack.

* merge 'develop' into lock

* add lock query count and rt metrics

* fix compile and test

---------

Co-authored-by: 985492783 <985492783@qq.com>
2025-01-02 12:00:39 +08:00
杨翊 SionYang f0ad076e83
V3.0 develop fix console login problem (#13007)
* Fix console ui login error and fix console leak filters.

* Some simple refactor for nacos auth plugin.
2025-01-02 11:22:54 +08:00
杨翊 SionYang 05362b0b90
V3.0 develop starting listening enhance & fix console auth invalid problem. (#13001)
* Enhance StartingApplicationListener to reduce duplicate operation.

* Fix console auth invalid problem.
2024-12-30 17:51:49 +08:00
杨翊 SionYang 1609df97df
[Nacos 3.0] Nacos support console and server start with different web container and port. (#12959)
* Support console and server api with depend port.

* enhance banners and support only start server mode.
2024-12-17 15:33:47 +08:00
KomachiSion 6f3940735a Merge remote-tracking branch 'refs/remotes/upstream/develop' into v3.0-develop-sync-develop
# Conflicts:
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java
#	config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java
#	config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandlerTest.java
#	console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js
#	console/src/main/resources/static/console-ui/public/js/main.js
#	console/src/main/resources/static/index.html
#	console/src/main/resources/static/js/main.js
2024-12-09 14:43:41 +08:00
DirtyBit64 d4f5421cfc
[ISSUE #12773] Fix unfriendly message when adding duplicate permissions or binding relationship. (#12926)
* Fix unfriendly message when adding duplicate roles.

* unit test.

* correct code style.

* correct code style.

* correct code style.
2024-12-06 16:40:02 +08:00
杨翊 SionYang 6029ea4290
Use new nacos.io url replace older. (#12928) 2024-12-06 10:38:57 +08:00
zhouchunhai 66705e30c1
The error message is not user-friendly when adding duplicate permissi… (#12805)
* The error message is not user-friendly when adding duplicate permissions. (#12273)

* The error message is not user-friendly when adding duplicate permissions. (#12773)

* add some unit test.

* fix ci fail.
2024-12-05 17:28:12 +08:00
杨翊 SionYang d75b1a2a9a
[Refactor] Deprecated old api and default disabled old console api. (#12830)
* Add old API Compatibility annotation logic and control namespace api.

* Add Compatibility annotation for old console module API.

* Add Compatibility annotation for old core module API.

* Add Compatibility annotation for old naming module API.

* Add Compatibility annotation for old config module API.

* Add Compatibility annotation for old default auth plugin module API.

* Add api compatibility configuration to application.properties.

* Add unit test for compatibility.
2024-11-07 10:34:57 +08:00
杨翊 SionYang 663a718f3d
Fix empty token can start up problem. (#12816) 2024-11-04 15:57:15 +08:00
杨翊 SionYang ff7df364ad
Specified result for v3 auth console API. (#12814) 2024-11-04 14:05:13 +08:00
张煜坤 7468080a45
[ISSUE #12017] Fix console bugs (#12802)
* [ISSUE #12017] Fix backend bugs

* Modified the namespace update method

* Added two beta-related API in the config section

* Modified relevant unit tests

* [ISSUE #12017] Fix frontend bugs

* Merged the develop branch

* Fixed bugs in configuration, service, and namespace

* [ISSUE #12017] Fix console bugs

* Fix config clone bug

* Fix cluster leave message

* Fix admin request switch

* Fix admin init bug
2024-10-31 15:54:53 +08:00
张煜坤 7b3fe68ab4 Merge remote-tracking branch 'upstream/develop' into develop-issue#12017-ui-fix
# Conflicts:
#	console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js
#	console-ui/src/reducers/authority.js
2024-10-28 19:52:34 +08:00
杨翊 SionYang 2b178bec38
Refactor update password api auth check and add unit test. (#12757) 2024-10-17 16:32:59 +08:00
张煜坤 76cab27fbf
[ISSUE #12017] Add console backend unit tests and fix bugs (#12622)
* [ISSUE #12017] Add the console backend API for config section

* Add history handling module

* [ISSUE #12017] Add the console backend API for naming section

* Add service handling module

* Add instance handling module

* [ISSUE #12017] Add the console backend API for auth section

* Add user handling module

* Add role handling module

* Add permission handling module

* [ISSUE #12017] Add the console backend API for core section

* Add cluster handling module

* [ISSUE #12017] Fix the error by adding ApiType

* Fix the error by adding ApiType

* [ISSUE #12017] Refactor the old version of the console's controller

* Refactor the old version of the console's controller

* Revert "[ISSUE #12017] Add the console backend API for auth section"

This reverts commit 052112a709.

* [ISSUE #12017] Updated ControllerV3 for auth section

* Updated ControllerV3 for auth section

* [ISSUE #12017] Fix errors

* Add ApiType annotation

* Transfer the updateCluster method

* Fix Compilation Errors

* [ISSUE #12017] Add unit tests for all sections

* Add unit tests for all sections

* [ISSUE #12017] Fix bugs

* Add getAllSubClientConfigByIp method in config section

* Fix bugs in AuthFilter and RemoteRequestAuthFilter

* Fix bugs in ServiceProxy

* [ISSUE #12017] Add language validate

* Add language validate

* [ISSUE #12017] Add validation operations

* Add validation operations

* [ISSUE #12017] Fix namespace update method

* Fix namespace update method

* [ISSUE #12017] Add config error codes

* Add config error codes

* [ISSUE #12017] Optimize API

* ApiType checking and adding

* Add groupName to Service's API.

* Modify the status code specified by HTTP

* [ISSUE #12017] Fix Result failure method

* Fix Result failure method

* Fix server state unit test
2024-09-30 15:40:15 +08:00
张煜坤 f1b00a3232
[ISSUE #12017] Add the console backend API for new section (#12553)
* [ISSUE #12017] Add the console backend API for config section

* Add history handling module

* [ISSUE #12017] Add the console backend API for naming section

* Add service handling module

* Add instance handling module

* [ISSUE #12017] Add the console backend API for auth section

* Add user handling module

* Add role handling module

* Add permission handling module

* [ISSUE #12017] Add the console backend API for core section

* Add cluster handling module

* [ISSUE #12017] Fix the error by adding ApiType

* Fix the error by adding ApiType

* Revert "[ISSUE #12017] Add the console backend API for auth section"

This reverts commit 052112a709.

* [ISSUE #12017] Updated ControllerV3 for auth section

* Updated ControllerV3 for auth section

* [ISSUE #12017] Fix errors

* Add ApiType annotation

* Transfer the updateCluster method

* Fix Compilation Errors
2024-09-04 14:42:00 +08:00
张煜坤 59858d1ebe
[ISSUE #12017] Split console authentication (#12474)
* [ISSUE #12017] Git Test

* Git Test

* [ISSUE #12017] Fix Git Test

* Fix Git Test

* [ISSUE #12017] Splitting server and console authentication

* Add ApiType annotations

* Update configuration file to add fields

* Update console authentication status fetch

* Update `application.properties` - Reuse `nacos.core.auth.enabled` and add `nacos.core.auth.console.enabled`

* Update `AuthConfigs` - Modify `isAuthEnabled()` to manage plugin initialization

* Update `AbstractProtocolAuthService` - Implement `isAuthEnabled()` method for `Secured` annotation and configuration-based authentication

* Update `RemoteRequestAuthFilter` - Use `authConfigs.isAuthEnabled()` for initialization and `protocolAuthService.authEnabled(secured)` for authentication checks

* [ISSUE #12017] Update the location of the authentication judgment

* Update the location of the authentication judgment
2024-08-27 15:59:37 +08:00
若念莫念 4e42fe6bad
FIX [ISSUE #12446] macInstance 补充日志 (#12447) 2024-08-01 14:59:07 +08:00
Plato 927fbfd110
[ISSUE #11887] add some tips for upgrade (#12434) 2024-07-29 10:34:40 +08:00
blake.qiu 96a93189c3
feat(#12405): The LDAP default password is a fixed value 'nacos' and cannot be customized. (#12406) 2024-07-24 14:50:49 +08:00
徐晓伟 fbfa39d06d
🔧 fix pom.xml version (#12417)
https://github.com/alibaba/nacos/issues/12416
2024-07-24 14:42:14 +08:00
杨翊 SionYang 197795a854
Fix #12395, use request context replace session depend. (#12398) 2024-07-22 13:32:41 +08:00
hth e8e8cd29c0
add some UT for default auth plugin (#12318) 2024-07-08 10:48:51 +08:00
shalk(xiao kun) 8034da88e5
[ISSUE #12016] upgrade to junit5 and remove junit4 (#12280)
* clean junit4

* clean junit4

* clean some test dep; fix scope

* fix test compile
2024-06-26 17:39:08 +08:00
shalk(xiao kun) ab6591ac83
upgrade module naocs-plugin-impl from junit4 to junit5 (#12230) 2024-06-17 14:07:37 +08:00
杨翊 SionYang 857e6113c4
No need init password when auth disabled. (#12153) 2024-05-31 09:24:21 +08:00