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

UI for password encrypted message functionality #1620

Closed
Tracked by #1545
DenBond7 opened this issue Dec 21, 2021 · 24 comments · Fixed by #1649
Closed
Tracked by #1545

UI for password encrypted message functionality #1620

DenBond7 opened this issue Dec 21, 2021 · 24 comments · Fixed by #1649
Assignees

Comments

@DenBond7
Copy link
Collaborator

DenBond7 commented Dec 21, 2021

See FlowCrypt/flowcrypt-ios#1221

@DenBond7
Copy link
Collaborator Author

Actually, it's an interesting issue :). It seems we have a not simple logic here.

@DenBond7
Copy link
Collaborator Author

Before starting to work on this issue need to understand what exactly we do here.

As I understand we have the following:

  1. During creating a new encrypted message we can have recipients that don't have public keys.
  2. We show a hint for a user: you can import missing public keys or protect the current message with a pass phrase for recipients with missing public keys.
  3. After that the user should provide missing public keys or a pass phrase that will be used for a password encrypted message.
  4. Let's imagine the user has provided a pass phrase. What do we do next?
  5. It seems we should create an encrypted message that will be sent as attachment, do all things from prepare API model / client class for sending through web portal #1615, receive some URL and send a message with text
[email protected] has sent you a password-encrypted email Click here to Open Message

Alternatively copy and paste the following link: https://flowcrypt.com/HoHoHoHo

and attachments(noname, encryped.asc)

Just a simplified version what I see.

@tomholub Please correct me if needed

@IvanPizhenko
Copy link
Contributor

IvanPizhenko commented Dec 21, 2021

We also should take into account that enterprise customers may have their own FES instance.

@DenBond7
Copy link
Collaborator Author

We also should take into account that enterprise customers may have their own FES instance.

Yes, it relates to #1621 and #1622

@DenBond7
Copy link
Collaborator Author

as an example to discuss

image

@tomholub
Copy link
Collaborator

