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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88dd804e11c258b4c6d3c285c33195bce2f94e640ce398d730e2866176ed1c11
4
- data.tar.gz: 861cc95f59c23e8f12f86b2149332026c48c09d7382c73c8c9005eacbfd6dfc6
3
+ metadata.gz: 021d4608e686813bec126abd424f6d58dab332fd28c285cd7b5f6f75650e368b
4
+ data.tar.gz: 02a3f2d5b1f60469e43b21fc3eb7e1a0638a8a7274034d140fdd45ec718e027f
5
5
  SHA512:
6
- metadata.gz: a48877cc0d847931a6f7a08e298aa72a7c89acd7c772b5609f72536d3c1428fc86a8f6157df602acb2ff9880cff76964a16822454ac5b59c48b70213d4970530
7
- data.tar.gz: 7a481aee2095853ebcc204369d30f484b76a54dec2edcb5257d00153994ba4339e6ed4aa995b229c6ffdbd82d888d771ab149819c55dce27c0d2882d13cc61c6
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
- # An adverse or step_up decision that needs nothing still counts as handled.
127
- record.call('none', 'applied') unless decision == 'allow'
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 and no applied enforcement at their current risk_version.
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.0"
98
+ @sdk_version = "7.1.2"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 7.1.0 internal 1 noresponse"
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]]) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noresponse
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 7.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoResponse