zyphr 0.1.52 → 0.1.53
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/docs/ApplicationSelf.md +3 -1
- data/docs/SetSelfApplicationTestRecipientsRequest.md +3 -1
- data/lib/zyphr/models/application_self.rb +31 -4
- data/lib/zyphr/models/set_self_application_test_recipients_request.rb +15 -5
- data/spec/models/application_self_spec.rb +6 -0
- data/spec/models/set_self_application_test_recipients_request_spec.rb +6 -0
- data/zyphr.gemspec +1 -1
- 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: c48e48e0a4e1c2a2ea9d58e507adcee64e9cbac7a31c336da15d0ca3b0df3d51
|
|
4
|
+
data.tar.gz: c8accc89829202be56cdcae385e1ffd1df20da4bd89bbb2c46d70944eebe9ad8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3281a542c1412e8722f4a45a9363b956b8aa78133d77d0bd8dc56a9a40e827e88f8f05f8b80d75436786eb50e0772714dcc20c7fa0db00ff61bd86d2162eda3
|
|
7
|
+
data.tar.gz: bb9cd301b7568d3b9ff54f04555f1f1006c8a29a847c0c2f79986e45ac1368aa4d74daae347df7c3ba73f51fed00ac27e83f6d889faf29c2fbb8fe5125878b0a
|
data/docs/ApplicationSelf.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
| **signing_algorithm** | **String** | JWT signing algorithm for this application's end-user tokens. | |
|
|
11
11
|
| **test_recipients** | **Array<String>** | The auth-email allowlist. In `allowlist` mode, only these addresses receive auth emails; in `unrestricted` mode it is ignored. Settable via PATCH /auth/application (sc-7600). | |
|
|
12
12
|
| **auth_email_mode** | **String** | Explicit auth-email gate mode (sc-7673). `unrestricted` sends auth emails to everyone. `allowlist` restricts auth email to `test_recipients` — and an EMPTY allowlist in this mode fails CLOSED (blocks all auth email). This replaces the previous behavior where the gate was inferred from whether `test_recipients` was empty. Defaults to `unrestricted`. | |
|
|
13
|
+
| **password_disallow_breached** | **Boolean** | When true (sc-7680), passwords found in the HaveIBeenPwned breach corpus are rejected at register/reset (and returned `valid:false` by `/auth/password-strength`). When false (default), breach info is advisory only. Fail-open: a breach-source outage never blocks auth. | |
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,7 +23,8 @@ instance = Zyphr::ApplicationSelf.new(
|
|
|
22
23
|
environment: null,
|
|
23
24
|
signing_algorithm: null,
|
|
24
25
|
test_recipients: null,
|
|
25
|
-
auth_email_mode: null
|
|
26
|
+
auth_email_mode: null,
|
|
27
|
+
password_disallow_breached: null
|
|
26
28
|
)
|
|
27
29
|
```
|
|
28
30
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **test_recipients** | **Array<String>** | Email addresses allowed to receive auth emails when auth_email_mode is 'allowlist'. Ignored in 'unrestricted' mode. Optional — omit to leave the current list unchanged. | [optional] |
|
|
8
8
|
| **auth_email_mode** | **String** | Optional (sc-7673). Explicit auth-email gate mode. 'unrestricted' sends to everyone; 'allowlist' restricts to test_recipients (an EMPTY list in allowlist mode fails closed — blocks all auth email). Omit to leave the current mode unchanged. | [optional] |
|
|
9
|
+
| **password_disallow_breached** | **Boolean** | Optional (sc-7680/sc-7697). When true, reject HIBP-breached passwords at register/reset. Omit to leave unchanged. | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,7 +15,8 @@ require 'zyphr'
|
|
|
14
15
|
|
|
15
16
|
instance = Zyphr::SetSelfApplicationTestRecipientsRequest.new(
|
|
16
17
|
test_recipients: null,
|
|
17
|
-
auth_email_mode: null
|
|
18
|
+
auth_email_mode: null,
|
|
19
|
+
password_disallow_breached: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -34,6 +34,9 @@ module Zyphr
|
|
|
34
34
|
# Explicit auth-email gate mode (sc-7673). `unrestricted` sends auth emails to everyone. `allowlist` restricts auth email to `test_recipients` — and an EMPTY allowlist in this mode fails CLOSED (blocks all auth email). This replaces the previous behavior where the gate was inferred from whether `test_recipients` was empty. Defaults to `unrestricted`.
|
|
35
35
|
attr_accessor :auth_email_mode
|
|
36
36
|
|
|
37
|
+
# When true (sc-7680), passwords found in the HaveIBeenPwned breach corpus are rejected at register/reset (and returned `valid:false` by `/auth/password-strength`). When false (default), breach info is advisory only. Fail-open: a breach-source outage never blocks auth.
|
|
38
|
+
attr_accessor :password_disallow_breached
|
|
39
|
+
|
|
37
40
|
class EnumAttributeValidator
|
|
38
41
|
attr_reader :datatype
|
|
39
42
|
attr_reader :allowable_values
|
|
@@ -64,7 +67,8 @@ module Zyphr
|
|
|
64
67
|
:'environment' => :'environment',
|
|
65
68
|
:'signing_algorithm' => :'signing_algorithm',
|
|
66
69
|
:'test_recipients' => :'test_recipients',
|
|
67
|
-
:'auth_email_mode' => :'auth_email_mode'
|
|
70
|
+
:'auth_email_mode' => :'auth_email_mode',
|
|
71
|
+
:'password_disallow_breached' => :'password_disallow_breached'
|
|
68
72
|
}
|
|
69
73
|
end
|
|
70
74
|
|
|
@@ -86,7 +90,8 @@ module Zyphr
|
|
|
86
90
|
:'environment' => :'String',
|
|
87
91
|
:'signing_algorithm' => :'String',
|
|
88
92
|
:'test_recipients' => :'Array<String>',
|
|
89
|
-
:'auth_email_mode' => :'String'
|
|
93
|
+
:'auth_email_mode' => :'String',
|
|
94
|
+
:'password_disallow_breached' => :'Boolean'
|
|
90
95
|
}
|
|
91
96
|
end
|
|
92
97
|
|
|
@@ -150,6 +155,12 @@ module Zyphr
|
|
|
150
155
|
else
|
|
151
156
|
self.auth_email_mode = nil
|
|
152
157
|
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'password_disallow_breached')
|
|
160
|
+
self.password_disallow_breached = attributes[:'password_disallow_breached']
|
|
161
|
+
else
|
|
162
|
+
self.password_disallow_breached = nil
|
|
163
|
+
end
|
|
153
164
|
end
|
|
154
165
|
|
|
155
166
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -177,6 +188,10 @@ module Zyphr
|
|
|
177
188
|
invalid_properties.push('invalid value for "auth_email_mode", auth_email_mode cannot be nil.')
|
|
178
189
|
end
|
|
179
190
|
|
|
191
|
+
if @password_disallow_breached.nil?
|
|
192
|
+
invalid_properties.push('invalid value for "password_disallow_breached", password_disallow_breached cannot be nil.')
|
|
193
|
+
end
|
|
194
|
+
|
|
180
195
|
invalid_properties
|
|
181
196
|
end
|
|
182
197
|
|
|
@@ -195,6 +210,7 @@ module Zyphr
|
|
|
195
210
|
return false if @auth_email_mode.nil?
|
|
196
211
|
auth_email_mode_validator = EnumAttributeValidator.new('String', ["allowlist", "unrestricted"])
|
|
197
212
|
return false unless auth_email_mode_validator.valid?(@auth_email_mode)
|
|
213
|
+
return false if @password_disallow_breached.nil?
|
|
198
214
|
true
|
|
199
215
|
end
|
|
200
216
|
|
|
@@ -258,6 +274,16 @@ module Zyphr
|
|
|
258
274
|
@auth_email_mode = auth_email_mode
|
|
259
275
|
end
|
|
260
276
|
|
|
277
|
+
# Custom attribute writer method with validation
|
|
278
|
+
# @param [Object] password_disallow_breached Value to be assigned
|
|
279
|
+
def password_disallow_breached=(password_disallow_breached)
|
|
280
|
+
if password_disallow_breached.nil?
|
|
281
|
+
fail ArgumentError, 'password_disallow_breached cannot be nil'
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
@password_disallow_breached = password_disallow_breached
|
|
285
|
+
end
|
|
286
|
+
|
|
261
287
|
# Checks equality by comparing each attribute.
|
|
262
288
|
# @param [Object] Object to be compared
|
|
263
289
|
def ==(o)
|
|
@@ -268,7 +294,8 @@ module Zyphr
|
|
|
268
294
|
environment == o.environment &&
|
|
269
295
|
signing_algorithm == o.signing_algorithm &&
|
|
270
296
|
test_recipients == o.test_recipients &&
|
|
271
|
-
auth_email_mode == o.auth_email_mode
|
|
297
|
+
auth_email_mode == o.auth_email_mode &&
|
|
298
|
+
password_disallow_breached == o.password_disallow_breached
|
|
272
299
|
end
|
|
273
300
|
|
|
274
301
|
# @see the `==` method
|
|
@@ -280,7 +307,7 @@ module Zyphr
|
|
|
280
307
|
# Calculates hash code according to all attributes.
|
|
281
308
|
# @return [Integer] Hash code
|
|
282
309
|
def hash
|
|
283
|
-
[id, name, environment, signing_algorithm, test_recipients, auth_email_mode].hash
|
|
310
|
+
[id, name, environment, signing_algorithm, test_recipients, auth_email_mode, password_disallow_breached].hash
|
|
284
311
|
end
|
|
285
312
|
|
|
286
313
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zyphr
|
|
17
|
-
# Provide test_recipients
|
|
17
|
+
# Provide any of test_recipients, auth_email_mode, or password_disallow_breached. Omitting one leaves that value unchanged; sending none is a 400. Unknown fields are rejected (400).
|
|
18
18
|
class SetSelfApplicationTestRecipientsRequest
|
|
19
19
|
# Email addresses allowed to receive auth emails when auth_email_mode is 'allowlist'. Ignored in 'unrestricted' mode. Optional — omit to leave the current list unchanged.
|
|
20
20
|
attr_accessor :test_recipients
|
|
@@ -22,6 +22,9 @@ module Zyphr
|
|
|
22
22
|
# Optional (sc-7673). Explicit auth-email gate mode. 'unrestricted' sends to everyone; 'allowlist' restricts to test_recipients (an EMPTY list in allowlist mode fails closed — blocks all auth email). Omit to leave the current mode unchanged.
|
|
23
23
|
attr_accessor :auth_email_mode
|
|
24
24
|
|
|
25
|
+
# Optional (sc-7680/sc-7697). When true, reject HIBP-breached passwords at register/reset. Omit to leave unchanged.
|
|
26
|
+
attr_accessor :password_disallow_breached
|
|
27
|
+
|
|
25
28
|
class EnumAttributeValidator
|
|
26
29
|
attr_reader :datatype
|
|
27
30
|
attr_reader :allowable_values
|
|
@@ -48,7 +51,8 @@ module Zyphr
|
|
|
48
51
|
def self.attribute_map
|
|
49
52
|
{
|
|
50
53
|
:'test_recipients' => :'test_recipients',
|
|
51
|
-
:'auth_email_mode' => :'auth_email_mode'
|
|
54
|
+
:'auth_email_mode' => :'auth_email_mode',
|
|
55
|
+
:'password_disallow_breached' => :'password_disallow_breached'
|
|
52
56
|
}
|
|
53
57
|
end
|
|
54
58
|
|
|
@@ -66,7 +70,8 @@ module Zyphr
|
|
|
66
70
|
def self.openapi_types
|
|
67
71
|
{
|
|
68
72
|
:'test_recipients' => :'Array<String>',
|
|
69
|
-
:'auth_email_mode' => :'String'
|
|
73
|
+
:'auth_email_mode' => :'String',
|
|
74
|
+
:'password_disallow_breached' => :'Boolean'
|
|
70
75
|
}
|
|
71
76
|
end
|
|
72
77
|
|
|
@@ -101,6 +106,10 @@ module Zyphr
|
|
|
101
106
|
if attributes.key?(:'auth_email_mode')
|
|
102
107
|
self.auth_email_mode = attributes[:'auth_email_mode']
|
|
103
108
|
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'password_disallow_breached')
|
|
111
|
+
self.password_disallow_breached = attributes[:'password_disallow_breached']
|
|
112
|
+
end
|
|
104
113
|
end
|
|
105
114
|
|
|
106
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -136,7 +145,8 @@ module Zyphr
|
|
|
136
145
|
return true if self.equal?(o)
|
|
137
146
|
self.class == o.class &&
|
|
138
147
|
test_recipients == o.test_recipients &&
|
|
139
|
-
auth_email_mode == o.auth_email_mode
|
|
148
|
+
auth_email_mode == o.auth_email_mode &&
|
|
149
|
+
password_disallow_breached == o.password_disallow_breached
|
|
140
150
|
end
|
|
141
151
|
|
|
142
152
|
# @see the `==` method
|
|
@@ -148,7 +158,7 @@ module Zyphr
|
|
|
148
158
|
# Calculates hash code according to all attributes.
|
|
149
159
|
# @return [Integer] Hash code
|
|
150
160
|
def hash
|
|
151
|
-
[test_recipients, auth_email_mode].hash
|
|
161
|
+
[test_recipients, auth_email_mode, password_disallow_breached].hash
|
|
152
162
|
end
|
|
153
163
|
|
|
154
164
|
# Builds the object from hash
|
|
@@ -43,4 +43,10 @@ describe Zyphr::SetSelfApplicationTestRecipientsRequest do
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
describe 'test attribute "password_disallow_breached"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
46
52
|
end
|
data/zyphr.gemspec
CHANGED