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

[feature] Can I disable swagger module based on configuration #185

Closed
gr8tushar opened this issue Aug 25, 2023 · 4 comments
Closed

[feature] Can I disable swagger module based on configuration #185

gr8tushar opened this issue Aug 25, 2023 · 4 comments
Labels
enhancement New feature or request waha:PLUS Relates to WAHA Plus version

Comments

@gr8tushar
Copy link

Hi,
When deploying on production, I would want to disable the swagger module all together. Can I disable it based on some configuration?

Thanks,
Tushar

@allburov
Copy link
Contributor

Hi! Right now you can hide it under password
https://waha.devlike.pro/docs/how-to/security/

I like the idea, we'll work in that way too!

@allburov allburov added the enhancement New feature or request label Aug 25, 2023
@webair-studio
Copy link

@allburov здравствуйте, извините, что на русском, но судя по никнейму вы знаете русский )
Я установил WAHA Core, но беспокоюсь, что любой человек может отправить запрос на мой API. Ботнеты сканирующие порты серверов могут найти порт 3000 и разослать всем спам сообщение.
Мои познания в IPTABLES небольшие, я попробовал
DROP tcp -- anywhere anywhere tcp dpt:3000
Но порт всё равно открыт для всех...

Собираюсь купить Plus, как только он мне принесет финансовую пользу.

@allburov
Copy link
Contributor

@webair-studio hi!
WAHA Plus provides all security options available - API key and password for swagger https://waha.devlike.pro/docs/how-to/security/
Even if you could hide the swagger - it wouldn't help your with possible security problems, API hosts on the same port, http://localhost:3000/api
With WAHA Core I can suggest you to run the WAHA container inside local network and don't expose the port or figure out how to protect it with a network firewall.

@allburov allburov added the waha:PLUS Relates to WAHA Plus version label Nov 25, 2023
@allburov
Copy link
Contributor

allburov commented Nov 25, 2023

Hi!
In 2023.12.1 release you'll be able to completely disable (hide) swagger documentation from the project (available in WAHA Plus only)
https://waha.devlike.pro/docs/how-to/security/#disable-swagger


Disable Swagger

You also can hide swagger completely by setting WHATSAPP_SWAGGER_ENABLED=false environment variable.

👉 Disabling Swagger does not protect the API, please use API security as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waha:PLUS Relates to WAHA Plus version
Projects
None yet
Development

No branches or pull requests

3 participants