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

Only load credential pairs in UI if user asks to unmask or edits #279

Merged
merged 3 commits into from
Mar 28, 2020

Conversation

ryan-lane
Copy link
Contributor

This change improves the auditing and last-viewed behavior of confidant by only fetching decrypted credential pairs when necessary for the UI. If the end-user loads a credential, it loads metadata_only=True by default, and if they unmask the credentials, or edit the credential, it'll fetch the credential with metadata_only=False, fetching the credential pairs, and replacing them in-place in the view. The view will keep them loaded while in the same credential view, and will not re-fetch the credential for unmask/edit, as long as the user doesn't leave and re-visit the page.

Copy link
Contributor

@irhkang irhkang left a comment

Choose a reason for hiding this comment

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

Seems reasonable besides my comment BUT my frontend abilities are near non existent

confidant/models/credential.py Outdated Show resolved Hide resolved
skiptomyliu
skiptomyliu previously approved these changes Mar 27, 2020
Copy link
Member

@skiptomyliu skiptomyliu left a comment

Choose a reason for hiding this comment

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

💯

@ryan-lane ryan-lane merged commit fde4640 into master Mar 28, 2020
@ryan-lane ryan-lane deleted the metadata-only-by-default-credential-view branch March 28, 2020 01:40
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.

3 participants