Skip to content

Commit

Permalink
Drop ad-hoc TLS requirement from JWT and Password auth (#7231)
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans authored Apr 19, 2024
1 parent d82e14f commit 54f39c0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions edb/server/protocol/protocol.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -877,17 +877,9 @@ cdef class HttpProtocol:
# If the auth method and the provided auth information
# match, try to resolve the authentication.
if authmethod_name == 'JWT' and scheme == 'bearer':
if not self.is_tls:
raise errors.AuthenticationError(
'JWT HTTP auth must use HTTPS')

auth_helpers.auth_jwt(
self.tenant, auth_payload, username, dbname)
elif authmethod_name == 'Password' and scheme == 'basic':
if not self.is_tls:
raise errors.AuthenticationError(
'Basic HTTP auth must use HTTPS')

auth_helpers.auth_basic(
self.tenant, username, opt_password)
elif authmethod_name == 'Trust':
Expand Down

0 comments on commit 54f39c0

Please sign in to comment.