Skip to content

Commit

Permalink
Add warning about the encryption key to ooniauth v1
Browse files Browse the repository at this point in the history
  • Loading branch information
LDiazN committed Jan 22, 2025
1 parent 3679d4e commit b7bb39f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ooniapi/services/ooniauth/src/ooniauth/routers/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ async def user_login(
settings: Settings = Depends(get_settings),
):
"""Auth Services: login using a registration/login link"""

# **IMPORTANT** You have to compute this token using a different key
# to the one used in ooniprobe service, because you could allow
# a login bypass attack if you don't.
#
# The token used in ooniprobe is generated regardless of any authentication,
# because it's a toy token to please old probes.
#
# We set this up in terraform

try:
dec = decode_jwt(
token=token, key=settings.jwt_encryption_key, audience="register"
Expand Down

0 comments on commit b7bb39f

Please sign in to comment.