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

Implement emulateWinChromiumPlatform Flag for OS Emulation #1395

Merged
merged 9 commits into from
Sep 10, 2024

Conversation

3wweiweiwu
Copy link
Contributor

@3wweiweiwu 3wweiweiwu commented Sep 3, 2024

Challenge

Some organizations use a Multi-Factor Authentication (MFA) application that supports only Windows and Mac systems. Users with unsupported operating systems, like Linux, are denied access due to system checks.

Problem Analysis

Web-based MFA applications often use properties such as navigator.userAgent, navigator.userAgentData.platform, navigator.platform, and navigator.userAgentData.getHighEntropyValues to detect the user's operating system. Although there is an option to modify the user agent, other properties also need emulation to fully mimic a Windows environment.

Technical Details

The implementation introduce a new PlatformEmulator class. It will be executed as part of preload script for chromium. This class will override specified property to emulate windows platform.

Solution

Add the emulateWinChromiumPlatform flag to the CLI and configuration file, allowing users to opt-in to Windows platform emulation in Chromium browsers. This flag is turned off by default to avoid interference with existing workflows.

Documentation

Updated the README and the configuration documentation to include instructions on how to use the new emulateWinChromiumPlatform flag.

Potential Impacts

This change should not impact existing users as the default behavior remains unchanged. The feature is opt-in to ensure that only users needing this emulation enable it.

@IsmaelMartinez
Copy link
Owner

HI @3wweiweiwu , thanks a lot for contributing! I am hoping to release 1st the other PR (#1393). Then, if you could update the package.json file and the appdata (as described in https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/CONTRIBUTING.md#release-process) I can then merge it. But I will wait until the other PR is merged (so this would be released as 1.10.2). Thanks again!

@IsmaelMartinez
Copy link
Owner

1.10.1 is now out. If you can rebase and make the changes mentioned in my previous comment, then I can release this. (your version should be 1.10.2). Thanks!

@3wweiweiwu
Copy link
Contributor Author

1.10.1 is now out. If you can rebase and make the changes mentioned in my previous comment, then I can release this. (your version should be 1.10.2). Thanks!

I just re-based the PR, can you help to check?

@IsmaelMartinez
Copy link
Owner

looks good to me.

Can you update the package.json file and the appdata (as described in https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/CONTRIBUTING.md#release-process). I can't make the changes on your branch.

Then we can release it. Thanks again for your contribution!

@3wweiweiwu
Copy link
Contributor Author

looks good to me.

Can you update the package.json file and the appdata (as described in https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/CONTRIBUTING.md#release-process). I can't make the changes on your branch.

Then we can release it. Thanks again for your contribution!

Updated package.json and app.xml. Thank you for your continuous support and guidance!

@IsmaelMartinez IsmaelMartinez merged commit dea645b into IsmaelMartinez:develop Sep 10, 2024
2 checks passed
Copy link

sonarcloud bot commented Sep 10, 2024

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Sep 10, 2024

That is merged! It will be out at some point today (hopefully soon). As it is behind a flag/config option, this will go directly to a release.

Are you able to put a we example configuration on how this will work? That way other users that have been having problems with MFA can take advantage of it. Just a few comments in here will do (I can put it in a readme file later on once is tested by many)

Thanks again for contributing!

@IsmaelMartinez
Copy link
Owner

released! https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v1.10.2

@FranzXaver
Copy link

Thanks for this feature, this is exactly what I needed as my company also blocks Linux from MFA.
I had to also set the chromeUserAgent for it to work though, is this as exepected?

@3wweiweiwu
Copy link
Contributor Author

Thanks for this feature, this is exactly what I needed as my company also blocks Linux from MFA. I had to also set the chromeUserAgent for it to work though, is this as exepected?

Yes, that is expected. You need to set both. Make sure your chromeUserAgent string is up-to-date as some MFA check chrome version as well.

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