spring - Spring Security OAuth 2 Password Grant Disable Query Parameters
问题描述
I'm using spring-security-oauth2
authorization server. I'm using the password grant for oauth authentication. Currently, this lets users send username and password as query parameters. This is not safe since the password is not protected by HTTP. To handle this, my frontend sends the important information as part of the request body through HTTPS.
We use springfox-swagger2
to generate API specifications. Since query parameters are permitted, the specification generates these fields as required, as you can see in this
The specification also takes in an optional body: I'm wondering what workaround there might be to solve this issue because we are automatically generating typescript models based off the swagger specification and every time we make any changes on our specification, any manual frontend changes of the types will be replaced.
解决方案
查询字符串使用 HTTPS 加密,但还有其他原因不使用敏感数据的查询参数,例如可以记录查询字符串的服务器日志,https://stackoverflow.com/a/323286/1536382中的更多详细信息
剩下的我不明白是什么问题,这是什么意思
由于允许查询参数
哪里允许?什么说明了这个方面?
推荐阅读
- php - 在php中创建具有固定日期数组的新数组
- kubernetes - 如何将 kubernetes 一个秘密值复制到同一命名空间中的另一个秘密
- python - Pandas dataframe excel编码问题,excel忽略编码?
- python - 将数据帧传递给范围循环
- python - 使用 CNN 中的 GridSearchCv 和错误“ValueError”找到合适的学习率
- c++ - 在 C++ 中用指针对指针转置矩阵
- python - 如何摆脱“IndexError:字符串索引超出范围”
- visual-studio-code - 有没有办法在 Visual Sudio Code 1.56.2 中将默认 shell 永久设置为命令提示符?
- discord.js - 我需要帮助修复错误,我尝试了多种不同的方法来修复它,但我没有成功
- bash - 如何在 Bash 中的命令的先前 xargs 的管道的 grep 输出上运行类似 xargs 的命令