简体   繁体   English

没有认证就休息一下

[英]Rest heart without authentication

I'm using Rest Heart and I want to: 我正在使用Rest Heart,我想:

1) Disable authentication of Rest Heart. 1)禁用Rest Heart的身份验证。 I don't want to provide any credential like admin:changeit when doing crud operations. 我不想在进行crud操作时提供admin:changeit等任何凭证。 2) Disable authentication of Rest Heart with Mongo because my Mongo doesn't have authentication enabled (and I don't want to enable it) 2)禁用Mongo对Rest Heart的身份验证,因为我的Mongo没有启用身份验证(我不想启用它)

I think that that can be done editing yml file, but its not clear to me even reading the documentation. 我认为可以编辑yml文件,但即使阅读文档也不清楚。

Thanks in Advance. 提前致谢。

To disable security in RESTHeart you just comment out the following lines in restheart.yml configuration file 要在RESTHeart中禁用安全性,只需在restheart.yml配置文件中注释掉以下行

#idm:
#  implementation-class: org.restheart.security.impl.SimpleFileIdentityManager
#  conf-file: {{{idm.conf-file}}}

#access-manager:
#  implementation-class: org.restheart.security.impl.SimpleAccessManager
#  conf-file: {{{access-manager.conf-file}}}

The credentials of MongoDb are specified in the mongo-uri, for instance: MongoDb的凭据在mongo-uri中指定,例如:

mongo-uri: mongodb://user:secret@127.0.0.1/?authSource=authdb

If you want to run MongoDb without security just set the following: 如果您想在没有安全性的情况下运行MongoDb,请设置以下内容:

mongo-uri: mongodb://127.0.0.1/

As an update to this topic, the latest major release of RESTHeart, which is v4 and was published in June 2019, moved the security layer into another component. 作为本主题的更新,RESTHeart的最新主要版本(即v4并于2019年6月发布)将安全层移动到另一个组件中。

So now if you run the plain RESTHeart v4 you don't have any authentication mechanism, so nothing to disable at all. 所以现在如果你运行普通的RESTHeart v4,你没有任何身份验证机制,所以根本没有任何禁用。

RESTHeart v3 has been growing over the last 5 years featuring a REST API for MongoDB and a strong security layer. RESTHeart v3在过去5年中不断发展,其中包括用于MongoDB的REST API和强大的安全层。 The code got complex to update and maintain, so that RESTHeart Platform v4 is now split in modules clued together in a micro-service architecture. 代码变得复杂,需要更新和维护,因此RESTHeart Platform v4现在可以拆分为微服务架构中的模块。

This resulted in two projects that do one thing and do it well. 这导致两个项目做了一件事并做得很好。 Each of them can also be reused alone in different architectures. 它们中的每一个也可以在不同的体系结构中单独重用。

The two micro-services are: 这两项微服务是:

You can read here for more. 你可以在这里阅读更多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM