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

Credentials: Use per-account keychain entries #5830 #6027

Merged
merged 2 commits into from
Sep 15, 2017
Merged

Conversation

ckamm
Copy link
Contributor

@ckamm ckamm commented Sep 13, 2017

This requires a lot of migration code: the old entries need to be read,
saved to the new locations and then deleted.

See #5830. It's potentially breaking, so please review carefully.

Known side effects of this patch:

  • If you go back from 2.4 to 2.3, you'll have to enter the keychain data for your accounts again.
  • If you have several accounts pointing to the same url+user, one of them might not have credentials set up on the first start of 2.4.

While working on this I had an idea about an alternate approach: What if we added a "what's the keychain base id" entry to the settings? Then we could add the new account identifier to new accounts and old accounts would work without losing keychain data even when switching between 2.3 and 2.4. The drawback is that we'd never migrate old accounts.

This requires a lot of migration code: the old entries need to be read,
saved to the new locations and then deleted.
@ckamm ckamm added this to the 2.4.0 milestone Sep 13, 2017
@ckamm ckamm self-assigned this Sep 13, 2017
@ckamm ckamm requested review from ogoffart and guruz September 13, 2017 07:49
Copy link
Contributor

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

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

looks good, but please remove the job2 from invalidateToken.

{
auto startDeleteJob = [this](QString user) {
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
addSettingsToJob(_account, job);
Copy link
Contributor

Choose a reason for hiding this comment

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

In HttpCredentials::invalidateToken, there is a job2 to remove the password from a "deprecated location" which does not set the settings.

Should we not do the same here? (in case of upgrading from a 1.7 client? maybe this is anyway no longer supported)

But in any case, we can remove this job2 from HttpCredentials::invalidateToken

@ckamm
Copy link
Contributor Author

ckamm commented Sep 14, 2017

@ogoffart Done

@ogoffart
Copy link
Contributor

I guess the jenkins failure is unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants