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

jitsi-saml2jwt allows wildcard-scoped JWTs #7

Open
micolous opened this issue Oct 10, 2024 · 0 comments
Open

jitsi-saml2jwt allows wildcard-scoped JWTs #7

micolous opened this issue Oct 10, 2024 · 0 comments

Comments

@micolous
Copy link

Jitsi Meet uses two non-standard claims to scope a JWT:

  • sub: which contains either a tenant identifier, domain, or * (allow all)
  • room: which contains a room name or * (allow all)

getToken.php can call two different implementations of the token generator. These both pass $_REQUEST into the generator here:

$jsonResp = $tokenGenerator->getToken($_SERVER,$_REQUEST);

AdvancedTokenGenerator conditionally sets sub based on $_REQUEST["tenant"] here:

if (array_key_exists('tenant',$requestData))
$tenant=rtrim($requestData['tenant'],"/");

TokenGenerator conditionally sets sub based on $_REQUEST["tenant"] here:

if (array_key_exists('tenant',$requestData))
$tenant=rtrim($requestData['tenant'],"/");

In both cases, when $_REQUEST["tenant"] is unset, it falls back to jitsi_domain.

However, because the tenant query parameter is under client control, it could set it to tenant=*. jitsi-saml2jwt will then issue a JWT with wildcard sub which may be accepted by multiple Jitsi instances.

This part I don't fully understand, but AdvancedTokenGenerator appears to perform some other checks to see if it is a valid room, but they only check for the presence of the room name in the debug output somewhere; but emailValidConference will return true if room=* or if tenant != private.

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

1 participant