Skip to content

go: jwtauth: When using auth plugin authentication_dolt_jwt, validate the Subject claim against the expected claims. - #11296

Merged
reltuk merged 1 commit into
mainfrom
aaron/authentication_dolt_jwt-sub-claim-validation
Jul 14, 2026
Merged

go: jwtauth: When using auth plugin authentication_dolt_jwt, validate the Subject claim against the expected claims.#11296
reltuk merged 1 commit into
mainfrom
aaron/authentication_dolt_jwt-sub-claim-validation

Conversation

@reltuk

@reltuk reltuk commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

A bug in JWT token authentication meant that an incoming token's Subject claim was not validated against the set of expected claims listed in the User record.

The end result is that a given, valid JWT token was not scoped to authenticating a single user account. Any valid JWT token bearing the correct signature, audience and issuer could be used to connect as any user account which was configured to accept that JWKS source, issuer and audenience field.

The fungible token behavior is too big of a footgun to leave in place as the default. To restore fungible token behavior, leave the sub= claim off the expected claims in the User Identity field.

This is a backward incompatible change. Existing workflows expecting fungible tokens to work may need to change token issuance or User record Identity fields to upgrade.

… the Subject claim against the expected claims.

A bug in JWT token authentication meant that an incoming token's
Subject claim was not validated against the set of expected claims
listed in the User record.

The end result is that a given, valid JWT token was not scoped to
authenticating a single user account. Any valid JWT token bearing the
correct signature, audience and issuer could be used to connect as any
user account which was configured to accept that JWKS source, issuer
and audenience field.

The fungible token behavior is too big of a footgun to leave in place
as the default. To restore fungible token behavior, leave the `sub=`
claim off the expected claims in the User Identity field.

This is a backward incompatible change. Existing workflows expecting
fungible tokens to work may need to change token issuance or User
record Identity fields to upgrade.
@coffeegoddd

Copy link
Copy Markdown
Contributor

@reltuk DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 2.3 2.43 5.65
groupby_scan 144.97 144.97 0.0
index_join 1.96 1.96 0.0
index_join_scan 1.32 1.34 1.52
index_scan 219.36 215.44 -1.79
oltp_point_select 0.26 0.25 -3.85
oltp_read_only 5.0 5.09 1.8
select_random_points 0.5 0.51 2.0
select_random_ranges 0.64 0.64 0.0
table_scan 196.89 207.82 5.55
types_table_scan 450.77 475.79 5.55
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.21 6.21 0.0
oltp_insert 3.13 3.13 0.0
oltp_read_write 11.24 11.24 0.0
oltp_update_index 3.3 3.3 0.0
oltp_update_non_index 3.02 3.02 0.0
oltp_write_only 6.32 6.32 0.0
types_delete_insert 6.79 6.91 1.77

@coffeegoddd

Copy link
Copy Markdown
Contributor

@reltuk DOLT

comparing_percentages
100.000000 to 100.000000
version result total
bec8799 ok 5937471
version total_tests
bec8799 5937471
correctness_percentage
100.0

@coffeegoddd

Copy link
Copy Markdown
Contributor

@reltuk DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 44.98 45.79 1.8
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 7e268bf 52.93 dolt bec8799 52.92 -0.02

@reltuk
reltuk merged commit 6cd9669 into main Jul 14, 2026
40 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants