chromeos_smart_card_connector icon indicating copy to clipboard operation
chromeos_smart_card_connector copied to clipboard

Fix NaCl initialization issues when running on desktop OSes

Open emaxx-google opened this issue 4 years ago • 4 comments

Currently, usage of the "make run"/"make test" commands in the repository is burdened due to NaCl initialization errors returned by Chrome.

The errors are transient and go away after waiting for ~1 minute, but it's still making the development process much more cumbersome.

Meanwhile we don't officially support the Smart Card Connector app on non Chrome OS systems, we could look into fixing that issue in order to simplify development experience.

One potential idea is to add retries into our JS code that loads NaCl modules.

emaxx-google avatar Jun 05 '20 15:06 emaxx-google

What would be required to get this working on non Chrome OS systems?

hcldan avatar Sep 08 '21 19:09 hcldan

@hcldan Do you mean this particular bug report (delayed NaCl initialization in tests) or the Smart Card Connector in general? For the former, we're not actively investing into NaCl support anymore, given that the framework has been long deprecated.

As for the latter, the Connector app can technically work on desktop platforms, but in a typical user setup this would be useless, since the OS-level drivers/daemons already grab the USB access before Chrome. It can be made working, but after disabling those OS-level systems, which is obviously too cumbersome for the end user and would break other smart card applications that run outside Chrome. To put it differently, Chrome OS is unique in the sense that it doesn't have OS-level smart card drivers/middleware, and that role is delegated to extensions via the chrome.certificateProvider API. I'm curious to know about your use case.

emaxx-google avatar Sep 08 '21 20:09 emaxx-google

@emaxx-google I'm exploring ways on how to do smartcard e2e encryption via the web. Ideally my PWA would have capabilities to do this like a native app would.

I thought if this worked on chrome in general, I might be able to bundle my pwa with an extension that would call into this, and let me access the smartcard. Sounds like that's a dead end.

hcldan avatar Sep 08 '21 21:09 hcldan

@hcldan I see, thanks for explaining the use case. Based on what we just discussed, there doesn't seem to be a way to write such a single implementation that would work universally. I think you'd need to integrate with the OS-specific smart card stacks, potentially with the help of a companion "traditional" application that would be installed into the OS and communicated to via nativeMessaging.

emaxx-google avatar Sep 08 '21 21:09 emaxx-google

Closing the bug as there's no plan to support Smart Card Connector on desktop systems.

However, a quick update regarding cross-platform smart card development: there's an ongoing effort to bring a cross-platform "Web Smart Card API":

  • https://github.com/WICG/web-smart-card
  • https://bugs.chromium.org/p/chromium/issues/detail?id=1386175

emaxx-google avatar Jan 09 '24 16:01 emaxx-google