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

Option to disable swagger-ui endpoint #19780

Closed
svghadi opened this issue Sep 4, 2024 · 8 comments
Closed

Option to disable swagger-ui endpoint #19780

svghadi opened this issue Sep 4, 2024 · 8 comments
Labels
component:api API bugs and enhancements component:security component:server enhancement New feature or request workaround There's a workaround, might not be great, but exists

Comments

@svghadi
Copy link
Contributor

svghadi commented Sep 4, 2024

Summary

Provide a option to disable the authenticated /swagger-ui endpoint which serves the api documentation.

Motivation

Api docs are served on <argocd-url>/swagger-ui endpoint without authentication. Even though these docs are the same across different Argo CD instances and don't pose a security risk when exposed, some of the users are interested is disabling it.

Proposal

Make the endpoint configurable via a argocd-cm configmap key (eg: disableSwaggerUI: true) or a cli argument to argocd-server (eg: --disable-swagger-ui)

@svghadi svghadi added the enhancement New feature or request label Sep 4, 2024
@crenshaw-dev
Copy link
Member

Any reason not to just disable it at the ingress?

@svghadi
Copy link
Contributor Author

svghadi commented Sep 4, 2024

Not specifically, I didn’t consider that approach. I was looking for a simpler solution.

@crenshaw-dev
Copy link
Member

Fair. I'm in favor of fewer options in Argo CD if possible, but if we need it we need it. 🙂

@svghadi
Copy link
Contributor Author

svghadi commented Sep 4, 2024

Copying comment(#16791 (comment)) from related discussion for code reference

pasha-codefresh
Unfortunately no, but should be pretty easy to support it

swagger.ServeSwaggerUI(mux, assets.SwaggerJSON, "/swagger-ui", a.RootPath)

@andrii-korotkov-verkada
Copy link
Contributor

@svghadi, do you still need the option?

@svghadi
Copy link
Contributor Author

svghadi commented Nov 11, 2024

It would be good to have this option. Even though the API docs are the same across different Argo CD instances and don't pose a security risk, some users might be interested in disabling the API documentation UI.

@crenshaw-dev
Copy link
Member

If there's no pressing need, and if network rules can generally solve the problem, I'd rather avoid adding Argo CD code for this relative edge case.

@andrii-korotkov-verkada andrii-korotkov-verkada added the workaround There's a workaround, might not be great, but exists label Nov 11, 2024
@svghadi svghadi closed this as completed Nov 11, 2024
@svghadi
Copy link
Contributor Author

svghadi commented Nov 11, 2024

Understood. That sounds reasonable. I'll reopen the issue if there’s a pressing need from users in the future."

@svghadi svghadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api API bugs and enhancements component:security component:server enhancement New feature or request workaround There's a workaround, might not be great, but exists
Projects
None yet
Development

No branches or pull requests

4 participants