New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix can't authenticate by username and password when use Nacos #9941
Conversation
I tested three case: config.setUsername("nacos");
config.setPassword("nacos"); config.setAddress("nacos://nacos:nacos@127.0.0.1:8848") config.setAddress("nacos://nacos:nacos@127.0.0.1:8848?username=nacos&password=nacos") only case 3 success, maybe it‘s just a trick🤔 |
Codecov Report
@@ Coverage Diff @@
## master #9941 +/- ##
============================================
- Coverage 60.92% 60.07% -0.86%
+ Complexity 449 445 -4
============================================
Files 1100 1100
Lines 44557 44565 +8
Branches 6486 6490 +4
============================================
- Hits 27145 26771 -374
- Misses 14446 14837 +391
+ Partials 2966 2957 -9
Continue to review full report at Codecov.
|
Would you please add some uts for this? |
em, It seems that connectivity to the nacos server cannot be unit tested |
before using it:
after:
|
You can still use the previous method |
What is the purpose of the change
This PR inspired by issue #9910, when nacos enabled authenticate,
RegistryConfig and ConfigCenterConfig setUsername and setPassword is not working
Brief changelog
org.apache.dubbo.registry.nacos.util.NacosNamingServiceUtils
org.apache.dubbo.configcenter.support.nacos.NacosDynamicConfiguration
Verifying this change
Checklist