Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up SCIM-invited users with expired invitation #1264

Merged
merged 51 commits into from
Dec 21, 2020
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
bbdbdc8
Add cleanup
smatting Nov 30, 2020
ade9456
go back multiple days
smatting Nov 30, 2020
49b5010
query by day, delete by day and user
smatting Dec 1, 2020
7ad2f4e
Batch deletion into 1 query per day, remove debugging, 24h delay
smatting Dec 1, 2020
99fbcb0
Move delete of entries outside of the pagination of them
smatting Dec 1, 2020
076bb75
Clean only past dates, no longer need to compare timestamps
smatting Dec 1, 2020
b4f0358
Remove check for PendingInvitation
smatting Dec 1, 2020
a76974d
...
smatting Dec 2, 2020
59593df
use int in schema
smatting Dec 2, 2020
6eea058
...
smatting Dec 2, 2020
d6b98fe
update schema version
smatting Dec 2, 2020
d9d1c10
rename expirCleanup->scimInvitationCleanup
smatting Dec 3, 2020
7ac7167
Add delteUsersNoVerify with metric; Remove delay
smatting Dec 3, 2020
bba0c4a
...
smatting Dec 3, 2020
f5ff416
Fix broken docstring
smatting Dec 3, 2020
0f11d80
Add expires_at to primary key to allow clustering order
smatting Dec 3, 2020
b21d5ea
...
smatting Dec 3, 2020
b16d4b0
make randomScimUser compile in brig-integration
smatting Dec 4, 2020
533c827
make createUser' (part of it) compile
smatting Dec 4, 2020
ade3d6c
make createToken compile
smatting Dec 4, 2020
c9e5a8a
Fix: get invitions is not public
smatting Dec 4, 2020
cc7c0ba
Add user check
smatting Dec 4, 2020
0a05705
Add debug
smatting Dec 4, 2020
bc4abaf
Merge branch 'develop' into smatting/expired-invitations
fisx Dec 7, 2020
574a09f
Fix bug: user is removed from expiry tracking too soon
smatting Dec 7, 2020
7a84c0a
Add test: Users that register in time dont get cleaned
smatting Dec 7, 2020
b68b328
Add setExpiredUserCleanupTimeout
smatting Dec 7, 2020
eb04525
Revert brig.demo.yaml
smatting Dec 7, 2020
add552d
Consistency
smatting Dec 7, 2020
8e5312a
add metric: calls to deleteUserNoVerify
smatting Dec 7, 2020
34be4ef
Merge branch 'develop' into smatting/expired-invitations
fisx Dec 11, 2020
df7e28c
Rename data fns with userPendingActivation prefix
smatting Dec 15, 2020
6785c0a
remove superfluous $
smatting Dec 15, 2020
644687a
Remove incorrect note
smatting Dec 15, 2020
1a3f61c
Consitent naming
smatting Dec 15, 2020
a5c47bc
createUser'step -> createUserStep
smatting Dec 15, 2020
0ca1fac
don't pollute scope
smatting Dec 15, 2020
180a287
syntax
smatting Dec 15, 2020
a516416
Update users_pending_activation primary key to (user)
smatting Dec 16, 2020
be10e64
Merge remote-tracking branch 'origin/develop' into smatting/expired-i…
smatting Dec 16, 2020
1d6a309
Remove unused ModJulianDay
smatting Dec 16, 2020
2a64d28
Fix possible race condition.
fisx Dec 16, 2020
be2afab
Hello CI
smatting Dec 17, 2020
d4c2026
Add retries to assertUserExist
smatting Dec 18, 2020
1d015e2
add debug output
smatting Dec 18, 2020
2b16e0e
Revert "add debug output"
smatting Dec 18, 2020
8009177
Add HasCallStack constraints.
fisx Dec 21, 2020
22f3359
Fix typo.
fisx Dec 21, 2020
0b71fc7
Try to fix race condition in integration tests.
fisx Dec 21, 2020
6651b6c
Merge branch 'develop' into smatting/expired-invitations
fisx Dec 21, 2020
730f7bc
Fix merge error.
fisx Dec 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion services/brig/src/Brig/Data/UserPendingActivation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ data UserPendingActivation = UserPendingActivation
}
deriving stock (Eq, Show, Ord)

-- | Note: Call this function only after an invitation for the user has been created
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, nice. Didn't see that.

usersPendingActivationAdd :: UserPendingActivation -> AppIO ()
usersPendingActivationAdd (UserPendingActivation uid expiresAt) = do
retry x5 . write insertExpiration . params Quorum $ (uid, expiresAt)
Expand Down