I wanted to do this on one platform first (iOS in this case) so that we can see it in action and settle the exact UI before doing it on a second platform (Android). That's why I tried to assign you non-ui tasks here and assign Roman UI tasks there, so I don't have to be potentially wrong twice per platform for all tasks (because I'm not too sure until I see it).

@tomholub
Copy link
Collaborator

We show a hint for a user: you can import missing public keys or protect the current message with a pass phrase for recipients with missing public keys.

we call it a password in this case to differentiate, though it's true it doesn't sound that different

@tomholub
Copy link
Collaborator

Let's imagine the user has provided a pass phrase. What do we do next?
It seems we should create an encrypted message that will be sent as attachment, do all things from prepare API model / client class for sending through web portal #1615, receive some URL and send a message with text

This is outside of scope of this issue, so we don't have to discuss it in detail yet. But basically

  1. call FES to get a reply token
  2. encode the reply token into the message & encrypt a message with both public keys (my own + recipients if any) and the provided password
  3. upload the message to FES
  4. format the message with the sentence + link + encrypted data in attachment
  5. send message formatted this way through gmail

@tomholub
Copy link
Collaborator

This is pretty good. The only problem is, it only shows after user already tapped send which is a bit too late. It would be better to have some banner.

Also:

  • the password option should be first, when available
  • switch to standard email should be removed when FES available

image

@tomholub
Copy link
Collaborator

@sosnovsky you can have a look at the sketches above in case it helps you with FlowCrypt/flowcrypt-ios#1221

@sosnovsky
Copy link
Collaborator

@sosnovsky you can have a look at the sketches above in case it helps you with FlowCrypt/flowcrypt-ios#1221

Looks good, I currently have more basic UI implementation:

Simulator Screen Shot - iPhone 13 - 2021-12-21 at 23 14 59

Simulator Screen Shot - iPhone 13 - 2021-12-21 at 23 15 04

Simulator Screen Shot - iPhone 13 - 2021-12-21 at 23 15 15

@tomholub
Copy link
Collaborator

I think the screenshots on both platforms are appropriate (for the level of implementation / features already available for that platform). So it looks on a good track.

I think on iOS, above the password, we could add another paragraph of text about the user being responsible to share the password. Per the Android screenshot "You are responsible ..."

@DenBond7
Copy link
Collaborator Author

@tomholub

I wanted to do this on one platform first (iOS in this case) so that we can see it in action and settle the exact UI before doing it on a second platform (Android).

I've provided only UI (after checking the web version.). Just sketches without logic. I have not added logic yet :)

The only problem is, it only shows after user already tapped send which is a bit too late.

It depends on our needs. For example, we can show floatActionButton when we found at least one recipient without a public key. Similar to the web version does.

@tomholub
Copy link
Collaborator

Yes. And do UI is not bad. So you can use this.

@tomholub
Copy link
Collaborator

The float sounds good.

@tomholub
Copy link
Collaborator

@DenBond7 does Android have any database entry that indicates if FES is available for that user?

@DenBond7
Copy link
Collaborator Author

We store OrgRules. If it contains such info (some entry that indicates FES) my answer - yes.

@DenBond7
Copy link
Collaborator Author

DenBond7 commented Dec 24, 2021

@tomholub Can we fetch clientConfiguration when FES doesn't work?

edit: when FES is not available for a user

@DenBond7
Copy link
Collaborator Author

DenBond7 commented Jan 6, 2022

@tomholub It seems FlowCrypt/flowcrypt-ios#1221 is already closed.

I wanted to do this on one platform first (iOS in this case) so that we can see it in action and settle the exact UI before doing it on a second platform (Android). That's why I tried to assign you non-ui tasks here and assign Roman UI tasks there, so I don't have to be potentially wrong twice per platform for all tasks (because I'm not too sure until I see it).

I can to come back to this issue. How can I test the last changes for iOS? Would you like to share any instruction for UI for this issue?

@tomholub
Copy link
Collaborator

tomholub commented Jan 6, 2022

Your UI example, with my comments here #1620 (comment) looks good to me for Android.

@tomholub
Copy link
Collaborator

tomholub commented Jan 6, 2022

I'll build you the iOS app so you can test it too.

@DenBond7
Copy link
Collaborator Author

@tomholub I think UI is done. Please look at the video. Maybe you would like to change something

Screencast.2022-01-12.10.43.12.mp4

@tomholub
Copy link
Collaborator

This is good. Please, for now, hide the strength evaluation - there will be different rules for evaluating strength of passwords (as opposed to pass phrases). Else this looks great.

DenBond7 added a commit that referenced this issue Jan 12, 2022
DenBond7 added a commit that referenced this issue Jan 12, 2022
DenBond7 added a commit that referenced this issue Jan 12, 2022
DenBond7 added a commit that referenced this issue Jan 12, 2022
DenBond7 added a commit that referenced this issue Jan 13, 2022
DenBond7 added a commit that referenced this issue Jan 13, 2022
DenBond7 added a commit that referenced this issue Jan 17, 2022
DenBond7 added a commit that referenced this issue Jan 20, 2022
* Moved CreateMessageFragment to fragment package.| #1620

* Added a template of ProvidePasswordToProtectMsgDialogFragment.| #1620

* CreateMessageFragment. Migrated to use binding.| #1620

* CreateMessageActivity. Refactoring and improving the code.| #1620

* Refactored code.| #1620

* CreateMessageFragment. Modified logic to show the "Protect with Password" button. Refactored code.| #1620

* Refactored code.| #1620

* Added IllegalTextForStrengthMeasuring. Refactored code.| #1620

* Added a workable realization to support password-protected messages.| #1620

* Enabled password-protected messages only for "flowcrypt.com" domain.| #1620

* Fixed some bugs. Refactored code.| #1620

* Fixed some more bugs.| #1620

* Reverted back some changes in CheckPassphraseStrengthFragment. Refactored code.| #1620

* Added missing russian translation.| #1620

* Fix translation.| #1620

* Simplified some code.| #1620

* Fixed lint warnings.| #1620

* Fixed russian translation.| #1620

* Fixed some existing tests.| #1620

* Fixed CheckPassphraseStrengthFragmentTest.| #1620

* Added CreateMessageFragmentPasswordProtectedTest.| #1620

* Modifed logic in BetterInternetAddressTest to fix tests that use "localhost" as an email domain.| #1620

* Fixed "com.project.starter:easylauncher" usage.| #1620

* Modified tests. Fixed rules ordering. Refactored code.| #1620
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 a pull request may close this issue.

4 participants