Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
69ca5d3
WPB-1583: Setting up a type and assocaited type family for valid repr…
lepsa Aug 25, 2023
12a7fe5
WPB-1583: Minor changes based on Matthias' feedback
lepsa Aug 25, 2023
6d5a73f
No password in ExternalIdF, that's brig's business!
fisx Aug 27, 2023
5cd6889
Renames, fix logic of ExternalIdTag.
fisx Aug 27, 2023
5ca7c13
Make do without UserSSOId.
fisx Aug 27, 2023
8162a3e
Make do without UserSSOId (cont.)
fisx Aug 27, 2023
861b0a7
ormolu
fisx Aug 27, 2023
8387341
Make do without UserSSOId (cont.)
fisx Aug 27, 2023
63d001d
scope scim external id in team id!
fisx Aug 27, 2023
c39937a
email in UAuthId must come with source info.
fisx Aug 27, 2023
87fb121
WPB-1583: My thoughts and updates to code to help the compiler.
lepsa Aug 28, 2023
ae4dbac
WPB-1583: Small fixes, trying to generalise some code with lenses
lepsa Aug 28, 2023
35ff821
Filling in some more holes
lepsa Aug 28, 2023
1c08105
Re-order code.
fisx Aug 29, 2023
ab41cdb
Fix UserIdentityComponents type.
fisx Aug 29, 2023
fb93b7c
Move code around.
fisx Aug 29, 2023
159ae73
WIP
lepsa Aug 30, 2023
fa4fdaa
Merge branch 'WPB-1583' of github.com:lepsa/wire-server into WPB-1583
lepsa Aug 30, 2023
0d29aed
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Sep 4, 2023
489a327
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Sep 5, 2023
f623d91
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Sep 7, 2023
dc152ed
enable failing test case.
fisx Sep 7, 2023
03c833c
Merge branch 'develop' into WPB-1583
elland Sep 20, 2023
e607bd6
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Sep 26, 2023
d306392
...
fisx Sep 26, 2023
6e2567d
...
fisx Sep 26, 2023
b112ddb
...
fisx Sep 26, 2023
d8d8d91
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Sep 26, 2023
47c282b
...
fisx Sep 26, 2023
593908f
...
fisx Sep 26, 2023
a631b5d
...
fisx Sep 27, 2023
718cd7a
...
fisx Sep 27, 2023
cc65cfd
Merge branch 'develop' into WPB-1583
fisx Oct 16, 2023
e518160
..
fisx Oct 16, 2023
6185529
..
fisx Oct 16, 2023
f319397
...
fisx Oct 16, 2023
6a855b8
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Oct 16, 2023
68692eb
...
fisx Oct 16, 2023
312606a
...
fisx Oct 16, 2023
ef4a084
...
fisx Oct 18, 2023
3217875
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Oct 18, 2023
7430da3
...
fisx Oct 18, 2023
e8a5608
...
fisx Oct 18, 2023
2925694
[stash]
fisx Oct 18, 2023
c2b9e71
Revert "[stash]"
fisx Oct 18, 2023
f33dcc2
...
fisx Oct 19, 2023
a44dd13
...
fisx Oct 19, 2023
aee455c
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Oct 19, 2023
da72d18
...
fisx Oct 19, 2023
d82fded
wire-api golden tests.
fisx Oct 20, 2023
6f80e24
wire-api unit tests.
fisx Oct 20, 2023
2960481
UserIdentityComponents
fisx Oct 20, 2023
68aa18e
[stash]
fisx Oct 20, 2023
24cbe85
Revert "[stash]"
fisx Oct 20, 2023
f3b0f40
...
fisx Oct 20, 2023
1b7c3ba
...
fisx Oct 20, 2023
4eb210c
[stash]
fisx Oct 20, 2023
5b984f2
Revert "[stash]"
fisx Oct 20, 2023
3e4f771
...
fisx Oct 26, 2023
2310990
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Oct 26, 2023
3a0e325
...
fisx Oct 26, 2023
bf4989a
...
fisx Oct 26, 2023
1e78ac2
Revert "..."
fisx Oct 26, 2023
6ab8db1
...
fisx Oct 26, 2023
172e376
...
fisx Oct 26, 2023
e9bedea
...
fisx Nov 10, 2023
a4da35a
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Nov 10, 2023
07a79ff
Fixup
fisx Nov 10, 2023
3be2731
Fixup
fisx Nov 10, 2023
0882436
...
fisx Nov 12, 2023
dfc8642
[stash]
fisx Nov 12, 2023
a2ea488
Revert "[stash]"
fisx Nov 14, 2023
dec389b
...
fisx Nov 16, 2023
5b8c4bb
...
fisx Nov 17, 2023
1491812
...
fisx Nov 17, 2023
4ea52c1
...
fisx Nov 17, 2023
d4647bd
[stash]
fisx Nov 17, 2023
cf45a80
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Nov 17, 2023
afd779c
Revert "[stash]"
fisx Nov 20, 2023
5525fe6
...
fisx Nov 20, 2023
6da3fe1
...
fisx Nov 20, 2023
9e853d3
schema-profunctor business
fisx Nov 20, 2023
d3034b2
make use of schema-profunctor business
fisx Nov 20, 2023
e0e1a41
...
fisx Nov 20, 2023
704b2cd
...
fisx Nov 20, 2023
cfc3217
...
fisx Nov 20, 2023
5247398
[stash]
fisx Nov 20, 2023
9b26520
Merge remote-tracking branch 'origin/develop' into WPB-1583
fisx Nov 20, 2023
346b759
Revert "[stash]"
fisx Nov 20, 2023
ce19c83
...
fisx Nov 21, 2023
2bfeb8b
...
fisx Nov 21, 2023
d2221c5
...
fisx Nov 21, 2023
4f6699c
...
fisx Nov 21, 2023
e497bc1
[stash]
fisx Nov 21, 2023
de2dd0c
Revert "[stash]"
fisx Nov 21, 2023
4e11dfc
...
fisx Nov 22, 2023
f71c953
...
fisx Nov 23, 2023
65e15bc
...
fisx Nov 23, 2023
8b51f53
[stash]
fisx Nov 23, 2023
c8a8d9a
Revert "[stash]"
fisx Nov 23, 2023
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
5 changes: 5 additions & 0 deletions cassandra-schema.cql
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,11 @@ CREATE TABLE brig_test.user (
phone text,
picture list<blob>,
provider uuid,
saml_entity_id text,
saml_name_id text,
scim_external_id text,
scim_email text,
scim_email_source text,
searchable boolean,
service uuid,
sso_id text,
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/3-bug-fixes/WPB-1583
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[WIP]

- fixed bug with scim update and ??
5 changes: 5 additions & 0 deletions changelog.d/5-internal/WPB-1583
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[WIP]

- useridentity has new field uauth_id that contains consistent and complete user-identifying info from spar.
- related parsers has more error cases now.
- managed_by is not a database field any more.
2 changes: 1 addition & 1 deletion libs/brig-types/src/Brig/Types/User/Event.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ data UserUpdatedData = UserUpdatedData
eupHandle :: !(Maybe Handle),
eupLocale :: !(Maybe Locale),
eupManagedBy :: !(Maybe ManagedBy),
eupSSOId :: !(Maybe UserSSOId),
eupSSOId :: !(Maybe LegacyUserSSOId), -- TODO: add fields `eupUAuthId`? (this can replace both SSOId and SSOIdRemoved, but beware of backward compatibility issues when removing those!)
eupSSOIdRemoved :: Bool,
eupSupportedProtocols :: !(Maybe (Set BaseProtocolTag))
}
Expand Down
6 changes: 5 additions & 1 deletion libs/brig-types/test/unit/Test/Brig/Types/User.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import Test.Tasty
import Test.Tasty.HUnit
import Wire.API.Routes.Internal.Brig.EJPD (EJPDRequestBody (..), EJPDResponseBody (..))
import Wire.API.User.Auth.ReAuth
import Wire.API.User.Test

