Skip to content
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

权限问题 #4874

Closed
284263380 opened this issue Feb 4, 2021 · 5 comments
Closed

权限问题 #4874

284263380 opened this issue Feb 4, 2021 · 5 comments

Comments

@284263380
Copy link

284263380 commented Feb 4, 2021

图片看不到,代码如下

System.out.println("@@@@@@@@@@@@@");
//这个地方是配置,这个数据很容易捕获
String serverAddr = "syxcools.com";
String dataId = "abc";
String group = "DEFAULT_GROUP";

//下面链接的时候,不需要密码,什么的,或者权限什么的
Properties properties = new Properties();
properties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);
ConfigService configService = NacosFactory.createConfigService(properties);
String content = configService.getConfig(dataId, group, 5000);
System.out.println("获取内容1:"+content);

//这个地方是修改数据
boolean isPublishOk = configService.publishConfig(dataId, group, "content");
System.out.println("发布状态:"+isPublishOk);

我想问一下,后台的这个配置,通过上面的代码,就可以修改,删除等操作,完全不需要用户(权限的)

这个安全吗?别人知道了我的地址,岂不是随意破坏了?

@haoyann
Copy link
Collaborator

haoyann commented Feb 4, 2021

sdk也是需要认证的

@Maijh97
Copy link
Collaborator

Maijh97 commented Feb 4, 2021

请问nacos server有开启权限吗?

@284263380
Copy link
Author

我就安装完,默认的public命名空间的数据就这么可以访问了

@Maijh97
Copy link
Collaborator

Maijh97 commented Feb 4, 2021

@284263380 https://nacos.io/zh-cn/docs/auth.html 麻烦仔细查看一下文档,确认相关权限的配置已经打开

@284263380
Copy link
Author

确实没有开,原来是我的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants