gpt4 book ai didi

java - 如何使用 token 安全地连接到 RESTHeart

转载 作者:行者123 更新时间:2023-12-02 04:27:25 31 4
gpt4 key购买 nike

我已经使用 RESTHeart 和 HTTPie 通过下一行连接到我的 MongoDB:

http PUT 127.0.0.1:8080/myfirstdb desc='this is my first db created with restheart' -a username:password

但我认为直接在命令中使用我的 RESTHeart 用户名和密码根本不安全。如何安全地发出此请求,而无需在命令中输入我的 REST 用户名和密码?

最佳答案

再次引用 RestHeart 文档:

RESTHeart uses basic authentication; usernames and passwords are sent over the net on each request. Using the http listener is not secure: users credentials can be sniffed by a man-in-the-middle attack.

http://restheart.org/docs/configuration.html

基本身份验证(用户名:密码)似乎是唯一受支持的身份验证模式。 RestHeart 建议设置一个 https 监听器,这样您的密码就不会以纯文本形式被嗅探。

关于java - 如何使用 token 安全地连接到 RESTHeart,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31957812/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com