You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: 2.7.9, 2.7.8
Operating System version: xxx
Java version: 1.8
Steps to reproduce this issue
I have accessKey and secretKey for nacos. when i use nacos directly , everything is ok.
But when i config accessKey in RegistryConfig,exception will throw
How can i config secretKey contains "+" or "/" ?
NacosRegistryFactory resolve the url to create NamingService, how to hidden secretKey in url on registry ?
package com.example.dubbo;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ProtocolConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.ServiceConfig;
import java.util.HashMap;
import java.util.concurrent.CountDownLatch;
public class Server {
public static void main(String[] args) throws InterruptedException {
ServiceConfig<EchoService> config = new ServiceConfig<>();
config.setApplication(new ApplicationConfig("provider-1"));
ProtocolConfig protocolConfig = new ProtocolConfig();
protocolConfig.setName("dubbo");
protocolConfig.setPort(12345);
config.setProtocol(protocolConfig);
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("nacos://1.1.1.1");
HashMap<String, String> paramMap = new HashMap<>();
paramMap.put("namespace","MyNameSpace");
paramMap.put("accessKey","AAAA");
paramMap.put("secretKey","e3xP1NQU7hjD6PcXBb+jCSjs4p2iLq/w");
registryConfig.setParameters(paramMap);
config.setRegistry(registryConfig);
config.setInterface(EchoService.class);
config.setRef(new EchoServiceImpl());
config.export();
new CountDownLatch(1).await();
}
}
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps?
my service will registry on nacos though secretKey contains "+" or "/" ?
securtyKey should be hidden on url
Actual Result
What actually happens?
exception throw, and securtyKey is print on log.
If there is an exception, please attach the exception trace:
Exception in thread "main" java.lang.IllegalStateException: Invalid secretKey="e3xP1NQU7hjD6PcXBb+jCSjs4p2iLq/w" contains illegal character, only digit, letter, '-', '_' or '.' is legal.
at org.apache.dubbo.config.utils.ConfigValidationUtils.checkProperty(ConfigValidationUtils.java:642)
at org.apache.dubbo.config.utils.ConfigValidationUtils.checkNameHasSymbol(ConfigValidationUtils.java:602)
at org.apache.dubbo.config.utils.ConfigValidationUtils.checkParameterName(ConfigValidationUtils.java:627)
at org.apache.dubbo.config.utils.ConfigValidationUtils.validateRegistryConfig(ConfigValidationUtils.java:515)
at org.apache.dubbo.config.utils.ConfigValidationUtils.validateServiceConfig(ConfigValidationUtils.java:357)
at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:289)
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:190)
at com.example.dubbo.Server.main(Server.java:45)
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce this issue
I have accessKey and secretKey for nacos. when i use nacos directly , everything is ok.
But when i config accessKey in RegistryConfig,exception will throw
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps?
my service will registry on nacos though secretKey contains "+" or "/" ?
securtyKey should be hidden on url
Actual Result
What actually happens?
exception throw, and securtyKey is print on log.
If there is an exception, please attach the exception trace:
The text was updated successfully, but these errors were encountered: