Page MenuHomePhabricator

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

Authored by epriestley on Wed, Feb 6, 11:50 PM.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Wed, Feb 6, 11:50 PM
Owners added a subscriber: Restricted Owners Package.Wed, Feb 6, 11:50 PM
epriestley requested review of this revision.Wed, Feb 6, 11:52 PM
amckinley accepted this revision.Thu, Feb 7, 7:23 PM
This revision is now accepted and ready to land.Thu, Feb 7, 7:23 PM
This revision was automatically updated to reflect the committed changes.