I stumbled across what appears to be a very mild security issue in JIRA that impacts this flow. I've reported it to Atlassian's bug bounty program here (this link may or may not be visible to anyone else):
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Feb 23 2020
Feb 22 2020
This change sequence is almost ready to remove readers and writers to accountID, but there's still a unique <accountType, accountDomain, accountID> key on the table. Removing accountID writers completely will mean that the second user to link an account of a particular type (say, an Asana account) will run into a unique key error (since they'll write a second "Asana" account with the same empty accountID as the first "Asana" account).
Feb 21 2020
Feb 20 2020
In T13493, PhabricatorExternalAccountIdentifier could also benefit from this null policy behavior.
These callers use accountId:
I think the patch above is a piece of the solution here, but makes behavior worse for some installs: installs with a version of JIRA which returns both key and accountId will have worse behavior under the patch than without it (since it will break all the existing account links immediately). It also doesn't smoothly migrate these installs, even though it's theoretically easy/desirable to do that.
Ah, thanks. Yeah, I think that's reasonable. I'm sure some other things can still be cleaned up -- like I changed the "Subscribers" UI a little bit recently, and it could now handle disabled users more clearly:
IMHO this could be closed as resolved these days.
Feb 19 2020
When a user logs in to "new" JIRA, we also can't easily tell if they have an existing account link based on the presence of an accountId.
Feb 17 2020
I'm changing the minimum required version to PHP 5.5; see T13492 for 5.5-specific followup.
Feb 15 2020
Feb 14 2020
I have another patch on top of D20998 which brings unit over, but it's currently so broken that it can't diff itself.
Feb 13 2020
I'm also going to collapse as much of experimental into master as I can here, make the minimum required PHP version 5.5 (see T11968), and attempt to collapse wilds.
Probably require PHP 5.4 regardless.
A problem in moving forward here is that we ultimately do very little complex data access in Phabricator, and what complex data access we do perform can often be faked. We likely have more use cases in Arcanist and provisioning code: API calls are slower, workflows are more parallel/interactive, and we can't just fake it all with AJAX.