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

More warnings that setting OAuthConfigObject.ClientSecret will cause the client secret to show up in the html #2449

Closed
zippy1981 opened this issue Jun 26, 2022 · 2 comments

Comments

@zippy1981
Copy link
Contributor

I was working on customizing the swagger UI when I noticed at the bottom of the HTML is some inline javascript that included the clientID and client secret. We were using user name and password OpenID auth against AAD so we didn't actually need the client secret. However sometime our app uses its client secret to do Bearer Auth to other things so its in the app settings, and we passed it down to swagger until we learned this was bad and harmful.

While this is ultimately swagger-ui rendering the secret, swashbuckle should do more.to warn carelessly adding the client secret. At the very least the xmldoc comments should warn you this is bad. The examples should warn you explictly not to set it whenever they set client secret. I'd even go as far as making ClientSecret a field backed property so you can stick a #WARNING in the setter that the user could ignore of they really need to expose the client secret.

Copy link
Contributor

This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.

@github-actions github-actions bot added the stale Stale issues or pull requests label Apr 21, 2024
@martincostello
Copy link
Collaborator

#2449

@martincostello martincostello removed the stale Stale issues or pull requests label Apr 21, 2024
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

No branches or pull requests

2 participants