Page MenuHomePhabricator

Give ExternalAccount a providerConfigPHID, tying it to a particular provider
ClosedPublic

Authored by epriestley on Feb 6 2019, 11:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 6:59 AM
Unknown Object (File)
Fri, Nov 22, 9:12 AM
Unknown Object (File)
Sun, Nov 17, 4:04 PM
Unknown Object (File)
Thu, Nov 14, 12:09 AM
Unknown Object (File)
Sun, Nov 10, 11:49 AM
Unknown Object (File)
Wed, Nov 6, 2:39 AM
Unknown Object (File)
Mon, Nov 4, 10:41 AM
Unknown Object (File)
Mon, Nov 4, 10:41 AM
Subscribers
Restricted Owners Package

Details

Summary

Depends on D20111. Ref T6703. Currently, each ExternalAccount row is tied to a provider by providerType + providerDomain. This effectively prevents multiple providers of the same type, since, e.g., two LDAP providers may be on different ports on the same domain. The domain also isn't really a useful idea anyway because you can move which hostname an LDAP server is on, and LDAP actually uses the value self in all cases. Yeah, yikes.

Instead, just bind each account to a particular provider. Then we can have an LDAP "alice" on seven different servers on different ports on the same machine and they can all move around and we'll still have a consistent, cohesive view of the world.

(On its own, this creates some issues with the link/unlink/refresh flows. Those will be updated in followups, and doing this change in a way with no intermediate breaks would require fixing them to use IDs to reference providerType/providerDomain, then fixing this, then undoing the first fix most of the way.)

Test Plan

Ran migrations, sanity-checked database. See followup changes for more comprehensive testing.

Diff Detail

Repository
rP Phabricator
Branch
welcome15
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21861
Build 29835: Run Core Tests
Build 29834: arc lint + arc unit