tests :: TestTree
tests = testGroup "User (types vs. aeson)" $ roundtripTests
Expand All @@ -51,14 +52,17 @@ roundtripTests =
testRoundTripWithSwagger @EJPDResponseBody,
testRoundTrip @UpdateConnectionsInternal,
testRoundTrip @SearchVisibilityInbound,
testRoundTripWithSwagger @UserAccount,
testRoundTripWithSwagger @(WithSanitizedUserIdentity UserAccount),
testGroup "golden tests" $
[testCaseUserAccount]
]

instance Arbitrary ReAuthUser where
arbitrary = ReAuthUser <$> arbitrary <*> arbitrary <*> arbitrary

instance Arbitrary (WithSanitizedUserIdentity UserAccount) where
arbitrary = (arbitrary >>= coherenizeUserAccount) <&> WithSanitizedUserIdentity

testCaseUserAccount :: TestTree
testCaseUserAccount = testCase "UserAcccount" $ do
assertEqual "1" (Just json1) (encode <$> decode @UserAccount json1)
Expand Down
1 change: 1 addition & 0 deletions libs/wire-api/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ mkDerivation {
hex
hspec
hspec-wai
http-api-data
http-types
imports
iso3166-country-codes
Expand Down
2 changes: 2 additions & 0 deletions libs/wire-api/src/Wire/API/Deprecated.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import Servant.Client
import Servant.OpenApi

-- Annotate that the route is deprecated
--
-- FUTUREWORK: give this a message string that explains how to migrate away from the deprecated end-point!
data Deprecated deriving (Typeable)

-- All of these instances are very similar to the instances
Expand Down
36 changes: 33 additions & 3 deletions libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import Servant.OpenApi (HasOpenApi (toOpenApi))
import Servant.OpenApi.Internal.Orphans ()
import Util.Options
import Wire.API.Connection
import Wire.API.Deprecated
import Wire.API.Error
import Wire.API.Error.Brig
import Wire.API.MLS.CipherSuite
Expand Down Expand Up @@ -347,10 +348,11 @@ type AccountAPI =
)
:<|> Named
"iPutUserSsoId"
( "users"
( Deprecated -- use `iPutUAuthId` instead
:> "users"
:> Capture "uid" UserId
:> "sso-id"
:> ReqBody '[Servant.JSON] UserSSOId
:> ReqBody '[Servant.JSON] LegacyUserSSOId
:> MultiVerb
'PUT
'[Servant.JSON]
Expand All @@ -361,7 +363,8 @@ type AccountAPI =
)
:<|> Named
"iDeleteUserSsoId"
( "users"
( Deprecated -- use `iDeleteUAuthId` instead
:> "users"
:> Capture "uid" UserId
:> "sso-id"
:> MultiVerb
Expand All @@ -372,6 +375,33 @@ type AccountAPI =
]
UpdateSSOIdResponse
)
:<|> Named
"iPutUAuthId"
( "users"
:> Capture "uid" UserId
:> "uauthid"
:> ReqBody '[Servant.JSON] PartialUAuthId
:> MultiVerb
'PUT
'[Servant.JSON]
'[ RespondEmpty 200 "UpdateSSOIdSuccess",
RespondEmpty 404 "UpdateSSOIdNotFound"
]
UpdateSSOIdResponse
)
:<|> Named
"iDeleteUAuthId"
( "users"
:> Capture "uid" UserId
:> "uauthid"
:> MultiVerb
'DELETE
'[Servant.JSON]
'[ RespondEmpty 200 "UpdateSSOIdSuccess",
RespondEmpty 404 "UpdateSSOIdNotFound"
]
UpdateSSOIdResponse
)
:<|> Named
"iPutManagedBy"
( "users"
Expand Down
Loading