Ensure JWT signatures are verified
This product is not supported for your selected
Datadog site. (
).
이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다.ID: python-security/insecure-jwt
Language: Python
Severity: Notice
Category: Security
CWE: 287
Description
Use "verify_signature": False
when decoding a JWT bypasses security and may authenticate users that should not be authenticated.
See Also
Non-Compliant Code Examples
import jwt
def insecure_verify(token):
decoded = jwt.decode(token, verify=False)
print decoded
return True
import jwt
jwt.decode(encoded, options={"verify_signature": False})
Compliant Code Examples
import jwt
jwt.decode(encoded, bla={"verify_signature": False})
jwt.decode(encoded, options={"foobar": False})
import jwt
jwt.decode(encoded, options={"verify_signature": True})
jwt.decode(encoded, options={"verify_signature": False})
원활한 통합. Datadog Code Security를 경험해 보세요