Comments (12)
Cela équivaut à définir un mot de passe basé sur le chemin, qui sert uniquement de référence.
(Au fait, même si le crawler actuel scanne votre port, il ne devrait pas savoir à quoi sert votre API. SD-webui n'est pas encore si populaire (évasion).
In fact, this is a useful approach honestly.
I am trying not to make you misunderstand my thought. What I mentioned above was mainly to explain why I think it is not good to force users to configure nginx. If you DO know the fact, nothing would block you to do it, isn't it?
But on the other hand, as we are now hard-code the path for sd-webui in our code, it might be a bit struggle to apply your suggestion.
I would refactor those code in the next days. Overall, thanks for pointing out! Merci beaucoup !
事实上,老实说这是一个有用的方法。
我试图不使你误解我的想法。我上面提到的,主要是解释为什么我认为强迫用户配置nginx是不好的。如果你确实知道这个事实,没有什么能阻止你去做,不是吗?
但另一方面,由于我们现在在代码中硬编码了sd-webui的路径,要应用你的建议可能有点困难。
我将在接下来的日子里重构这些代码。总的来说,谢谢你的指出! Merci beaucoup !
from novelai-bot.
Currently there isn't an available authorization method for sd-webui API--The API itself has still been experimental.
What we could promise is that when sd-webui side added a valid authorization method, we would support it as soon as possible.
现在没有一个可用的授权方法为了 sd-webui API──此 API 本身有依旧是试验性的。
我们能够承诺的是,当 sd-webui 方面添加了一个合法的授权方法是,我们会尽快支持它。
from novelai-bot.
I agree that it makes a lot of sense to add an authentication method to sd-webui. We will continue to track updates from the sd-webui community on this issue.
from novelai-bot.
如果Bot和SD-webui在本地或同一个局域网,可以不添加验证。
如果Bot在公网,可通过allow关键词进行指定IP反向代理,并拒绝其他IP进行访问。
from novelai-bot.
我自己的方案是指定了特殊路径访问API,非正确路径不进行反向代理,且通过Code444不返回任何数据。
from novelai-bot.
相当于设定了一个基于路径的密码,仅供参考。
(顺带一提,现在的爬虫哪怕扫到了你的端口应该也不知道你的API是干嘛用的,SD-webui还没那么火呢(逃
from novelai-bot.
Well, in my opinion, the authorization approach that discussed in this issue would be refer to those instances exposing to the internet without a nginx or something for reverse proxy.
Since if you have an available reverse proxy for that, you can like thousands of methods to restrict whether the request could access the API or not. (Not only allow
keyword, you can also add token like JWT, or HTTP basic auth, or even implemented with some custom protocols)
I don't think that most people are able to do this in days, so I would rather to contribute to automatic side.
To be clear, adding an authorization approach is not meaning that there would never be 0days like RCEs. It is mostly like an announce: you should be authorized before accessing this API.
在我看来,这个问题中讨论的授权方法是指那些没有nginx或其他反向代理的情况下暴露在互联网上的实例。
因为如果你有一个可用的反向代理,你可以像成千上万的方法来限制请求是否可以访问API。(不仅仅是 允许
这个关键词,你还可以添加像JWT这样的令牌,或者HTTP基本认证,甚至可以用一些自定义协议来实现)。
我不认为大多数人能够在几天内做到这一点,所以我宁愿在自动方面作出贡献。
说白了,增加一个授权方式并不意味着永远不会有像RCE那样的0天。它主要是像一个公告:在访问这个API之前,你应该被授权。
from novelai-bot.
谢谢你Maiko,我只是在这个问题下分享了一个可以我正在使用的方案,我认为能够搭建和使用Koishi和SD-webui并且关注api安全性的人应该都可以在短时间内学会Nginx的简单反向代理配置,因为它只需要搜索引擎和几行配置就能实现。
另外,感谢你在本项目的贡献,真心的
from novelai-bot.
Why don't you put an issue to sd-webui itself rather than issuing here?
Anyway, you may try to use header
option to add extra headers if your sd-webui backend has other auth methods
from novelai-bot.
谢谢你Maiko,我只是在这个问题下分享了一个可以我正在使用的方案,我认为能够搭建和使用Koishi和SD-webui并且关注api安全性的人应该都可以在短时间内学会Nginx的简单反向代理配置,因为它只需要搜索引擎和几行配置就能实现。 另外,感谢你在本项目的贡献,真心的
I don't say that is bad.
It would be even worth to re-post your comment into a new issue, explaining how to configure the nginx and protect the API. I think that would help many many users.
Mais, I am trying to explain that I don't think it is valuable to be pointing in the documentaions or even here--the issue we are trying to implement authorization on our side and automatic side.
我并不是说这是坏事。
你甚至可以把你的评论重新贴到一个新的问题上,解释如何配置nginx和保护应用程序接口。我认为会帮助许多许多用户。
但是,我想解释的是,我不认为在文档中甚至在这里指出这个问题是有价值的——正如我们正试图在我们这边和自动方面实现授权。
from novelai-bot.
Voilà !
J'ai implémenté l'authentification HTTP « Basique » sur le repository d'AUTOMATIC1111 dans ce PR.
Lorsqu'il est fusionné, vous devez ajouter Authentication: Basic <base64>
dans les headers des configurations du plugin novelai.
好!
我已经在这个PR里向自动1111的仓库实现了基本HTTP认证。
当合并时,你需要在头里添加认证:<base64>
在noveiai插件设置。
from novelai-bot.
So this feature is already implemented in AUTOMATIC1111 side, and we can support this without any changes. I'll close this issue now.
If you have any other comments, feel free to open a new one!
所以这个功能已经在自动1111方面实现,而且我们可以在不改动任何东西下支持它。我现在将关闭这个议题。
如果你有任何其他评论,自由地开启一个新的!
from novelai-bot.
Related Issues (20)
- Bug: 以图画图不可用 HOT 9
- Feature: 增加NAI采样器的可选项以及采样器SMEA/SMEA DYN选项
- Feature: 传递给机器人的lora指令不生效
- Bug: novelai队列429错误 HOT 2
- Feature: 在参数一致的情况下,机器人生成的图片质量远远低于web端生成的图片。 HOT 2
- Bug: tag中的lora无法正常使用 HOT 11
- Bug: "[object Object]" is not valid JSON
- Bug: lora无法正常使用 HOT 4
- Bug: 自动重试时 negative_prompt 丢失 HOT 2
- Bug: 默认分辨率配置项消失 HOT 3
- Bug: 关闭"允许使用点数"后,用-r指令超过某些宽高后依然会消耗点数(Anlas)
- 是否支持喵喵云崽插件 HOT 1
- Feature: Support Koishi 4.17.0 HOT 1
- Bug: novelai无法使用,不知道什么情况 HOT 10
- Feature: 支持使用novelai官方的apikey HOT 5
- Bug: 秋叶包 sd-webui 环境下绘图不定时出现 404 错误 HOT 4
- 疑问
- Feature: 不知道会有novelai官方的采样器吗?
- Bug: novelai图生图不可用 HOT 6
- Bug: 开启“是否允许使用点数。”后无法自定义尺寸。 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from novelai-bot.