Skip to content

Commit 3225a44

Browse files
Merge branch 'main' into mwickett/prot-863-protect-check-spinner
2 parents d11f5e9 + 409cdae commit 3225a44

60 files changed

Lines changed: 3535 additions & 2233 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/ui': patch
3+
---
4+
5+
Fix the organization profile modal close button overlapping the SSO configuration wizard's step header.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/shared': patch
3+
---
4+
5+
Fix the `touchSession` option documentation to link directly to the Frontend API touch endpoint.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/warm-spies-double.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/backend': patch
3+
---
4+
5+
Enforce the `azp` (authorized party) claim when `authorizedParties` is configured. Previously, a session token that was missing the `azp` claim was accepted even when `authorizedParties` was set, allowing the authorized-parties check to be bypassed by omitting the claim. Now, when `authorizedParties` is configured, a token with a missing or empty `azp` claim is rejected. Tokens without `azp` continue to be accepted when no `authorizedParties` are configured.

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ jobs:
8282
- name: Check Formatting
8383
run: pnpm format:check
8484

85+
- name: Verify localizations are generated
86+
run: |
87+
pnpm --filter @clerk/localizations generate
88+
if ! git diff --quiet -- packages/localizations/src; then
89+
echo "::error::Localization files are out of date. Run 'pnpm --filter @clerk/localizations generate' and commit the result."
90+
git --no-pager diff -- packages/localizations/src
91+
exit 1
92+
fi
93+
8594
- name: Require Changeset
8695
if: ${{ github.event_name != 'merge_group' && github.event.pull_request.draft == false }}
8796
run: |

packages/backend/src/jwt/__tests__/assertions.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,21 @@ describe('assertSubClaim(sub?)', () => {
204204
});
205205

