workos 7.1.2 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +49 -0
- data/.github/workflows/release-please.yml +2 -2
- data/.gitignore +2 -0
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +61 -40
- data/.release-please-manifest.json +1 -1
- data/.yardopts +6 -0
- data/CHANGELOG.md +36 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +33 -2
- data/README.md +19 -0
- data/docs/V7_MIGRATION_GUIDE.md +21 -0
- data/lib/workos/actions.rb +1 -1
- data/lib/workos/api_keys/api_key.rb +1 -1
- data/lib/workos/api_keys/api_key_created_data.rb +1 -1
- data/lib/workos/api_keys/organization_api_key.rb +43 -0
- data/lib/workos/{types/events_order.rb → api_keys/organization_api_key_owner.rb} +1 -3
- data/lib/workos/api_keys/organization_api_key_with_value.rb +46 -0
- data/lib/workos/{types/audit_logs_order.rb → api_keys/organization_api_key_with_value_owner.rb} +1 -3
- data/lib/workos/api_keys.rb +46 -46
- data/lib/workos/audit_logs.rb +4 -4
- data/lib/workos/authorization/user_organization_membership_base_list_data.rb +5 -2
- data/lib/workos/authorization/{role_assignment.rb → user_role_assignment.rb} +5 -2
- data/lib/workos/authorization/{role_assignment_resource.rb → user_role_assignment_resource.rb} +1 -1
- data/lib/workos/authorization.rb +122 -22
- data/lib/workos/base_client.rb +71 -5
- data/lib/workos/client.rb +4 -4
- data/lib/workos/connect.rb +2 -2
- data/lib/workos/directory_sync/directory_user.rb +3 -0
- data/lib/workos/directory_sync/directory_user_with_groups.rb +4 -1
- data/lib/workos/directory_sync/dsync_user_updated_data.rb +3 -0
- data/lib/workos/directory_sync.rb +6 -6
- data/lib/workos/encryptors/aes_gcm.rb +19 -5
- data/lib/workos/events.rb +2 -2
- data/lib/workos/feature_flags.rb +6 -6
- data/lib/workos/groups.rb +4 -4
- data/lib/workos/multi_factor_auth.rb +2 -2
- data/lib/workos/organizations.rb +2 -2
- data/lib/workos/session.rb +28 -7
- data/lib/workos/session_manager.rb +24 -1
- data/lib/workos/sso/profile.rb +3 -0
- data/lib/workos/sso.rb +2 -2
- data/lib/workos/types/event_context_actor_source.rb +2 -1
- data/lib/workos/types/{applications_order.rb → pagination_order.rb} +1 -1
- data/lib/workos/types/{vault_byok_key_verification_completed_data_key_provider.rb → vault_byok_key_provider.rb} +1 -1
- data/lib/workos/user_management/create_user_api_key.rb +25 -0
- data/lib/workos/user_management/organization_membership.rb +5 -2
- data/lib/workos/user_management/user_api_key.rb +43 -0
- data/lib/workos/user_management/user_api_key_created_data_owner.rb +25 -0
- data/lib/workos/{api_keys/api_key_with_value_owner.rb → user_management/user_api_key_owner.rb} +1 -1
- data/lib/workos/{types/webhooks_order.rb → user_management/user_api_key_revoked_data_owner.rb} +1 -3
- data/lib/workos/{api_keys/api_key_with_value.rb → user_management/user_api_key_with_value.rb} +2 -2
- data/lib/workos/{types/groups_order.rb → user_management/user_api_key_with_value_owner.rb} +1 -3
- data/lib/workos/user_management/user_organization_membership.rb +5 -2
- data/lib/workos/user_management.rb +114 -10
- data/lib/workos/user_management_organization_membership_groups.rb +2 -2
- data/lib/workos/vault/vault_byok_key_deleted.rb +34 -0
- data/lib/workos/vault/vault_byok_key_deleted_data.rb +22 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhooks.rb +3 -3
- data/rbi/workos/api_key.rbi +2 -2
- data/rbi/workos/api_key_created_data.rbi +2 -2
- data/rbi/workos/api_key_revoked_data.rbi +2 -2
- data/rbi/workos/api_keys.rbi +17 -17
- data/rbi/workos/authorization.rbi +27 -1
- data/rbi/workos/client.rbi +3 -3
- data/rbi/workos/create_user_api_key.rbi +36 -0
- data/rbi/workos/directory_user.rbi +6 -0
- data/rbi/workos/directory_user_with_groups.rbi +6 -0
- data/rbi/workos/dsync_user_updated_data.rbi +6 -0
- data/rbi/workos/organization_api_key.rbi +72 -0
- data/rbi/workos/{api_key_with_value_owner.rbi → organization_api_key_owner.rbi} +1 -1
- data/rbi/workos/organization_api_key_with_value.rbi +78 -0
- data/rbi/workos/organization_api_key_with_value_owner.rbi +30 -0
- data/rbi/workos/organization_membership.rbi +6 -0
- data/rbi/workos/profile.rbi +6 -0
- data/rbi/workos/user_api_key.rbi +72 -0
- data/rbi/workos/user_api_key_created_data_owner.rbi +36 -0
- data/rbi/workos/user_api_key_owner.rbi +36 -0
- data/rbi/workos/user_api_key_revoked_data_owner.rbi +36 -0
- data/rbi/workos/{api_key_with_value.rbi → user_api_key_with_value.rbi} +3 -3
- data/rbi/workos/user_api_key_with_value_owner.rbi +36 -0
- data/rbi/workos/user_management.rbi +31 -0
- data/rbi/workos/user_organization_membership.rbi +6 -0
- data/rbi/workos/user_organization_membership_base_list_data.rbi +6 -0
- data/rbi/workos/{role_assignment.rbi → user_role_assignment.rbi} +9 -3
- data/rbi/workos/{role_assignment_resource.rbi → user_role_assignment_resource.rbi} +1 -1
- data/rbi/workos/vault_byok_key_deleted.rbi +54 -0
- data/rbi/workos/vault_byok_key_deleted_data.rbi +30 -0
- data/script/docs +16 -0
- data/script/docs-serve +12 -0
- data/script/llms-txt +37 -0
- data/test/workos/test_actions.rb +9 -0
- data/test/workos/test_api_keys.rb +17 -17
- data/test/workos/test_authorization.rb +16 -0
- data/test/workos/test_base_client.rb +44 -0
- data/test/workos/test_encryptors_aes_gcm.rb +16 -1
- data/test/workos/test_model_round_trip.rb +278 -83
- data/test/workos/test_session.rb +43 -4
- data/test/workos/test_user_management.rb +25 -1
- data/test/workos/test_webhook_verify.rb +11 -0
- metadata +39 -33
- data/lib/workos/types/authorization_order.rb +0 -9
- data/lib/workos/types/connections_order.rb +0 -9
- data/lib/workos/types/directories_order.rb +0 -9
- data/lib/workos/types/directory_groups_order.rb +0 -9
- data/lib/workos/types/directory_users_order.rb +0 -9
- data/lib/workos/types/feature_flags_order.rb +0 -9
- data/lib/workos/types/organizations_api_keys_order.rb +0 -9
- data/lib/workos/types/organizations_feature_flags_order.rb +0 -9
- data/lib/workos/types/organizations_order.rb +0 -9
- data/lib/workos/types/permissions_order.rb +0 -9
- data/lib/workos/types/user_management_invitations_order.rb +0 -9
- data/lib/workos/types/user_management_multi_factor_authentication_order.rb +0 -9
- data/lib/workos/types/user_management_organization_membership_groups_order.rb +0 -9
- data/lib/workos/types/user_management_organization_membership_order.rb +0 -9
- data/lib/workos/types/user_management_users_authorized_applications_order.rb +0 -9
- data/lib/workos/types/user_management_users_feature_flags_order.rb +0 -9
- data/lib/workos/types/user_management_users_order.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca01c2ba88ce0aff45ae8689e584ba67896309cefeda715c18b119094e238a7b
|
|
4
|
+
data.tar.gz: 6733400a815cf3e8274e5eda8f95dbf2bfa9ea65da27fcc8b59e027f85b6182c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79ed8ec1968491abfdb5d884988176fd02d9b3ddd74e777e59d7f0cf47609a3f9f1c45bfd7e1cca94624f1734b7f2a95c8f71da9c27c32f3a843a98cd720a5bf
|
|
7
|
+
data.tar.gz: e72fca2d3bf036ee5b134500ba001c7f35db82473edde30c4fcc748e2e492d0450a9d8ce4f1d11c43376672257d7ca51d8ecc0663180e40a3c02d5ab3572d0d4
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Publish API Docs
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
concurrency:
|
|
9
|
+
group: pages
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
18
|
+
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
|
19
|
+
with:
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- run: ./script/docs
|
|
22
|
+
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
|
|
23
|
+
- name: Archive site
|
|
24
|
+
run: |
|
|
25
|
+
tar \
|
|
26
|
+
--dereference --hard-dereference \
|
|
27
|
+
--directory docs/_site \
|
|
28
|
+
-cvf "$RUNNER_TEMP/artifact.tar" \
|
|
29
|
+
--exclude=.git \
|
|
30
|
+
--exclude=.github \
|
|
31
|
+
.
|
|
32
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
33
|
+
with:
|
|
34
|
+
name: github-pages
|
|
35
|
+
path: ${{ runner.temp }}/artifact.tar
|
|
36
|
+
retention-days: 1
|
|
37
|
+
if-no-files-found: error
|
|
38
|
+
deploy:
|
|
39
|
+
needs: build
|
|
40
|
+
permissions:
|
|
41
|
+
pages: write
|
|
42
|
+
id-token: write
|
|
43
|
+
environment:
|
|
44
|
+
name: github-pages
|
|
45
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
|
|
49
|
+
id: deployment
|
|
@@ -45,8 +45,8 @@ jobs:
|
|
|
45
45
|
if git diff --quiet Gemfile.lock; then
|
|
46
46
|
echo "Gemfile.lock is up to date"
|
|
47
47
|
else
|
|
48
|
-
git config user.name "
|
|
49
|
-
git config user.email "
|
|
48
|
+
git config user.name "workos-sdk-automation[bot]"
|
|
49
|
+
git config user.email "255426317+workos-sdk-automation[bot]@users.noreply.github.com"
|
|
50
50
|
git add Gemfile.lock
|
|
51
51
|
git commit -m "chore: update Gemfile.lock"
|
|
52
52
|
git push
|
data/.gitignore
CHANGED
data/.last-synced-sha
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a10d9ecb766d2dd996aecb19aa9c801d78bb7c26
|
data/.oagen-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 2,
|
|
3
3
|
"language": "ruby",
|
|
4
|
-
"generatedAt": "2026-
|
|
4
|
+
"generatedAt": "2026-05-06T22:30:35.198Z",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib/workos.rb",
|
|
7
7
|
"lib/workos/admin_portal.rb",
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
"lib/workos/api_keys/api_key_revoked_data.rb",
|
|
21
21
|
"lib/workos/api_keys/api_key_revoked_data_owner.rb",
|
|
22
22
|
"lib/workos/api_keys/api_key_validation_response.rb",
|
|
23
|
-
"lib/workos/api_keys/api_key_with_value.rb",
|
|
24
|
-
"lib/workos/api_keys/api_key_with_value_owner.rb",
|
|
25
23
|
"lib/workos/api_keys/create_organization_api_key.rb",
|
|
24
|
+
"lib/workos/api_keys/organization_api_key.rb",
|
|
25
|
+
"lib/workos/api_keys/organization_api_key_owner.rb",
|
|
26
|
+
"lib/workos/api_keys/organization_api_key_with_value.rb",
|
|
27
|
+
"lib/workos/api_keys/organization_api_key_with_value_owner.rb",
|
|
26
28
|
"lib/workos/api_keys/validate_api_key.rb",
|
|
27
29
|
"lib/workos/audit_logs.rb",
|
|
28
30
|
"lib/workos/audit_logs/audit_log_action_json.rb",
|
|
@@ -60,8 +62,6 @@
|
|
|
60
62
|
"lib/workos/authorization/permission_updated_data.rb",
|
|
61
63
|
"lib/workos/authorization/remove_role.rb",
|
|
62
64
|
"lib/workos/authorization/role.rb",
|
|
63
|
-
"lib/workos/authorization/role_assignment.rb",
|
|
64
|
-
"lib/workos/authorization/role_assignment_resource.rb",
|
|
65
65
|
"lib/workos/authorization/role_created.rb",
|
|
66
66
|
"lib/workos/authorization/role_created_data.rb",
|
|
67
67
|
"lib/workos/authorization/role_deleted.rb",
|
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"lib/workos/authorization/update_organization_role.rb",
|
|
77
77
|
"lib/workos/authorization/update_role.rb",
|
|
78
78
|
"lib/workos/authorization/user_organization_membership_base_list_data.rb",
|
|
79
|
+
"lib/workos/authorization/user_role_assignment.rb",
|
|
80
|
+
"lib/workos/authorization/user_role_assignment_resource.rb",
|
|
79
81
|
"lib/workos/client.rb",
|
|
80
82
|
"lib/workos/connect.rb",
|
|
81
83
|
"lib/workos/connect/application_credentials_list_item.rb",
|
|
@@ -283,19 +285,16 @@
|
|
|
283
285
|
"lib/workos/sso/sso_token_response.rb",
|
|
284
286
|
"lib/workos/sso/sso_token_response_oauth_token.rb",
|
|
285
287
|
"lib/workos/sso/token_query.rb",
|
|
286
|
-
"lib/workos/types/applications_order.rb",
|
|
287
288
|
"lib/workos/types/audit_log_configuration_log_stream_state.rb",
|
|
288
289
|
"lib/workos/types/audit_log_configuration_log_stream_type.rb",
|
|
289
290
|
"lib/workos/types/audit_log_configuration_state.rb",
|
|
290
291
|
"lib/workos/types/audit_log_export_json_state.rb",
|
|
291
|
-
"lib/workos/types/audit_logs_order.rb",
|
|
292
292
|
"lib/workos/types/authenticate_response_authentication_method.rb",
|
|
293
293
|
"lib/workos/types/authentication_factor_enrolled_type.rb",
|
|
294
294
|
"lib/workos/types/authentication_factor_type.rb",
|
|
295
295
|
"lib/workos/types/authentication_factors_create_request_type.rb",
|
|
296
296
|
"lib/workos/types/authentication_radar_risk_detected_data_action.rb",
|
|
297
297
|
"lib/workos/types/authorization_assignment.rb",
|
|
298
|
-
"lib/workos/types/authorization_order.rb",
|
|
299
298
|
"lib/workos/types/connected_account_state.rb",
|
|
300
299
|
"lib/workos/types/connection_activated_data_connection_type.rb",
|
|
301
300
|
"lib/workos/types/connection_activated_data_state.rb",
|
|
@@ -311,20 +310,16 @@
|
|
|
311
310
|
"lib/workos/types/connection_status.rb",
|
|
312
311
|
"lib/workos/types/connection_type.rb",
|
|
313
312
|
"lib/workos/types/connections_connection_type.rb",
|
|
314
|
-
"lib/workos/types/connections_order.rb",
|
|
315
313
|
"lib/workos/types/create_user_invite_options_locale.rb",
|
|
316
314
|
"lib/workos/types/create_user_password_hash_type.rb",
|
|
317
315
|
"lib/workos/types/create_webhook_endpoint_events.rb",
|
|
318
316
|
"lib/workos/types/data_integration_access_token_response_error.rb",
|
|
319
317
|
"lib/workos/types/data_integrations_list_response_data_connected_account_state.rb",
|
|
320
318
|
"lib/workos/types/data_integrations_list_response_data_ownership.rb",
|
|
321
|
-
"lib/workos/types/directories_order.rb",
|
|
322
|
-
"lib/workos/types/directory_groups_order.rb",
|
|
323
319
|
"lib/workos/types/directory_state.rb",
|
|
324
320
|
"lib/workos/types/directory_type.rb",
|
|
325
321
|
"lib/workos/types/directory_user_state.rb",
|
|
326
322
|
"lib/workos/types/directory_user_with_groups_state.rb",
|
|
327
|
-
"lib/workos/types/directory_users_order.rb",
|
|
328
323
|
"lib/workos/types/dsync_activated_data_state.rb",
|
|
329
324
|
"lib/workos/types/dsync_activated_data_type.rb",
|
|
330
325
|
"lib/workos/types/dsync_deactivated_data_state.rb",
|
|
@@ -333,8 +328,6 @@
|
|
|
333
328
|
"lib/workos/types/dsync_deleted_data_type.rb",
|
|
334
329
|
"lib/workos/types/dsync_user_updated_data_state.rb",
|
|
335
330
|
"lib/workos/types/event_context_actor_source.rb",
|
|
336
|
-
"lib/workos/types/events_order.rb",
|
|
337
|
-
"lib/workos/types/feature_flags_order.rb",
|
|
338
331
|
"lib/workos/types/flag_created_context_actor_source.rb",
|
|
339
332
|
"lib/workos/types/flag_deleted_context_actor_source.rb",
|
|
340
333
|
"lib/workos/types/flag_rule_updated_context_access_type.rb",
|
|
@@ -342,7 +335,6 @@
|
|
|
342
335
|
"lib/workos/types/flag_rule_updated_context_previous_attribute_context_access_type.rb",
|
|
343
336
|
"lib/workos/types/flag_updated_context_actor_source.rb",
|
|
344
337
|
"lib/workos/types/generate_link_intent.rb",
|
|
345
|
-
"lib/workos/types/groups_order.rb",
|
|
346
338
|
"lib/workos/types/invitation_accepted_data_state.rb",
|
|
347
339
|
"lib/workos/types/invitation_created_data_state.rb",
|
|
348
340
|
"lib/workos/types/invitation_resent_data_state.rb",
|
|
@@ -374,10 +366,7 @@
|
|
|
374
366
|
"lib/workos/types/organization_membership_updated_data_status.rb",
|
|
375
367
|
"lib/workos/types/organization_updated_data_domain_state.rb",
|
|
376
368
|
"lib/workos/types/organization_updated_data_domain_verification_strategy.rb",
|
|
377
|
-
"lib/workos/types/
|
|
378
|
-
"lib/workos/types/organizations_feature_flags_order.rb",
|
|
379
|
-
"lib/workos/types/organizations_order.rb",
|
|
380
|
-
"lib/workos/types/permissions_order.rb",
|
|
369
|
+
"lib/workos/types/pagination_order.rb",
|
|
381
370
|
"lib/workos/types/profile_connection_type.rb",
|
|
382
371
|
"lib/workos/types/radar_action.rb",
|
|
383
372
|
"lib/workos/types/radar_standalone_assess_request_action.rb",
|
|
@@ -400,19 +389,12 @@
|
|
|
400
389
|
"lib/workos/types/user_invite_state.rb",
|
|
401
390
|
"lib/workos/types/user_management_authentication_provider.rb",
|
|
402
391
|
"lib/workos/types/user_management_authentication_screen_hint.rb",
|
|
403
|
-
"lib/workos/types/user_management_invitations_order.rb",
|
|
404
|
-
"lib/workos/types/user_management_multi_factor_authentication_order.rb",
|
|
405
|
-
"lib/workos/types/user_management_organization_membership_groups_order.rb",
|
|
406
|
-
"lib/workos/types/user_management_organization_membership_order.rb",
|
|
407
392
|
"lib/workos/types/user_management_organization_membership_statuses.rb",
|
|
408
|
-
"lib/workos/types/user_management_users_authorized_applications_order.rb",
|
|
409
|
-
"lib/workos/types/user_management_users_feature_flags_order.rb",
|
|
410
|
-
"lib/workos/types/user_management_users_order.rb",
|
|
411
393
|
"lib/workos/types/user_organization_membership_base_list_data_status.rb",
|
|
412
394
|
"lib/workos/types/user_organization_membership_status.rb",
|
|
413
395
|
"lib/workos/types/user_sessions_auth_method.rb",
|
|
414
396
|
"lib/workos/types/user_sessions_status.rb",
|
|
415
|
-
"lib/workos/types/
|
|
397
|
+
"lib/workos/types/vault_byok_key_provider.rb",
|
|
416
398
|
"lib/workos/types/vault_data_created_data_actor_source.rb",
|
|
417
399
|
"lib/workos/types/vault_data_deleted_data_actor_source.rb",
|
|
418
400
|
"lib/workos/types/vault_data_read_data_actor_source.rb",
|
|
@@ -424,7 +406,6 @@
|
|
|
424
406
|
"lib/workos/types/vault_names_listed_data_actor_source.rb",
|
|
425
407
|
"lib/workos/types/waitlist_user_state.rb",
|
|
426
408
|
"lib/workos/types/webhook_endpoint_json_status.rb",
|
|
427
|
-
"lib/workos/types/webhooks_order.rb",
|
|
428
409
|
"lib/workos/types/widget_session_token_scopes.rb",
|
|
429
410
|
"lib/workos/user_management.rb",
|
|
430
411
|
"lib/workos/user_management/action_authentication_denied.rb",
|
|
@@ -490,6 +471,7 @@
|
|
|
490
471
|
"lib/workos/user_management/create_password_reset_token.rb",
|
|
491
472
|
"lib/workos/user_management/create_redirect_uri.rb",
|
|
492
473
|
"lib/workos/user_management/create_user.rb",
|
|
474
|
+
"lib/workos/user_management/create_user_api_key.rb",
|
|
493
475
|
"lib/workos/user_management/create_user_invite_options.rb",
|
|
494
476
|
"lib/workos/user_management/create_user_organization_membership.rb",
|
|
495
477
|
"lib/workos/user_management/device_authorization_response.rb",
|
|
@@ -544,6 +526,12 @@
|
|
|
544
526
|
"lib/workos/user_management/update_user.rb",
|
|
545
527
|
"lib/workos/user_management/update_user_organization_membership.rb",
|
|
546
528
|
"lib/workos/user_management/user.rb",
|
|
529
|
+
"lib/workos/user_management/user_api_key.rb",
|
|
530
|
+
"lib/workos/user_management/user_api_key_created_data_owner.rb",
|
|
531
|
+
"lib/workos/user_management/user_api_key_owner.rb",
|
|
532
|
+
"lib/workos/user_management/user_api_key_revoked_data_owner.rb",
|
|
533
|
+
"lib/workos/user_management/user_api_key_with_value.rb",
|
|
534
|
+
"lib/workos/user_management/user_api_key_with_value_owner.rb",
|
|
547
535
|
"lib/workos/user_management/user_created.rb",
|
|
548
536
|
"lib/workos/user_management/user_deleted.rb",
|
|
549
537
|
"lib/workos/user_management/user_identities_get_item.rb",
|
|
@@ -555,6 +543,8 @@
|
|
|
555
543
|
"lib/workos/user_management/verify_email_address.rb",
|
|
556
544
|
"lib/workos/user_management/verify_email_response.rb",
|
|
557
545
|
"lib/workos/user_management_organization_membership_groups.rb",
|
|
546
|
+
"lib/workos/vault/vault_byok_key_deleted.rb",
|
|
547
|
+
"lib/workos/vault/vault_byok_key_deleted_data.rb",
|
|
558
548
|
"lib/workos/vault/vault_byok_key_verification_completed.rb",
|
|
559
549
|
"lib/workos/vault/vault_byok_key_verification_completed_data.rb",
|
|
560
550
|
"lib/workos/vault/vault_data_created.rb",
|
|
@@ -597,8 +587,6 @@
|
|
|
597
587
|
"rbi/workos/api_key_revoked_data.rbi",
|
|
598
588
|
"rbi/workos/api_key_revoked_data_owner.rbi",
|
|
599
589
|
"rbi/workos/api_key_validation_response.rbi",
|
|
600
|
-
"rbi/workos/api_key_with_value.rbi",
|
|
601
|
-
"rbi/workos/api_key_with_value_owner.rbi",
|
|
602
590
|
"rbi/workos/api_keys.rbi",
|
|
603
591
|
"rbi/workos/application_credentials_list_item.rbi",
|
|
604
592
|
"rbi/workos/assign_role.rbi",
|
|
@@ -730,6 +718,7 @@
|
|
|
730
718
|
"rbi/workos/create_redirect_uri.rbi",
|
|
731
719
|
"rbi/workos/create_role.rbi",
|
|
732
720
|
"rbi/workos/create_user.rbi",
|
|
721
|
+
"rbi/workos/create_user_api_key.rbi",
|
|
733
722
|
"rbi/workos/create_user_invite_options.rbi",
|
|
734
723
|
"rbi/workos/create_user_organization_membership.rbi",
|
|
735
724
|
"rbi/workos/create_webhook_endpoint.rbi",
|
|
@@ -856,6 +845,10 @@
|
|
|
856
845
|
"rbi/workos/multi_factor_auth.rbi",
|
|
857
846
|
"rbi/workos/new_connect_application_secret.rbi",
|
|
858
847
|
"rbi/workos/organization.rbi",
|
|
848
|
+
"rbi/workos/organization_api_key.rbi",
|
|
849
|
+
"rbi/workos/organization_api_key_owner.rbi",
|
|
850
|
+
"rbi/workos/organization_api_key_with_value.rbi",
|
|
851
|
+
"rbi/workos/organization_api_key_with_value_owner.rbi",
|
|
859
852
|
"rbi/workos/organization_created.rbi",
|
|
860
853
|
"rbi/workos/organization_created_data.rbi",
|
|
861
854
|
"rbi/workos/organization_created_data_domain.rbi",
|
|
@@ -927,8 +920,6 @@
|
|
|
927
920
|
"rbi/workos/reset_password_response.rbi",
|
|
928
921
|
"rbi/workos/revoke_session.rbi",
|
|
929
922
|
"rbi/workos/role.rbi",
|
|
930
|
-
"rbi/workos/role_assignment.rbi",
|
|
931
|
-
"rbi/workos/role_assignment_resource.rbi",
|
|
932
923
|
"rbi/workos/role_created.rbi",
|
|
933
924
|
"rbi/workos/role_created_data.rbi",
|
|
934
925
|
"rbi/workos/role_deleted.rbi",
|
|
@@ -968,6 +959,12 @@
|
|
|
968
959
|
"rbi/workos/update_user_organization_membership.rbi",
|
|
969
960
|
"rbi/workos/update_webhook_endpoint.rbi",
|
|
970
961
|
"rbi/workos/user.rbi",
|
|
962
|
+
"rbi/workos/user_api_key.rbi",
|
|
963
|
+
"rbi/workos/user_api_key_created_data_owner.rbi",
|
|
964
|
+
"rbi/workos/user_api_key_owner.rbi",
|
|
965
|
+
"rbi/workos/user_api_key_revoked_data_owner.rbi",
|
|
966
|
+
"rbi/workos/user_api_key_with_value.rbi",
|
|
967
|
+
"rbi/workos/user_api_key_with_value_owner.rbi",
|
|
971
968
|
"rbi/workos/user_authentication_factor_enroll_response.rbi",
|
|
972
969
|
"rbi/workos/user_consent_option.rbi",
|
|
973
970
|
"rbi/workos/user_consent_option_choice.rbi",
|
|
@@ -981,10 +978,14 @@
|
|
|
981
978
|
"rbi/workos/user_object.rbi",
|
|
982
979
|
"rbi/workos/user_organization_membership.rbi",
|
|
983
980
|
"rbi/workos/user_organization_membership_base_list_data.rbi",
|
|
981
|
+
"rbi/workos/user_role_assignment.rbi",
|
|
982
|
+
"rbi/workos/user_role_assignment_resource.rbi",
|
|
984
983
|
"rbi/workos/user_sessions_impersonator.rbi",
|
|
985
984
|
"rbi/workos/user_sessions_list_item.rbi",
|
|
986
985
|
"rbi/workos/user_updated.rbi",
|
|
987
986
|
"rbi/workos/validate_api_key.rbi",
|
|
987
|
+
"rbi/workos/vault_byok_key_deleted.rbi",
|
|
988
|
+
"rbi/workos/vault_byok_key_deleted_data.rbi",
|
|
988
989
|
"rbi/workos/vault_byok_key_verification_completed.rbi",
|
|
989
990
|
"rbi/workos/vault_byok_key_verification_completed_data.rbi",
|
|
990
991
|
"rbi/workos/vault_data_created.rbi",
|
|
@@ -1038,14 +1039,6 @@
|
|
|
1038
1039
|
"test/workos/test_widgets.rb"
|
|
1039
1040
|
],
|
|
1040
1041
|
"operations": {
|
|
1041
|
-
"POST /api_keys/validations": {
|
|
1042
|
-
"sdkMethod": "create_validation",
|
|
1043
|
-
"service": "api_keys"
|
|
1044
|
-
},
|
|
1045
|
-
"DELETE /api_keys/{id}": {
|
|
1046
|
-
"sdkMethod": "delete_api_key",
|
|
1047
|
-
"service": "api_keys"
|
|
1048
|
-
},
|
|
1049
1042
|
"POST /auth/challenges/{id}/verify": {
|
|
1050
1043
|
"sdkMethod": "verify_challenge",
|
|
1051
1044
|
"service": "multi_factor_auth"
|
|
@@ -1150,6 +1143,10 @@
|
|
|
1150
1143
|
"sdkMethod": "list_memberships_for_resource_by_external_id",
|
|
1151
1144
|
"service": "authorization"
|
|
1152
1145
|
},
|
|
1146
|
+
"GET /authorization/organizations/{organization_id}/resources/{resource_type_slug}/{external_id}/role_assignments": {
|
|
1147
|
+
"sdkMethod": "list_role_assignments_for_resource_by_external_id",
|
|
1148
|
+
"service": "authorization"
|
|
1149
|
+
},
|
|
1153
1150
|
"GET /authorization/resources": {
|
|
1154
1151
|
"sdkMethod": "list_resources",
|
|
1155
1152
|
"service": "authorization"
|
|
@@ -1174,6 +1171,10 @@
|
|
|
1174
1171
|
"sdkMethod": "list_memberships_for_resource",
|
|
1175
1172
|
"service": "authorization"
|
|
1176
1173
|
},
|
|
1174
|
+
"GET /authorization/resources/{resource_id}/role_assignments": {
|
|
1175
|
+
"sdkMethod": "list_role_assignments_for_resource",
|
|
1176
|
+
"service": "authorization"
|
|
1177
|
+
},
|
|
1177
1178
|
"GET /authorization/roles": {
|
|
1178
1179
|
"sdkMethod": "list_environment_roles",
|
|
1179
1180
|
"service": "authorization"
|
|
@@ -1622,6 +1623,10 @@
|
|
|
1622
1623
|
"sdkMethod": "revoke_invitation",
|
|
1623
1624
|
"service": "user_management"
|
|
1624
1625
|
},
|
|
1626
|
+
"GET /user_management/jwt_template": {
|
|
1627
|
+
"sdkMethod": "list_jwt_template",
|
|
1628
|
+
"service": "user_management"
|
|
1629
|
+
},
|
|
1625
1630
|
"PUT /user_management/jwt_template": {
|
|
1626
1631
|
"sdkMethod": "update_jwt_template",
|
|
1627
1632
|
"service": "user_management"
|
|
@@ -1722,6 +1727,22 @@
|
|
|
1722
1727
|
"sdkMethod": "create_token",
|
|
1723
1728
|
"service": "widgets"
|
|
1724
1729
|
},
|
|
1730
|
+
"POST /api_keys/validations": {
|
|
1731
|
+
"sdkMethod": "create_validation",
|
|
1732
|
+
"service": "api_keys"
|
|
1733
|
+
},
|
|
1734
|
+
"DELETE /api_keys/{id}": {
|
|
1735
|
+
"sdkMethod": "delete_api_key",
|
|
1736
|
+
"service": "api_keys"
|
|
1737
|
+
},
|
|
1738
|
+
"GET /user_management/users/{userId}/api_keys": {
|
|
1739
|
+
"sdkMethod": "list_user_api_keys",
|
|
1740
|
+
"service": "user_management"
|
|
1741
|
+
},
|
|
1742
|
+
"POST /user_management/users/{userId}/api_keys": {
|
|
1743
|
+
"sdkMethod": "create_user_api_key",
|
|
1744
|
+
"service": "user_management"
|
|
1745
|
+
},
|
|
1725
1746
|
"GET /audit_logs/actions": {
|
|
1726
1747
|
"sdkMethod": "list_actions",
|
|
1727
1748
|
"service": "audit_logs"
|
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [8.0.1](https://github.com/workos/workos-ruby/compare/v8.0.0...v8.0.1) (2026-05-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* harden session sealing, log redaction, and webhook tolerance checks ([#482](https://github.com/workos/workos-ruby/issues/482)) ([347fe1e](https://github.com/workos/workos-ruby/commit/347fe1edf296778d7ea331e666a7957870074b9f))
|
|
9
|
+
|
|
10
|
+
## [8.0.0](https://github.com/workos/workos-ruby/compare/v7.1.2...v8.0.0) (2026-05-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* **authorization:** Consolidate order enums to PaginationOrder
|
|
16
|
+
* **api_keys:** Separate organization and user API key types
|
|
17
|
+
* **user_management:** Consolidate order enums to PaginationOrder
|
|
18
|
+
* **vault:** Add BYOK key deleted event and consolidate key provider enum
|
|
19
|
+
* **types:** Consolidate pagination order enums
|
|
20
|
+
* **authorization:** Rename RoleAssignment to UserRoleAssignment
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **api_keys:** Separate organization and user API key types ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
25
|
+
* **authorization:** Add new role assignment listing endpoints ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
26
|
+
* **authorization:** Consolidate order enums to PaginationOrder ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
27
|
+
* **authorization:** Rename RoleAssignment to UserRoleAssignment ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
28
|
+
* **directory_sync:** Add name field to directory users ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
29
|
+
* **docs:** publish YARD API docs + llms.txt to GitHub Pages ([#480](https://github.com/workos/workos-ruby/issues/480)) ([117eeac](https://github.com/workos/workos-ruby/commit/117eeac5d25c896c7a9b989592f3525f51e52a3d))
|
|
30
|
+
* **events:** Add admin_portal source to event context actor ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
31
|
+
* **sso:** Add name field to SSO profile ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
32
|
+
* **types:** Consolidate pagination order enums ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
33
|
+
* **user_management:** Add get JWT template endpoint ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
34
|
+
* **user_management:** Add user API key management ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
35
|
+
* **user_management:** Add user field to membership and organization membership ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
36
|
+
* **user_management:** Consolidate order enums to PaginationOrder ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
37
|
+
* **vault:** Add BYOK key deleted event and consolidate key provider enum ([956386a](https://github.com/workos/workos-ruby/commit/956386a27cb0f8a8707442fa98b74a317f3f9920))
|
|
38
|
+
|
|
3
39
|
## [7.1.2](https://github.com/workos/workos-ruby/compare/v7.1.1...v7.1.2) (2026-05-06)
|
|
4
40
|
|
|
5
41
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
workos (
|
|
4
|
+
workos (8.0.1)
|
|
5
5
|
jwt (~> 3.1)
|
|
6
6
|
logger (~> 1.7)
|
|
7
7
|
zeitwerk (~> 2.6)
|
|
@@ -17,7 +17,10 @@ GEM
|
|
|
17
17
|
crack (1.0.1)
|
|
18
18
|
bigdecimal
|
|
19
19
|
rexml
|
|
20
|
+
csv (3.3.5)
|
|
21
|
+
date (3.5.1)
|
|
20
22
|
drb (2.2.3)
|
|
23
|
+
erb (6.0.4)
|
|
21
24
|
hashdiff (1.2.1)
|
|
22
25
|
json (2.19.4)
|
|
23
26
|
jwt (3.1.2)
|
|
@@ -33,10 +36,17 @@ GEM
|
|
|
33
36
|
ast (~> 2.4.1)
|
|
34
37
|
racc
|
|
35
38
|
prism (1.9.0)
|
|
39
|
+
psych (5.3.1)
|
|
40
|
+
date
|
|
41
|
+
stringio
|
|
36
42
|
public_suffix (7.0.5)
|
|
37
43
|
racc (1.8.1)
|
|
38
44
|
rainbow (3.1.1)
|
|
39
45
|
rake (13.4.2)
|
|
46
|
+
rdoc (7.2.0)
|
|
47
|
+
erb
|
|
48
|
+
psych (>= 4.0.0)
|
|
49
|
+
tsort
|
|
40
50
|
regexp_parser (2.12.0)
|
|
41
51
|
rexml (3.4.4)
|
|
42
52
|
rubocop (1.84.2)
|
|
@@ -70,6 +80,8 @@ GEM
|
|
|
70
80
|
standard-performance (1.9.0)
|
|
71
81
|
lint_roller (~> 1.1)
|
|
72
82
|
rubocop-performance (~> 1.26.0)
|
|
83
|
+
stringio (3.2.0)
|
|
84
|
+
tsort (0.2.0)
|
|
73
85
|
unicode-display_width (3.2.0)
|
|
74
86
|
unicode-emoji (~> 4.1)
|
|
75
87
|
unicode-emoji (4.2.0)
|
|
@@ -77,6 +89,12 @@ GEM
|
|
|
77
89
|
addressable (>= 2.8.0)
|
|
78
90
|
crack (>= 0.3.2)
|
|
79
91
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
92
|
+
webrick (1.9.2)
|
|
93
|
+
yard (0.9.43)
|
|
94
|
+
yard-markdown (0.7.1)
|
|
95
|
+
csv
|
|
96
|
+
rdoc
|
|
97
|
+
yard
|
|
80
98
|
zeitwerk (2.7.5)
|
|
81
99
|
|
|
82
100
|
PLATFORMS
|
|
@@ -89,7 +107,10 @@ DEPENDENCIES
|
|
|
89
107
|
rake
|
|
90
108
|
standard (~> 1.49)
|
|
91
109
|
webmock (~> 3.26)
|
|
110
|
+
webrick
|
|
92
111
|
workos!
|
|
112
|
+
yard
|
|
113
|
+
yard-markdown
|
|
93
114
|
|
|
94
115
|
CHECKSUMS
|
|
95
116
|
addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
|
|
@@ -97,7 +118,10 @@ CHECKSUMS
|
|
|
97
118
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
98
119
|
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
99
120
|
crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
|
|
121
|
+
csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f
|
|
122
|
+
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
100
123
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
124
|
+
erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
|
|
101
125
|
hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
|
|
102
126
|
json (2.19.4) sha256=670a7d333fb3b18ca5b29cb255eb7bef099e40d88c02c80bd42a3f30fe5239ac
|
|
103
127
|
jwt (3.1.2) sha256=af6991f19a6bb4060d618d9add7a66f0eeb005ac0bc017cd01f63b42e122d535
|
|
@@ -108,10 +132,12 @@ CHECKSUMS
|
|
|
108
132
|
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
|
|
109
133
|
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
|
|
110
134
|
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
135
|
+
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
|
|
111
136
|
public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
|
|
112
137
|
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
113
138
|
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
114
139
|
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
|
|
140
|
+
rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192
|
|
115
141
|
regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
|
|
116
142
|
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
|
|
117
143
|
rubocop (1.84.2) sha256=5692cea54168f3dc8cb79a6fe95c5424b7ea893c707ad7a4307b0585e88dbf5f
|
|
@@ -121,10 +147,15 @@ CHECKSUMS
|
|
|
121
147
|
standard (1.54.0) sha256=7a4b08f83d9893083c8f03bc486f0feeb6a84d48233b40829c03ef4767ea0100
|
|
122
148
|
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
|
|
123
149
|
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
|
|
150
|
+
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
|
|
151
|
+
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
124
152
|
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
125
153
|
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
126
154
|
webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
|
|
127
|
-
|
|
155
|
+
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
|
|
156
|
+
workos (8.0.1)
|
|
157
|
+
yard (0.9.43) sha256=cf8733a8f0485df2a162927e9b5f182215a61f6d22de096b8f402c726a1c5821
|
|
158
|
+
yard-markdown (0.7.1) sha256=06c378632dfe7ba053be9ba469eb4701aa0470e36bcf7e5546f353eb90c1bfd1
|
|
128
159
|
zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
|
|
129
160
|
|
|
130
161
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -139,6 +139,25 @@ user = WorkOS.client.user_management.create_user(
|
|
|
139
139
|
puts user.id
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
+
### Sealed sessions (cookie_password requirements)
|
|
143
|
+
|
|
144
|
+
When you use `client.session_manager` to seal session cookies, the
|
|
145
|
+
`cookie_password` you supply must be **at least 32 bytes** of high-entropy
|
|
146
|
+
secret material (typically 32 random bytes encoded as base64 or a 64-char
|
|
147
|
+
hex string). The SDK derives the AES-256-GCM key from this password via
|
|
148
|
+
SHA-256, and a passphrase shorter than 32 bytes makes the resulting key
|
|
149
|
+
materially easier to brute-force offline.
|
|
150
|
+
|
|
151
|
+
Generate a suitable secret once and store it as an environment variable:
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
ruby -rsecurerandom -e 'puts SecureRandom.base64(32)'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Anything shorter than 32 bytes (including `nil` or `""`) raises
|
|
158
|
+
`ArgumentError` at SDK init time — sealing or unsealing will not silently
|
|
159
|
+
proceed with a weakened key.
|
|
160
|
+
|
|
142
161
|
### Verify a webhook
|
|
143
162
|
|
|
144
163
|
```ruby
|
data/docs/V7_MIGRATION_GUIDE.md
CHANGED
|
@@ -501,6 +501,27 @@ Session management was one of the largest refactors in v7. The old `WorkOS::Sess
|
|
|
501
501
|
|
|
502
502
|
If your application seals session cookies, refreshes access tokens, or decodes the access-token JWT, every one of these call sites needs to be updated.
|
|
503
503
|
|
|
504
|
+
#### `cookie_password` minimum length (32 bytes)
|
|
505
|
+
|
|
506
|
+
v7 enforces a **minimum 32-byte length** on every `cookie_password` you supply
|
|
507
|
+
to the session manager (`load`, `seal_data`, `unseal_data`,
|
|
508
|
+
`seal_session_from_auth_response`, and the underlying `Encryptors::AesGcm`).
|
|
509
|
+
|
|
510
|
+
Anything shorter — including `nil` or `""` — now raises `ArgumentError` at the
|
|
511
|
+
moment the SDK is asked to seal or unseal. Older deployments that used a
|
|
512
|
+
short passphrase (e.g. a 16-character secret) will start erroring at app
|
|
513
|
+
boot or the next sealed-session request.
|
|
514
|
+
|
|
515
|
+
Pick a 32+ byte secret once and store it as an environment variable:
|
|
516
|
+
|
|
517
|
+
```sh
|
|
518
|
+
ruby -rsecurerandom -e 'puts SecureRandom.base64(32)'
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
The KDF itself (single-pass SHA-256) is unchanged in this release, so
|
|
522
|
+
existing sealed cookies continue to round-trip as long as the same
|
|
523
|
+
(now-length-validated) password is in use.
|
|
524
|
+
|
|
504
525
|
#### Sealing a cookie from an authentication response
|
|
505
526
|
|
|
506
527
|
In v6, you asked `authenticate_with_*` to seal the cookie for you:
|
data/lib/workos/actions.rb
CHANGED
|
@@ -35,7 +35,7 @@ module WorkOS
|
|
|
35
35
|
def verify_header(payload:, sig_header:, secret:, tolerance: DEFAULT_TOLERANCE_SECONDS)
|
|
36
36
|
timestamp_ms, signature_hash = parse_signature_header(sig_header)
|
|
37
37
|
issued_at = timestamp_ms.to_i / 1000.0
|
|
38
|
-
if (Time.now.to_f - issued_at) > tolerance
|
|
38
|
+
if (Time.now.to_f - issued_at).abs > tolerance
|
|
39
39
|
raise WorkOS::SignatureVerificationError.new(
|
|
40
40
|
message: "Timestamp outside the tolerance zone",
|
|
41
41
|
http_status: nil
|
|
@@ -31,7 +31,7 @@ module WorkOS
|
|
|
31
31
|
hash = self.class.normalize(json)
|
|
32
32
|
@object = hash[:object]
|
|
33
33
|
@id = hash[:id]
|
|
34
|
-
@owner = hash[:owner] ? WorkOS::ApiKeyOwner.new(hash[:owner]) : nil
|
|
34
|
+
@owner = hash[:owner] ? (case hash[:owner][:type] when "organization" then WorkOS::ApiKeyOwner.new(hash[:owner]) when "user" then WorkOS::UserApiKeyOwner.new(hash[:owner]) else hash[:owner] end) : nil
|
|
35
35
|
@name = hash[:name]
|
|
36
36
|
@obfuscated_value = hash[:obfuscated_value]
|
|
37
37
|
@last_used_at = hash[:last_used_at]
|
|
@@ -31,7 +31,7 @@ module WorkOS
|
|
|
31
31
|
hash = self.class.normalize(json)
|
|
32
32
|
@object = hash[:object]
|
|
33
33
|
@id = hash[:id]
|
|
34
|
-
@owner = hash[:owner] ? WorkOS::ApiKeyCreatedDataOwner.new(hash[:owner]) : nil
|
|
34
|
+
@owner = hash[:owner] ? (case hash[:owner][:type] when "organization" then WorkOS::ApiKeyCreatedDataOwner.new(hash[:owner]) when "user" then WorkOS::UserApiKeyCreatedDataOwner.new(hash[:owner]) else hash[:owner] end) : nil
|
|
35
35
|
@name = hash[:name]
|
|
36
36
|
@obfuscated_value = hash[:obfuscated_value]
|
|
37
37
|
@last_used_at = hash[:last_used_at]
|