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

[master issue] option to use custom IdP on browser extension #5311

Open
7 of 8 tasks
tomholub opened this issue Jul 18, 2023 · 9 comments
Open
7 of 8 tasks

[master issue] option to use custom IdP on browser extension #5311

tomholub opened this issue Jul 18, 2023 · 9 comments
Assignees
Milestone

Comments

@tomholub
Copy link
Collaborator

tomholub commented Jul 18, 2023

Today, the browser extension uses Google authentication / IdP for two purposes:

  1. authorizing use of Google APIs (gmail permissions) and then authenticating on those APIs
  2. authenticating oneself when communicating with backend / Enterprise Server

For the second usecase, it would be safer to use some other IdP if the customer has that option. That way, Google cannot forge authentication tokens and steal the keys from EKM. Today, to prevent the potential key theft from EKM by Google, customers have to either run EKM behind a firewall on internal network, or not run it at all.

Allowing a custom IdP for authenticating especially with EKM would allow us to run EKM for our customers, meaning easier deployment.

This will mean, on such deployments when custom IdP is configured, the user will have to authenticate twice during setup. Once with Google for Gmail API and permissions, and once again with the custom IdP. (there will be two authentication popups in sequence)

The steps would be:

@tomholub tomholub added this to the 8.5.1 milestone Jul 18, 2023
@tomholub tomholub changed the title Option to use custom IdP on browser extension [master issue] option to use custom IdP on browser extension Jul 19, 2023
@tomholub tomholub pinned this issue Jul 19, 2023
@tomholub tomholub assigned tomholub and unassigned tomholub Jul 19, 2023
@sosnovsky sosnovsky modified the milestones: 8.5.3, 8.5.4 Dec 14, 2023
@sosnovsky sosnovsky modified the milestones: 8.5.4, 8.5.5 Mar 1, 2024
@sosnovsky sosnovsky modified the milestones: 8.5.5, 8.5.6 May 13, 2024
@sosnovsky sosnovsky modified the milestones: 8.5.6, 8.5.7 May 23, 2024
@sosnovsky sosnovsky modified the milestones: 8.5.7, 8.5.8 Jun 13, 2024
@ioanmo226
Copy link
Collaborator

For the last task, I think I need @sosnovsky and @martgil help.
I've tested this situation and it works well in my side though.

@ioanmo226
Copy link
Collaborator

Could you try to build extension from master branch and test this situation?

@sosnovsky
Copy link
Collaborator

Yes, I'll test such situation. Probably it's possible to implement such ui test?

@ioanmo226
Copy link
Collaborator

ioanmo226 commented Aug 19, 2024

UI test (for such case) was already added in previous PR I think.
We set invalid customIdpIdToken and removed custom_idp_token_refresh(which is same case when custom domain authentication was added after extension was already set up)

https://github.com/FlowCrypt/flowcrypt-browser/pull/5814/files#diff-a9d95eb676c3bf52fd1efc2f9a7e897c9278def726c3acc410ff6b67579487ccR2579

await BrowserRecipe.setInMemoryStore(settingsPage, acct, 'customIdpIdToken', MockJwt.new(acct, 100));
await settingsPage.setLocalStorage(cryptup_${emailKeyIndex(acct, 'custom_idp_token_refresh')}, null);

@sosnovsky
Copy link
Collaborator

Ah, I see, yes, seems to be similar to the described situation, then no need for separate test.

@ioanmo226
Copy link
Collaborator

How's this test going?

@sosnovsky
Copy link
Collaborator

sosnovsky commented Sep 6, 2024

Haven't fully tested it yet, but seems to work well after custom IdP was added after previous non-custom configuration.
However, sometimes I get such popup on my personal @flowcrypt.com account, may be related to my test local configuration changes, as it's quite random and usually disappears after browser restart or extension reinstall:
(Re-connect account button isn't working, throws error in console, but I didn't save it)

Screenshot 2024-09-05 at 13 28 19

@ioanmo226
Copy link
Collaborator

Let me check

@sosnovsky
Copy link
Collaborator

Let me check

Probably it's related to my local test configuration, not sure if it'll occur for real users, so let's not try to fix it for now.

@sosnovsky sosnovsky removed this from the 8.5.8 milestone Dec 20, 2024
@sosnovsky sosnovsky added this to the 8.5.9 milestone Dec 20, 2024
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

No branches or pull requests

3 participants