206206
describe('assertAuthorizedPartiesClaim(azp?, authorizedParties?)', () => {
207-
it('does not throw if azp missing or empty', () => {
207+
it('does not throw if azp missing or empty and no authorizedParties are configured', () => {
208208
expect(() => assertAuthorizedPartiesClaim()).not.toThrow();
209209
expect(() => assertAuthorizedPartiesClaim('')).not.toThrow();
210210
expect(() => assertAuthorizedPartiesClaim(undefined)).not.toThrow();
211+
expect(() => assertAuthorizedPartiesClaim('', [])).not.toThrow();
212+
expect(() => assertAuthorizedPartiesClaim(undefined, [])).not.toThrow();
213+
});
214+
215+
it('throws error if azp is missing or empty but authorizedParties are configured', () => {
216+
expect(() => assertAuthorizedPartiesClaim('', ['azp-1'])).toThrow(
217+
`Invalid JWT Authorized party claim (azp) "". Expected "azp-1".`,
218+
);
219+
expect(() => assertAuthorizedPartiesClaim(undefined, ['azp-1'])).toThrow(
220+
`Invalid JWT Authorized party claim (azp) undefined. Expected "azp-1".`,
221+
);
211222
});
212223

213224
it('does not throw if authorizedParties missing or empty', () => {

packages/backend/src/jwt/assertions.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,17 @@ export const assertSubClaim = (sub?: string) => {
8484
};
8585

8686
export const assertAuthorizedPartiesClaim = (azp?: string, authorizedParties?: string[]) => {
87-
if (!azp || !authorizedParties || authorizedParties.length === 0) {
87+
// When no authorized parties are configured there is nothing to enforce, so
88+
// an azp-less token is accepted (a warning is surfaced elsewhere).
89+
if (!authorizedParties || authorizedParties.length === 0) {
8890
return;
8991
}
9092

91-
if (!authorizedParties.includes(azp)) {
93+
// Once authorized parties are configured the azp claim must be present and
94+
// match one of them. Returning early on a missing/empty azp would let any
95+
// token bypass the authorized-parties check simply by omitting the claim,
96+
// defeating the purpose of configuring them.
97+
if (!azp || !authorizedParties.includes(azp)) {
9298
throw new TokenVerificationError({
9399
reason: TokenVerificationErrorReason.TokenInvalidAuthorizedParties,
94100
message: `Invalid JWT Authorized party claim (azp) ${JSON.stringify(azp)}. Expected "${authorizedParties}".`,

packages/localizations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"dev:pub": "pnpm dev -- --env.publish",
6161
"format": "node ../../scripts/format-package.mjs",
6262
"format:check": "node ../../scripts/format-package.mjs --check",
63-
"generate": "tsc -p tsconfig.generate.json && node --experimental-vm-modules tmp/utils/generate.js && rimraf tmp && prettier --write src/*.ts",
63+
"generate": "tsc -p tsconfig.generate.json --noEmitOnError false; node --experimental-vm-modules tmp/utils/generate.js && rimraf tmp && prettier --write src/*.ts",
6464
"lint": "eslint src",
6565
"lint:attw": "attw --pack . --profile node16"
6666
},

packages/localizations/src/ar-SA.ts

Lines changed: 72 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,26 @@ export const arSA: LocalizationResource = {
216216
yearPerUnit: undefined,
217217
},
218218
configureSSO: {
219+
activate: {
220+
activateButton: undefined,
221+
activeSubtitle: undefined,
222+
activeTitle: undefined,
223+
doneButton: undefined,
224+
skipButton: undefined,
225+
subtitle: undefined,
226+
title: undefined,
227+
},
228+
changeProviderDialog: {
229+
cancelButton: undefined,
230+
confirmButton: undefined,
231+
subtitle: undefined,
232+
title: undefined,
233+
},
219234
configureStep: {
235+
activeConnectionWarning: {
236+
dismiss: undefined,
237+
title: undefined,
238+
},
220239
attributeMappingTable: {
221240
badges: {
222241
optional: undefined,
@@ -227,26 +246,25 @@ export const arSA: LocalizationResource = {
227246
assignUsersStep: {
228247
headerSubtitle: undefined,
229248
paragraph: undefined,
230-
title: undefined,
231249
},
232250
attributeMappingStep: {
233251
attributeMappingTable: {
234252
columns: {
235253
attributeName: undefined,
236-
userProfile: undefined,
254+
userAttribute: undefined,
237255
},
238256
rows: {
239257
email: {
240258
attributeName: undefined,
241-
userProfile: undefined,
259+
userAttribute: undefined,
242260
},
243261
firstName: {
244262
attributeName: undefined,
245-
userProfile: undefined,
263+
userAttribute: undefined,
246264
},
247265
lastName: {
248266
attributeName: undefined,
249-
userProfile: undefined,
267+
userAttribute: undefined,
250268
},
251269
},
252270
},
@@ -256,7 +274,6 @@ export const arSA: LocalizationResource = {
256274
createAppStep: {
257275
createAppInstructions: {
258276
paragraph: undefined,
259-
title: undefined,
260277
},
261278
headerSubtitle: undefined,
262279
serviceProviderFields: {
@@ -297,7 +314,6 @@ export const arSA: LocalizationResource = {
297314
ariaLabel: undefined,
298315
manual: undefined,
299316
metadataUrl: undefined,
300-
title: undefined,
301317
},
302318
},
303319
mainHeaderTitle: undefined,
@@ -345,7 +361,6 @@ export const arSA: LocalizationResource = {
345361
step2: undefined,
346362
step3: undefined,
347363
step4: undefined,
348-
step5: undefined,
349364
title: undefined,
350365
},
351366
headerSubtitle: undefined,
@@ -382,7 +397,6 @@ export const arSA: LocalizationResource = {
382397
ariaLabel: undefined,
383398
manual: undefined,
384399
metadataFile: undefined,
385-
title: undefined,
386400
},
387401
},
388402
mainHeaderTitle: undefined,
@@ -412,6 +426,8 @@ export const arSA: LocalizationResource = {
412426
claimName: undefined,
413427
value: undefined,
414428
},
429+
copyClaimName: undefined,
430+
copyClaimNameCopied: undefined,
415431
rows: {
416432
email: {
417433
attribute: undefined,
@@ -431,21 +447,17 @@ export const arSA: LocalizationResource = {
431447
},
432448
},
433449
headerSubtitle: undefined,
434-
paragraph: undefined,
435450
step1: undefined,
436451
step2: undefined,
437-
step3: undefined,
438452
title: undefined,
439453
},
440454
createAppStep: {
441455
assignUsersInstructions: {
442-
paragraph1: undefined,
443456
step1: undefined,
444457
step2: undefined,
445458
step3: undefined,
446459
step4: undefined,
447460
step5: undefined,
448-
step6: undefined,
449461
title: undefined,
450462
},
451463
createAppInstructions: {
@@ -493,7 +505,6 @@ export const arSA: LocalizationResource = {
493505
ariaLabel: undefined,
494506
manual: undefined,
495507
metadataUrl: undefined,
496-
title: undefined,
497508
},
498509
},
499510
mainHeaderTitle: undefined,
@@ -525,7 +536,6 @@ export const arSA: LocalizationResource = {
525536
step3: undefined,
526537
step4: undefined,
527538
step5: undefined,
528-
title: undefined,
529539
},
530540
headerSubtitle: undefined,
531541
},
@@ -566,7 +576,6 @@ export const arSA: LocalizationResource = {
566576
step2: undefined,
567577
step3: undefined,
568578
step4: undefined,
569-
step5: undefined,
570579
title: undefined,
571580
},
572581
headerSubtitle: undefined,
@@ -613,40 +622,11 @@ export const arSA: LocalizationResource = {
613622
ariaLabel: undefined,
614623
manual: undefined,
615624
metadataUrl: undefined,
616-
title: undefined,
617625
},
618626
},
619627
mainHeaderTitle: undefined,
620628
},
621629
},
622-
confirmation: {
623-
configurationSection: {
624-
configureAgainLink: undefined,
625-
issuerLabel: undefined,
626-
ssoUrlLabel: undefined,
627-
title: undefined,
628-
},
629-
domainSection: {
630-
title: undefined,
631-
},
632-
enableSection: {
633-
title: undefined,
634-
},
635-
inactiveBanner: {
636-
title: undefined,
637-
},
638-
resetSection: {
639-
confirmationFieldLabel: undefined,
640-
submitButton: undefined,
641-
title: undefined,
642-
warning: undefined,
643-
},
644-
statusSection: {
645-
activeBadge: undefined,
646-
inactiveBadge: undefined,
647-
title: undefined,
648-
},
649-
},
650630
missingManageEnterpriseConnectionsPermission: {
651631
subtitle: 'تواصل مع مسؤول مؤسستك لترقية أذوناتك.',
652632
title: 'ليس لديك إذن لإدارة تسجيل الدخول الموحد (SSO)',
@@ -656,8 +636,11 @@ export const arSA: LocalizationResource = {
656636
},
657637
organizationDomainsStep: {
658638
domainCard: {
639+
badge__expired: undefined,
659640
badge__unverified: 'لم يتم التحقق',
660641
badge__verified: 'تم التحقق',
642+
expiredAtLabel: undefined,
643+
expiredLabel: undefined,
661644
removeButtonTooltip__lastVerifiedDomain: undefined,
662645
removeButtonTooltip__lastVerifiedDomainActive: undefined,
663646
txtRecord: {
@@ -667,6 +650,7 @@ export const arSA: LocalizationResource = {
667650
valueLabel: 'القيمة',
668651
},
669652
verifiedAtLabel: "تم التحقق في {{ date | shortDate('en-US') }}",
653+
verifyAgainButton: undefined,
670654
},
671655
domainSuggestion: {
672656
formButtonPrimary__add: 'إضافة {{domain}}',
@@ -896,6 +880,15 @@ export const arSA: LocalizationResource = {
896880
badge__manualInvitation: 'ليس هناك تسجيل تلقائي',
897881
badge__unverified: 'لم يتم التحقق منها',
898882
billingPage: {
883+
accountCreditsSection: {
884+
title: undefined,
885+
viewHistory: undefined,
886+
},
887+
creditHistoryPage: {
888+
tableHeader__amount: undefined,
889+
tableHeader__date: undefined,
890+
title: undefined,
891+
},
899892
paymentHistorySection: {
900893
empty: undefined,
901894
notFound: undefined,
@@ -1094,6 +1087,9 @@ export const arSA: LocalizationResource = {
10941087
primaryButton__continueConfiguration: undefined,
10951088
primaryButton__startConfiguration: undefined,
10961089
title: undefined,
1090+
tooltip: undefined,
1091+
tooltipLabel: undefined,
1092+
tooltip__noRole: undefined,
10971093
},
10981094
title: undefined,
10991095
},
@@ -1363,6 +1359,12 @@ export const arSA: LocalizationResource = {
13631359
subtitle: 'للمتابعة، يرجى إدخال رمز التحقق المرسل إلى هاتفك',
13641360
title: 'تحقق من هاتفك',
13651361
},
1362+
protectCheck: {
1363+
loading: undefined,
1364+
retryButton: undefined,
1365+
subtitle: undefined,
1366+
title: undefined,
1367+
},
13661368
resetPassword: {
13671369
formButtonPrimary: 'أعادة تعيين كلمة المرور',
13681370
requiredMessage:
@@ -1468,6 +1470,12 @@ export const arSA: LocalizationResource = {
14681470
subtitle: 'للمتابعة إلى {{applicationName}}',
14691471
title: 'تحقق من هاتفك',
14701472
},
1473+
protectCheck: {
1474+
loading: undefined,
1475+
retryButton: undefined,
1476+
subtitle: undefined,
1477+
title: undefined,
1478+
},
14711479
restrictedAccess: {
14721480
actionLink: undefined,
14731481
actionText: undefined,
@@ -1606,6 +1614,7 @@ export const arSA: LocalizationResource = {
16061614
},
16071615
},
16081616
unstable__errors: {
1617+
action_blocked: undefined,
16091618
already_a_member_in_organization: undefined,
16101619
api_key_name_already_exists: undefined,
16111620
api_key_usage_exceeded: undefined,
@@ -1677,6 +1686,14 @@ export const arSA: LocalizationResource = {
16771686
sentencePrefix: 'كلمة السر يجب أن تحتوي على',
16781687
},
16791688
phone_number_exists: 'هذا الرقم مأخوذ الرجاء أختيار رقم آخر',
1689+
protect_check_aborted: undefined,
1690+
protect_check_already_resolved: undefined,
1691+
protect_check_execution_failed: undefined,
1692+
protect_check_invalid_script: undefined,
1693+
protect_check_invalid_sdk_url: undefined,
1694+
protect_check_script_load_failed: undefined,
1695+
protect_check_timed_out: undefined,
1696+
protect_check_unsupported_environment: undefined,
16801697
session_exists: 'لقد قمت بتسجيل الدخول بالفعل',
16811698
web3_missing_identifier: undefined,
16821699
web3_signature_request_rejected: 'لقد رفضت طلب التوقيع. يرجى المحاولة مرة أخرى للمتابعة.',
@@ -1728,9 +1745,9 @@ export const arSA: LocalizationResource = {
17281745
action__openUserMenu: 'فتح قائمة المستخدم',
17291746
action__signOut: 'تسجيل الخروج',
17301747
action__signOutAll: 'تسجيل الخروج من جميع الحسابات',
1731-
label__userButtonPopover: 'لوحة الحساب',
17321748
label__accountActions: 'إجراءات الحساب',
17331749
label__activeSessions: 'الجلسات النشطة',
1750+
label__userButtonPopover: 'لوحة الحساب',
17341751
},
17351752
userProfile: {
17361753
apiKeysPage: {
@@ -1753,6 +1770,15 @@ export const arSA: LocalizationResource = {
17531770
title__codelist: 'رموز النسخ الأحتياطي',
17541771
},
17551772
billingPage: {
1773+
accountCreditsSection: {
1774+
title: undefined,
1775+
viewHistory: undefined,
1776+
},
1777+
creditHistoryPage: {
1778+
tableHeader__amount: undefined,
1779+
tableHeader__date: undefined,
1780+
title: undefined,
1781+
},
17561782
paymentHistorySection: {
17571783
empty: undefined,
17581784
notFound: undefined,

0 commit comments

Comments
 (0)