noresponse 7.1.0 → 7.1.2
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/lib/no_response/late_results.rb +5 -3
- data/lib/no_response/models/operations/listaccounts_request.rb +1 -1
- data/lib/no_response/models/shared/enforcement.rb +1 -1
- data/lib/no_response/models/shared/enforcementaction.rb +2 -1
- data/lib/no_response/models/shared/enforcementrequest.rb +1 -1
- data/lib/no_response/sdkconfiguration.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 021d4608e686813bec126abd424f6d58dab332fd28c285cd7b5f6f75650e368b
|
|
4
|
+
data.tar.gz: 02a3f2d5b1f60469e43b21fc3eb7e1a0638a8a7274034d140fdd45ec718e027f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 518cdf97de4f13ac34e54d60d193feefd4e4d36b99e05e453e9160997400168a21c614a8145fae02dbae31d4b7de07ec7d3477be0dda027409dd4d010068930a
|
|
7
|
+
data.tar.gz: 2a7eda5b4304be2347af38c4ea13cf8c39d0d6b18d429f66f0cc3e793dfd793753ca1724ed5a400487cb2b8165d91bb1ce84aa653a749c24367420c1bab238f6
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
# account is in your own flow, and takes the actions the table names for that
|
|
11
11
|
# state and the decision of its flow:
|
|
12
12
|
#
|
|
13
|
+
# onboarding account_creation allow activate
|
|
13
14
|
# onboarding account_creation review/block fail_onboarding, revoke_sessions
|
|
15
|
+
# provisional account_creation allow activate
|
|
14
16
|
# provisional account_creation review/block reject_activation, revoke_sessions
|
|
15
17
|
# active login review revoke_sessions
|
|
16
18
|
# active login block restrict, revoke_sessions
|
|
@@ -27,7 +29,7 @@ require 'json'
|
|
|
27
29
|
|
|
28
30
|
module NoResponse
|
|
29
31
|
module LateResults
|
|
30
|
-
TABLE = JSON.parse('{"lifecycle":{"onboarding":{"flow":"account_creation","on":{"review":["fail_onboarding","revoke_sessions"],"block":["fail_onboarding","revoke_sessions"]}},"provisional":{"flow":"account_creation","on":{"review":["reject_activation","revoke_sessions"],"block":["reject_activation","revoke_sessions"]}},"active":{"flow":"login","on":{"review":["revoke_sessions"],"block":["restrict","revoke_sessions"]}},"restricted":{"flow":"login","on":{},"reinstate":{"allow":["unrestrict"]}},"rejected":{"flow":"account_creation","on":{}}},"providers":{"clerk":{"base_url":"https://api.clerk.com/v1","actions":{"fail_onboarding":[{"call":{"method":"POST","path":"/users/{user}/ban"}}],"reject_activation":[{"call":{"method":"POST","path":"/users/{user}/ban"}}],"restrict":[{"call":{"method":"POST","path":"/users/{user}/ban"}}],"unrestrict":[{"call":{"method":"POST","path":"/users/{user}/unban"}}],"revoke_sessions":[{"each":{"list":{"method":"GET","path":"/sessions","query":{"user_id":"{user}","status":"active","limit":"100"}},"page":{"kind":"offset","param":"offset","size":100},"where":{"status":"active"}},"call":{"method":"POST","path":"/sessions/{item}/revoke"}}]}},"workos":{"base_url":"https://api.workos.com","actions":{"fail_onboarding":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":"onboarding_failed"}}}}],"reject_activation":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":"activation_rejected"}}}}],"restrict":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":"restricted"}}}}],"unrestrict":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":null}}}}],"revoke_sessions":[{"each":{"list":{"method":"GET","path":"/user_management/users/{user}/sessions","query":{"limit":"100"}},"page":{"kind":"cursor","param":"after","next":["list_metadata","after"]},"where":{"status":"active"}},"call":{"method":"POST","path":"/user_management/sessions/revoke","body":{"session_id":"{item}"}}}]}},"auth0":{"base_url":"https://{domain}/api/v2","actions":{"fail_onboarding":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}],"reject_activation":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}],"restrict":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}],"unrestrict":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":false}}}],"revoke_sessions":[{"call":{"method":"DELETE","path":"/users/{user}/sessions"},"fallback":{"status":403,"code":"feature_not_enabled","reports":"restrict","steps":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}]}},{"call":{"method":"DELETE","path":"/users/{user}/refresh-tokens"},"fallback":{"status":403,"code":"feature_not_enabled","steps":[{"each":{"list":{"method":"GET","path":"/device-credentials","query":{"user_id":"{user}","type":"refresh_token","per_page":"100"}},"page":{"kind":"index","param":"page","size":100}},"call":{"method":"DELETE","path":"/device-credentials/{item}"}},{"each":{"list":{"method":"GET","path":"/device-credentials","query":{"user_id":"{user}","type":"rotating_refresh_token","per_page":"100"}},"page":{"kind":"index","param":"page","size":100}},"call":{"method":"DELETE","path":"/device-credentials/{item}"}}]}}]}}},"limits":{"retries":4,"budget_ms":3000,"backoff_ms":250,"max_pages":100}}').freeze
|
|
32
|
+
TABLE = JSON.parse('{"lifecycle":{"onboarding":{"flow":"account_creation","on":{"allow":["activate"],"review":["fail_onboarding","revoke_sessions"],"block":["fail_onboarding","revoke_sessions"]}},"provisional":{"flow":"account_creation","on":{"allow":["activate"],"review":["reject_activation","revoke_sessions"],"block":["reject_activation","revoke_sessions"]}},"active":{"flow":"login","on":{"review":["revoke_sessions"],"block":["restrict","revoke_sessions"]}},"restricted":{"flow":"login","on":{},"reinstate":{"allow":["unrestrict"]}},"rejected":{"flow":"account_creation","on":{}}},"providers":{"clerk":{"base_url":"https://api.clerk.com/v1","actions":{"fail_onboarding":[{"call":{"method":"POST","path":"/users/{user}/ban"}}],"reject_activation":[{"call":{"method":"POST","path":"/users/{user}/ban"}}],"activate":[],"restrict":[{"call":{"method":"POST","path":"/users/{user}/ban"}}],"unrestrict":[{"call":{"method":"POST","path":"/users/{user}/unban"}}],"revoke_sessions":[{"each":{"list":{"method":"GET","path":"/sessions","query":{"user_id":"{user}","status":"active","limit":"100"}},"page":{"kind":"offset","param":"offset","size":100},"where":{"status":"active"}},"call":{"method":"POST","path":"/sessions/{item}/revoke"}}]}},"workos":{"base_url":"https://api.workos.com","actions":{"fail_onboarding":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":"onboarding_failed"}}}}],"reject_activation":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":"activation_rejected"}}}}],"activate":[],"restrict":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":"restricted"}}}}],"unrestrict":[{"call":{"method":"PUT","path":"/user_management/users/{user}","body":{"metadata":{"noresponse_state":null}}}}],"revoke_sessions":[{"each":{"list":{"method":"GET","path":"/user_management/users/{user}/sessions","query":{"limit":"100"}},"page":{"kind":"cursor","param":"after","next":["list_metadata","after"]},"where":{"status":"active"}},"call":{"method":"POST","path":"/user_management/sessions/revoke","body":{"session_id":"{item}"}}}]}},"auth0":{"base_url":"https://{domain}/api/v2","actions":{"fail_onboarding":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}],"reject_activation":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}],"activate":[],"restrict":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}],"unrestrict":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":false}}}],"revoke_sessions":[{"call":{"method":"DELETE","path":"/users/{user}/sessions"},"fallback":{"status":403,"code":"feature_not_enabled","reports":"restrict","steps":[{"call":{"method":"PATCH","path":"/users/{user}","body":{"blocked":true}}}]}},{"call":{"method":"DELETE","path":"/users/{user}/refresh-tokens"},"fallback":{"status":403,"code":"feature_not_enabled","steps":[{"each":{"list":{"method":"GET","path":"/device-credentials","query":{"user_id":"{user}","type":"refresh_token","per_page":"100"}},"page":{"kind":"index","param":"page","size":100}},"call":{"method":"DELETE","path":"/device-credentials/{item}"}},{"each":{"list":{"method":"GET","path":"/device-credentials","query":{"user_id":"{user}","type":"rotating_refresh_token","per_page":"100"}},"page":{"kind":"index","param":"page","size":100}},"call":{"method":"DELETE","path":"/device-credentials/{item}"}}]}}]}}},"limits":{"retries":4,"budget_ms":3000,"backoff_ms":250,"max_pages":100}}').freeze
|
|
31
33
|
LIMITS = TABLE.fetch('limits')
|
|
32
34
|
# Every action a provider runs, as the table names them.
|
|
33
35
|
ACTIONS = TABLE.fetch('providers').values.first.fetch('actions').keys.freeze
|
|
@@ -123,8 +125,8 @@ module NoResponse
|
|
|
123
125
|
end
|
|
124
126
|
|
|
125
127
|
if actions.nil? || actions.empty?
|
|
126
|
-
#
|
|
127
|
-
record.call('none', 'applied')
|
|
128
|
+
# A decision that needs nothing, allow too, still counts as handled, so the account leaves the unenforced feed.
|
|
129
|
+
record.call('none', 'applied')
|
|
128
130
|
return EnforcementResult.new(account: account, state: state, risk_version: risk_version, enforcements: enforcements)
|
|
129
131
|
end
|
|
130
132
|
|
|
@@ -21,7 +21,7 @@ module NoResponse
|
|
|
21
21
|
Crystalline::Nilable.new(::Integer),
|
|
22
22
|
{'query_param': {'field_name': "limit", 'style': "form", 'explode': true}}
|
|
23
23
|
)
|
|
24
|
-
# true lists only accounts with a decision other than allow for some flow
|
|
24
|
+
# true lists only accounts with no applied enforcement at their current risk_version that have a decision other than allow for some flow or a hold no later applied enforcement resolved.
|
|
25
25
|
field(
|
|
26
26
|
:unenforced,
|
|
27
27
|
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
@@ -35,7 +35,7 @@ module NoResponse
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
)
|
|
38
|
-
# What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action).
|
|
38
|
+
# What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account), activate (let a held onboarding or provisional account in) or none (decided to take no action).
|
|
39
39
|
field(
|
|
40
40
|
:action,
|
|
41
41
|
Models::Shared::EnforcementAction,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module NoResponse
|
|
5
5
|
module Models
|
|
6
6
|
module Shared
|
|
7
|
-
# EnforcementAction - What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action).
|
|
7
|
+
# EnforcementAction - What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account), activate (let a held onboarding or provisional account in) or none (decided to take no action).
|
|
8
8
|
class EnforcementAction
|
|
9
9
|
include ::Crystalline::Enum
|
|
10
10
|
enums do
|
|
@@ -13,6 +13,7 @@ module NoResponse
|
|
|
13
13
|
UNRESTRICT = new("unrestrict")
|
|
14
14
|
FAIL_ONBOARDING = new("fail_onboarding")
|
|
15
15
|
REJECT_ACTIVATION = new("reject_activation")
|
|
16
|
+
ACTIVATE = new("activate")
|
|
16
17
|
NONE = new("none")
|
|
17
18
|
end
|
|
18
19
|
|
|
@@ -27,7 +27,7 @@ module NoResponse
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
)
|
|
30
|
-
# What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action).
|
|
30
|
+
# What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account), activate (let a held onboarding or provisional account in) or none (decided to take no action).
|
|
31
31
|
field(
|
|
32
32
|
:action,
|
|
33
33
|
Models::Shared::EnforcementAction,
|
|
@@ -95,9 +95,9 @@ module NoResponse
|
|
|
95
95
|
|
|
96
96
|
@language = "ruby"
|
|
97
97
|
@openapi_doc_version = "1"
|
|
98
|
-
@sdk_version = "7.1.
|
|
98
|
+
@sdk_version = "7.1.2"
|
|
99
99
|
@gen_version = "internal"
|
|
100
|
-
@user_agent = "noresponse-sdk/ruby 7.1.
|
|
100
|
+
@user_agent = "noresponse-sdk/ruby 7.1.2 internal 1 noresponse"
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
sig { returns([String, T::Hash[Symbol, String]]) }
|