-
Notifications
You must be signed in to change notification settings - Fork 56
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
Same module for Nitro #405
Comments
Hey there, Thanks for creating this issue. You are correct. There is no module like NuxtSecurity for Nitro (unless there is one that works differently). @pi0 what are your thoughts on that? But honestly, I wont be able to find a time to create and maintain another module. I am happy to provide guidance to someone who can create and maintain it but me myself wont be able to do it. |
I feel like it is a general problem of Nitro that it basically has no modules and all exisiting Nuxt modules are not compatible out of the box. A security module is urgently needed but I was thinking what if Nuxt releases an amazing Auth module for Nuxt? It will be not available for Nitro as well. @pi0 Maybe a solution would be great where modules like security or auth are developed for Nitro instead of for Nuxt and then automatically work for both. I guess thats not possibly but brings me back to my request of bringing Nuxt backend api and ssr more apart nuxt/nuxt#26103 |
Hi. Everything security related i expect to be directly discussed, developed and maintained within Nitro core only. A security feature for nitro is urgently needed only if there is a clear issue reported within it's context. |
Wouldnt this make nuxt-security redundant then? I dont see Nitro providing the same features like nuxt-security, e.g. rate limiter, request size limiter, xss validator, xss protection |
Hi @MickL My understanding is that Nuxt creates a hybrid application, while Nitro creates a server. As far as Nuxt-Security is concerned, we mostly deal with application security. A good example is CSP: CSP is a set of rules that apply to the client-side and are enforced by the browser. Even though the rules are transmitted by the server, their purpose is to protect the end-user, not to protect the server. In other words, Nuxt-Security aims at enforcing good security practices for the Nuxt application running in the browser, but does not aim at provide defense against badly-designed code or compromised libraries that could be running in the Nitro server. Please note that I am using my own mental map of the difference between Nuxt and Nitro here, so I might be mistaken. |
I hope the maintainers of this project don't take my message personally and that I'm just mentioning this because was mentioned in this discussion. Yes, security depends on context. Nitro provides the infrastructure for building secure web applications (for everyone). CSP support is relevant for Nitro but it has to be a built-in feature for it to be usable by higher order layers such as Nuxt. If someone wants to collaborate on the Nitro side, discussions and issues are always the way to go and welcome. |
I actually use most of nuxt-security to protect my api routes only, and all those things are missing for Nitro:
|
I agree with @vejja who is doing ana amazing work for the module. The reason we are doing all the work we do for the module is that we are huge fans of Nuxt framework. I myself am a maintainer of at least four Nuxt modules and there is a reason for that :) I understand that it could have been useful to have similiar feature for Nitro but I cannot work on it. But I am happy to help with feedback, sharing knowledge and others if someone would be interested in porting the module. Thanks for all the input guys. I will close this issue as not planned. |
Is your feature request related to a problem? Please describe.
For Nitro there seems to be no module like nuxt-security. I wonder if nuxt-security can be "ported" as Nuxt is basically Nitro.
Btw. if you look into the Nitro docs you might think it doesnt support modules, but in fact it is just not documented: nitrojs/nitro#1862
The text was updated successfully, but these errors were encountered: