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

Hide swagger docs in prod #407

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SibiAkkash
Copy link
Contributor

Not sure how useful this is, given that the code is open source 🙈

@SibiAkkash SibiAkkash requested a review from Joe2k November 3, 2024 07:00
@punchagan
Copy link
Member

But, what's the motivation behind hiding them? Are they a performance hit?

@SibiAkkash
Copy link
Contributor Author

But, what's the motivation behind hiding them? Are they a performance hit?
No, the motivation wasn't performance.

Enabling docs could potentially be a security threat. (internal routes that we don't expose could be visible this way; if we don't configure auth properly for an endpoint, people could access it etc...).

But all the endpoints can be found in the source code anyways... That's why I don't know whether this is needed.

@punchagan
Copy link
Member

We should focus on making sure we don't have any security loop holes like that.. where end-points are exposed without auth, when they shouldn't be. I wouldn't worry too much about docs being a security threat.

@SibiAkkash
Copy link
Contributor Author

SibiAkkash commented Nov 4, 2024

We should focus on making sure we don't have any security loop holes like that.. where end-points are exposed without auth, when they shouldn't be. I wouldn't worry too much about docs being a security threat.

Yes absolutely. I was just making sure to cover our bases lol. This might or might not have been triggered from reading an article where a vulnerability was triggered by docs being left open in prod 🙈. But agree, on your point here

@punchagan
Copy link
Member

Yes absolutely. I was just making sure to cover our bases lol. This might or might not have been triggered from reading an article where a vulnerability was triggered by docs being left open in prod 🙈. But agree, on your point here

Maybe we add some tests or a lint check or something, which forces us to make it explicit whether an end-point is open or authenticated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants