workos 2.1.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +13 -39
- data/Gemfile.lock +2 -2
- data/README.md +4 -0
- data/lib/workos/audit_trail.rb +1 -0
- data/lib/workos/challenge.rb +55 -0
- data/lib/workos/client.rb +2 -0
- data/lib/workos/connection.rb +1 -0
- data/lib/workos/deprecated_hash_wrapper.rb +76 -0
- data/lib/workos/directory.rb +1 -0
- data/lib/workos/directory_group.rb +22 -2
- data/lib/workos/directory_sync.rb +12 -8
- data/lib/workos/directory_user.rb +9 -1
- data/lib/workos/errors.rb +3 -1
- data/lib/workos/factor.rb +54 -0
- data/lib/workos/hash_provider.rb +19 -0
- data/lib/workos/mfa.rb +165 -0
- data/lib/workos/organization.rb +1 -0
- data/lib/workos/organizations.rb +1 -0
- data/lib/workos/profile.rb +1 -0
- data/lib/workos/profile_and_token.rb +1 -0
- data/lib/workos/sso.rb +1 -0
- data/lib/workos/types/challenge_struct.rb +18 -0
- data/lib/workos/types/directory_group_struct.rb +5 -0
- data/lib/workos/types/factor_struct.rb +18 -0
- data/lib/workos/types/passwordless_session_struct.rb +2 -0
- data/lib/workos/types/verify_factor_struct.rb +13 -0
- data/lib/workos/types.rb +3 -0
- data/lib/workos/verify_factor.rb +40 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhook.rb +1 -0
- data/lib/workos/webhooks.rb +1 -1
- data/lib/workos.rb +7 -0
- data/spec/lib/workos/directory_sync_spec.rb +26 -18
- data/spec/lib/workos/directory_user_spec.rb +36 -0
- data/spec/lib/workos/mfa_spec.rb +262 -0
- data/spec/lib/workos/sso_spec.rb +0 -2
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml +48 -28
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +46 -32
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +47 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +46 -34
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +41 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_no_options.yml +36 -26
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +38 -28
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/delete_factor.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_expired.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_invalid.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid_is_false.yml +82 -0
- metadata +42 -3
@@ -0,0 +1,262 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# typed: false
|
3
|
+
|
4
|
+
describe WorkOS::MFA do
|
5
|
+
it_behaves_like 'client'
|
6
|
+
|
7
|
+
describe 'enroll_factor valid requests' do
|
8
|
+
context 'enroll factor using valid generic argument' do
|
9
|
+
it 'returns a valid factor object' do
|
10
|
+
VCR.use_cassette 'mfa/enroll_factor_generic_valid' do
|
11
|
+
factor = described_class.enroll_factor(
|
12
|
+
type: 'generic_otp',
|
13
|
+
)
|
14
|
+
expect(factor.type == 'generic_otp')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'enroll factor using valid totp arguments' do
|
20
|
+
it 'returns a valid factor object' do
|
21
|
+
VCR.use_cassette 'mfa/enroll_factor_totp_valid' do
|
22
|
+
factor = described_class.enroll_factor(
|
23
|
+
type: 'totp',
|
24
|
+
totp_issuer: 'WorkOS',
|
25
|
+
totp_user: 'some_user',
|
26
|
+
)
|
27
|
+
expect(factor.totp.instance_of?(Hash))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'enroll factor using valid sms arguments' do
|
33
|
+
it 'returns a valid factor object' do
|
34
|
+
VCR.use_cassette 'mfa/enroll_factor_sms_valid' do
|
35
|
+
factor = described_class.enroll_factor(
|
36
|
+
type: 'sms',
|
37
|
+
phone_number: '55555555555',
|
38
|
+
)
|
39
|
+
expect(factor.sms.instance_of?(Hash))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'enroll_factor invalid responses' do
|
46
|
+
context 'enroll factor throws error if type is not sms or totp' do
|
47
|
+
it 'returns an error' do
|
48
|
+
expect do
|
49
|
+
described_class.enroll_factor(
|
50
|
+
type: 'invalid',
|
51
|
+
phone_number: '+15005550006',
|
52
|
+
)
|
53
|
+
end.to raise_error(
|
54
|
+
ArgumentError,
|
55
|
+
"Type argument must be either 'sms' or 'totp'",
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'enroll factor throws error if type is not sms or totp' do
|
61
|
+
it 'returns an error' do
|
62
|
+
expect do
|
63
|
+
described_class.enroll_factor(
|
64
|
+
type: 'totp',
|
65
|
+
totp_issuer: 'WorkOS',
|
66
|
+
)
|
67
|
+
end.to raise_error(
|
68
|
+
ArgumentError,
|
69
|
+
'Incomplete arguments. Need to specify both totp_issuer and totp_user when type is totp',
|
70
|
+
)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
context 'enroll factor throws error if type sms and phone number is nil' do
|
74
|
+
it 'returns an error' do
|
75
|
+
expect do
|
76
|
+
described_class.enroll_factor(
|
77
|
+
type: 'sms',
|
78
|
+
)
|
79
|
+
end.to raise_error(
|
80
|
+
ArgumentError,
|
81
|
+
'Incomplete arguments. Need to specify phone_number when type is sms',
|
82
|
+
)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
describe 'challenge factor with valid request arguments' do
|
88
|
+
context 'challenge with totp' do
|
89
|
+
it 'returns challenge factor object for totp' do
|
90
|
+
VCR.use_cassette 'mfa/challenge_factor_totp_valid' do
|
91
|
+
challenge_factor = described_class.challenge_factor(
|
92
|
+
authentication_factor_id: 'auth_factor_01FZ4TS0MWPZR7GATS7KCXANQZ',
|
93
|
+
)
|
94
|
+
expect(challenge_factor.authentication_factor_id.class.instance_of?(String))
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
context 'challenge with sms' do
|
100
|
+
it 'returns a challenge factor object for sms' do
|
101
|
+
VCR.use_cassette 'mfa/challenge_factor_sms_valid' do
|
102
|
+
challenge_factor = described_class.challenge_factor(
|
103
|
+
authentication_factor_id: 'auth_factor_01FZ4TS14D1PHFNZ9GF6YD8M1F',
|
104
|
+
sms_template: 'Your code is {{code}}',
|
105
|
+
)
|
106
|
+
expect(challenge_factor.authentication_factor_id.instance_of?(String))
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
context 'challenge with generic' do
|
112
|
+
it 'returns a valid challenge factor object for generic otp' do
|
113
|
+
VCR.use_cassette 'mfa/challenge_factor_generic_valid' do
|
114
|
+
challenge_factor = described_class.challenge_factor(
|
115
|
+
authentication_factor_id: 'auth_factor_01FZ4WMXXA09XF6NK1XMKNWB3M',
|
116
|
+
)
|
117
|
+
expect(challenge_factor.code.instance_of?(String))
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe 'challenge factor with invalid arguments' do
|
124
|
+
context 'challenge with totp mssing authentication_factor_id' do
|
125
|
+
it 'returns argument error' do
|
126
|
+
expect do
|
127
|
+
described_class.challenge_factor
|
128
|
+
end.to raise_error(
|
129
|
+
ArgumentError,
|
130
|
+
"Incomplete arguments: 'authentication_factor_id' is a required argument",
|
131
|
+
)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
describe 'challenge factor with valid requests' do
|
137
|
+
context 'verify generic otp' do
|
138
|
+
it 'returns a true boolean if the challenge has not been verifed yet' do
|
139
|
+
VCR.use_cassette 'mfa/verify_factor_generic_valid' do
|
140
|
+
verify_factor = described_class.verify_factor(
|
141
|
+
authentication_challenge_id: 'auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J',
|
142
|
+
code: '897792',
|
143
|
+
)
|
144
|
+
expect(verify_factor.valid == 'true')
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
context 'verify generic otp invalid response' do
|
150
|
+
it 'returns a true boolean if the challenge has not been verifed yet' do
|
151
|
+
VCR.use_cassette 'mfa/verify_factor_generic_valid_is_false' do
|
152
|
+
verify_factor = described_class.verify_factor(
|
153
|
+
authentication_challenge_id: 'auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J',
|
154
|
+
code: '897792',
|
155
|
+
)
|
156
|
+
expect(verify_factor.valid == 'false')
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
context 'verify generic otp' do
|
162
|
+
it 'returns error that the challenge has already been verfied' do
|
163
|
+
VCR.use_cassette 'mfa/verify_factor_generic_invalid' do
|
164
|
+
expect do
|
165
|
+
described_class.verify_factor(
|
166
|
+
authentication_challenge_id: 'auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J',
|
167
|
+
code: '897792',
|
168
|
+
)
|
169
|
+
end.to raise_error(WorkOS::InvalidRequestError)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
context 'verify generic otp' do
|
174
|
+
it 'returns error that the challenge has expired' do
|
175
|
+
VCR.use_cassette 'mfa/verify_factor_generic_expired' do
|
176
|
+
expect do
|
177
|
+
described_class.verify_factor(
|
178
|
+
authentication_challenge_id: 'auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J',
|
179
|
+
code: '897792',
|
180
|
+
)
|
181
|
+
end.to raise_error(WorkOS::InvalidRequestError)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
describe 'verify_factor with invalid argument' do
|
189
|
+
context 'missing code argument' do
|
190
|
+
it 'returns argument error' do
|
191
|
+
expect do
|
192
|
+
described_class.verify_factor(
|
193
|
+
authentication_challenge_id: 'auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J',
|
194
|
+
)
|
195
|
+
end.to raise_error(
|
196
|
+
ArgumentError,
|
197
|
+
"Incomplete arguments: 'authentication_challenge_id' and 'code' are required arguments",
|
198
|
+
)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
context 'missing authentication_challenge_id argument' do
|
203
|
+
it 'returns and error' do
|
204
|
+
expect do
|
205
|
+
described_class.verify_factor(
|
206
|
+
code: '897792',
|
207
|
+
)
|
208
|
+
end.to raise_error(
|
209
|
+
ArgumentError,
|
210
|
+
"Incomplete arguments: 'authentication_challenge_id' and 'code' are required arguments",
|
211
|
+
)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
context 'missing code and authentication_challenge_id arguments' do
|
216
|
+
it 'returns argument error' do
|
217
|
+
expect do
|
218
|
+
described_class.verify_factor
|
219
|
+
end.to raise_error(
|
220
|
+
ArgumentError,
|
221
|
+
"Incomplete arguments: 'authentication_challenge_id' and 'code' are required arguments",
|
222
|
+
)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
describe 'tests returning and deleting a factor' do
|
228
|
+
context 'returns a factor' do
|
229
|
+
it 'uses get_factor to return factor' do
|
230
|
+
VCR.use_cassette 'mfa/get_factor_valid' do
|
231
|
+
factor = described_class.get_factor(
|
232
|
+
id: 'auth_factor_01FZ4WMXXA09XF6NK1XMKNWB3M',
|
233
|
+
)
|
234
|
+
expect(factor.id.instance_of?(String))
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
context 'invalid factor request' do
|
240
|
+
it 'uses get_factor and throws error if id is wrong' do
|
241
|
+
VCR.use_cassette 'mfa/get_factor_invalid' do
|
242
|
+
expect do
|
243
|
+
described_class.get_factor(
|
244
|
+
id: 'auth_factor_invalid',
|
245
|
+
)
|
246
|
+
end.to raise_error(WorkOS::APIError)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
context 'deletes facotr' do
|
252
|
+
it 'uses delete_factor to delete factor' do
|
253
|
+
VCR.use_cassette 'mfa/delete_factor' do
|
254
|
+
response = described_class.delete_factor(
|
255
|
+
id: 'auth_factor_01FZ4WMXXA09XF6NK1XMKNWB3M',
|
256
|
+
)
|
257
|
+
expect(response).to be(true)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
data/spec/lib/workos/sso_spec.rb
CHANGED
@@ -20,7 +20,6 @@ describe WorkOS::SSO do
|
|
20
20
|
end
|
21
21
|
it 'returns a valid URL' do
|
22
22
|
authorization_url = described_class.authorization_url(**args)
|
23
|
-
|
24
23
|
expect(URI.parse(authorization_url)).to be_a URI
|
25
24
|
end
|
26
25
|
|
@@ -315,7 +314,6 @@ describe WorkOS::SSO do
|
|
315
314
|
verified_email: true,
|
316
315
|
},
|
317
316
|
}
|
318
|
-
|
319
317
|
expect(profile.to_json).to eq(expectation)
|
320
318
|
end
|
321
319
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.workos.com/directory_groups/
|
5
|
+
uri: https://api.workos.com/directory_groups/directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
User-Agent:
|
17
|
-
- WorkOS; ruby/
|
17
|
+
- WorkOS; ruby/3.0.2; x86_64-darwin19; v2.1.1
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -22,41 +22,61 @@ http_interactions:
|
|
22
22
|
code: 200
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
|
-
|
26
|
-
-
|
25
|
+
Date:
|
26
|
+
- Tue, 07 Jun 2022 22:28:37 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
27
31
|
Connection:
|
28
32
|
- keep-alive
|
29
|
-
Vary:
|
30
|
-
- Origin, Accept-Encoding
|
31
33
|
Access-Control-Allow-Credentials:
|
32
34
|
- 'true'
|
33
|
-
|
34
|
-
- '
|
35
|
-
|
36
|
-
|
35
|
+
Content-Security-Policy:
|
36
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
37
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
38
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
39
|
+
Etag:
|
40
|
+
- W/"244-4TugYfq6OLpdb2GYu9NN0Z83S0g"
|
41
|
+
Expect-Ct:
|
42
|
+
- max-age=0
|
43
|
+
Referrer-Policy:
|
44
|
+
- no-referrer
|
37
45
|
Strict-Transport-Security:
|
38
46
|
- max-age=15552000; includeSubDomains
|
39
|
-
|
40
|
-
-
|
47
|
+
Vary:
|
48
|
+
- Origin, Accept-Encoding
|
49
|
+
Via:
|
50
|
+
- 1.1 spaces-router (664a92218d61)
|
41
51
|
X-Content-Type-Options:
|
42
52
|
- nosniff
|
43
|
-
X-
|
44
|
-
-
|
53
|
+
X-Dns-Prefetch-Control:
|
54
|
+
- 'off'
|
55
|
+
X-Download-Options:
|
56
|
+
- noopen
|
57
|
+
X-Frame-Options:
|
58
|
+
- SAMEORIGIN
|
59
|
+
X-Permitted-Cross-Domain-Policies:
|
60
|
+
- none
|
45
61
|
X-Request-Id:
|
46
|
-
-
|
47
|
-
|
48
|
-
-
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
-
|
53
|
-
|
54
|
-
-
|
55
|
-
|
56
|
-
-
|
62
|
+
- 4a7bfd77-da6c-b1ae-bc39-35a1c175ecf2
|
63
|
+
X-Xss-Protection:
|
64
|
+
- '0'
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=9nQ%2FpfKZE%2BT1W4WrbQGusRS%2FxZHEG7sB0Ps3PUXt4lmPSmC%2FZHLV6KW90D74Y9VQ0QT7q3OIF47yVIwX5fwPKOHMwcOYQv0eyKUrFYxKkNf6QALpJE7%2BVNSUBiEmv3cZ1zOXUFCiuMl2MYygsw%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
69
|
+
Nel:
|
70
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
71
|
+
Server:
|
72
|
+
- cloudflare
|
73
|
+
Cf-Ray:
|
74
|
+
- 717cd26458fd671d-DFW
|
75
|
+
Alt-Svc:
|
76
|
+
- h3=":443"; ma=86400, h3-29=":443"; ma=86400
|
57
77
|
body:
|
58
|
-
encoding:
|
59
|
-
string: '{"id":"
|
78
|
+
encoding: ASCII-8BIT
|
79
|
+
string: '{"object":"directory_group","id":"directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG","idp_id":"01jlao4614two3d","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Sales","created_at":"2022-05-13T17:45:31.732Z","updated_at":"2022-06-07T17:45:35.739Z","raw_attributes":{"id":"01jlao4614two3d","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/uLYJ0Hrx1gXXVg9z-zGLBZET2Wo\"","kind":"admin#directory#group","name":"Sales","email":"sales@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"1","nonEditableAliases":["sales@foo-corp.com.test-google-a.com"]}}'
|
60
80
|
http_version:
|
61
|
-
recorded_at:
|
81
|
+
recorded_at: Tue, 07 Jun 2022 22:28:37 GMT
|
62
82
|
recorded_with: VCR 5.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.workos.com/directory_groups?after=
|
5
|
+
uri: https://api.workos.com/directory_groups?after=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
User-Agent:
|
17
|
-
- WorkOS; ruby/
|
17
|
+
- WorkOS; ruby/3.0.2; x86_64-darwin19; v2.1.1
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -22,55 +22,69 @@ http_interactions:
|
|
22
22
|
code: 200
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
|
-
|
26
|
-
-
|
25
|
+
Date:
|
26
|
+
- Tue, 07 Jun 2022 22:28:36 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '1163'
|
27
31
|
Connection:
|
28
32
|
- keep-alive
|
29
|
-
Vary:
|
30
|
-
- Origin, Accept-Encoding
|
31
33
|
Access-Control-Allow-Credentials:
|
32
34
|
- 'true'
|
33
35
|
Content-Security-Policy:
|
34
36
|
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
35
37
|
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
36
38
|
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
37
|
-
|
38
|
-
-
|
39
|
+
Etag:
|
40
|
+
- W/"15fc-zBhUbLZyJQxiq8umMaogT0kzj/8"
|
39
41
|
Expect-Ct:
|
40
42
|
- max-age=0
|
41
|
-
|
42
|
-
-
|
43
|
+
Referrer-Policy:
|
44
|
+
- no-referrer
|
43
45
|
Strict-Transport-Security:
|
44
46
|
- max-age=15552000; includeSubDomains
|
45
|
-
|
46
|
-
-
|
47
|
+
Vary:
|
48
|
+
- Origin, Accept-Encoding
|
49
|
+
Via:
|
50
|
+
- 1.1 spaces-router (664a92218d61)
|
47
51
|
X-Content-Type-Options:
|
48
52
|
- nosniff
|
53
|
+
X-Dns-Prefetch-Control:
|
54
|
+
- 'off'
|
55
|
+
X-Download-Options:
|
56
|
+
- noopen
|
57
|
+
X-Frame-Options:
|
58
|
+
- SAMEORIGIN
|
49
59
|
X-Permitted-Cross-Domain-Policies:
|
50
60
|
- none
|
51
|
-
|
52
|
-
-
|
61
|
+
X-Request-Id:
|
62
|
+
- f3944a4c-8532-4b6a-196a-84ee38216e1b
|
53
63
|
X-Xss-Protection:
|
54
64
|
- '0'
|
55
|
-
|
56
|
-
-
|
57
|
-
|
58
|
-
-
|
59
|
-
|
60
|
-
-
|
61
|
-
|
62
|
-
-
|
63
|
-
|
64
|
-
-
|
65
|
-
|
66
|
-
-
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=1YP42SeOofST3UnTgCIrEFd696HKzEJZ8n%2BBstJNNpMA98mb0YLj3fWYfmEA7eO5zxgderbhiUaenVJ9XVHdxOrOqKVitgdDejHBmbTFCceoPJf%2BQoH4wH6aOuSDALnFIe9cPUIsWo3nhxVpvg%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
69
|
+
Nel:
|
70
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
71
|
+
Server:
|
72
|
+
- cloudflare
|
73
|
+
Cf-Ray:
|
74
|
+
- 717cd2605c599ecb-DFW
|
75
|
+
Alt-Svc:
|
76
|
+
- h3=":443"; ma=86400, h3-29=":443"; ma=86400
|
67
77
|
body:
|
68
78
|
encoding: ASCII-8BIT
|
69
|
-
string: '{"object":"list","
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
79
|
+
string: '{"object":"list","data":[{"object":"directory_group","id":"directory_group_01G2Z8D5VBM14YQKFY02DHGFHD","idp_id":"01fob9te1lgjaw4","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Security","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"01fob9te1lgjaw4","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/i0mPa7pjMhSlP3jSyX-lRL7ScU8\"","kind":"admin#directory#group","name":"Security","email":"security@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"0","nonEditableAliases":["security@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D5SAKF3GXE9BTR6KZCJR","idp_id":"028h4qwu0uyrb9k","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Risk
|
80
|
+
Management","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"028h4qwu0uyrb9k","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/F0K5jmtHPYux11G_e7no2r29804\"","kind":"admin#directory#group","name":"Risk
|
81
|
+
Management","email":"risk@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"0","nonEditableAliases":["risk@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D5P1AFTJ8XK16RQ1FKWD","idp_id":"02szc72q2sp1i88","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Michael
|
82
|
+
Youngs Group","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"02szc72q2sp1i88","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/nF7tojOSI2G7C_nIp74DiIKrzbs\"","kind":"admin#directory#group","name":"Michael
|
83
|
+
Youngs Group","email":"michaelyoungsgroup@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"0","nonEditableAliases":["Michaelyoungsgroup@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D5MBRDS85VWEHFHF74SZ","idp_id":"01y810tw1ti9q8c","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Marketing","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"01y810tw1ti9q8c","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/41snDYeG-HeWJ3n0Q3SGWwlvUpo\"","kind":"admin#directory#group","name":"Marketing","email":"marketing@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"0","nonEditableAliases":["marketing@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D5JD50HDRNPDYB8VWXSE","idp_id":"02xcytpi45aqkmr","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Finance","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"02xcytpi45aqkmr","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/fjF75r0GGL7S9fWA5ngkflNIduQ\"","kind":"admin#directory#group","name":"Finance","email":"finance@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"0","nonEditableAliases":["finance@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D5F80M4DEMGGMFPHV4XV","idp_id":"03as4poj49cz6j9","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Documentation","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"03as4poj49cz6j9","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/-sI8PUONUvqYWMpmaVCxKjp8YBY\"","kind":"admin#directory#group","name":"Documentation","email":"docs@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"2","nonEditableAliases":["docs@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D59X1K7Q38CJCN0T9KPR","idp_id":"02iq8gzs1b2i1ae","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Contractors","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"02iq8gzs1b2i1ae","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/JHD88ylaaIXdP90ob6UHKZ_PYHo\"","kind":"admin#directory#group","name":"Contractors","email":"contractors@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"0","nonEditableAliases":["contractors@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D586TSJBGTFJ5SGS3BAC","idp_id":"03fwokq01u3hhmd","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Sync
|
84
|
+
Delay Test All Users","created_at":"2022-05-13T17:45:32.577Z","updated_at":"2022-06-07T17:45:36.258Z","raw_attributes":{"id":"03fwokq01u3hhmd","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/reGSvbZ45OETFOEVxJtCcqUYi3A\"","kind":"admin#directory#group","name":"Sync
|
85
|
+
Delay Test All Users","email":"allusers@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"1","nonEditableAliases":["allusers@foo-corp.com.test-google-a.com"]}},{"object":"directory_group","id":"directory_group_01G2Z8D50AEFFZHKBFNRE0Y16C","idp_id":"041mghml1ld1sg5","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","name":"Sync
|
86
|
+
Delay 2","created_at":"2022-05-13T17:45:31.732Z","updated_at":"2022-06-07T17:45:35.739Z","raw_attributes":{"id":"041mghml1ld1sg5","etag":"\"DaDAXuEwpvygu_Ul-89tlT4iVJBEvO3LZpQ0lrbYRrc/5tCYHwRu-uImFIfoexVJvinM9rM\"","kind":"admin#directory#group","name":"Sync
|
87
|
+
Delay 2","email":"sd2@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"1","nonEditableAliases":["sd2@foo-corp.com.test-google-a.com"]}}],"list_metadata":{"before":"directory_group_01G2Z8D50AEFFZHKBFNRE0Y16C","after":null},"listMetadata":{"before":"directory_group_01G2Z8D50AEFFZHKBFNRE0Y16C","after":null}}'
|
74
88
|
http_version:
|
75
|
-
recorded_at:
|
89
|
+
recorded_at: Tue, 07 Jun 2022 22:28:36 GMT
|
76
90
|
recorded_with: VCR 5.0.0
|