简体   繁体   English

Java 3.0智能卡Servlet可以与Web服务器交互吗?

[英]Can a Java 3.0 Smart Card Servlet interact with a Webserver?

According to this oracle doc, Java 3.0 Smart Cards can have servlets installed onto them instead of the conventional java applets. 根据这个oracle doc,Java 3.0智能卡可以安装servlet而不是传统的Java applet。 Here is the according Oracle Doc. 这是相应的Oracle Doc。

http://www.oracle.com/technetwork/articles/java/javacard-servlets-136657.html http://www.oracle.com/technetwork/articles/java/javacard-servlets-136657.html

"Developers no longer need to create individual client applications to access the data and resources on the smart card. The only client interface needed is an ordinary web browser. Smart Card applications are now fully functioning TCP-based servers. These server applications are Java servlets, and they have a full HTTP stack to allow them to process GET requests, POST requests, headers, cookies, sessions, and so on. You can secure the data between the client (the browser) and the server (the smart card) by using the industry-standard SSL (secure sockets layer)." “开发人员不再需要创建单独的客户端应用程序来访问智能卡上的数据和资源。唯一需要的客户端界面是普通的Web浏览器。智能卡应用程序现在是基于TCP的完全运行的服务器。这些服务器应用程序是Java servlet ,它们有一个完整的HTTP堆栈,允许它们处理GET请求,POST请求,标题,cookie,会话等。您可以通过以下方式保护客户端(浏览器)和服务器(智能卡)之间的数据。使用行业标准的SSL(安全套接字层)。“

My situation is that i want to interact with a user's smart card from my website. 我的情况是我想从我的网站与用户的智能卡进行交互。 Conventional methods, using Java Applets within the HTML on my website is no longer supported, Java Web Start is inefficient and not user friendly. 不再支持在我的网站上使用HTML内的Java Applet的传统方法,Java Web Start效率低且用户不友好。

A straightforward example is PIN verification. 一个简单的例子是PIN验证。 A 4 digit pin is stored on the smart card. 一个4位数的引脚存储在智能卡上。 My website will prompt the user to enter their PIN, insert their smart card to their reader. 我的网站将提示用户输入他们的PIN,将他们的智能卡插入他们的读卡器。 My website will be able to send the necessary APDU command that have their entered PIN to the card, and will be able to receive the response APDU commands that lets the web server know if the PIN was correct or not. 我的网站将能够将具有输入的PIN的必要APDU命令发送到卡,并且能够接收响应APDU命令,以使Web服务器知道PIN是否正确。

My question is, is it possible to have my website interact with a user's smart card, given the capabilities of a Servlet being executed on the smart card? 我的问题是,考虑到在智能卡上执行Servlet的功能,是否可以让我的网站与用户的智能卡进行交互?

If so, can someone please provide me with some simple pseudo or direction to accomplishing this? 如果是这样,有人可以给我一些简单的伪或指示来完成这个吗? I havent worked with servlets but i can learn. 我没有使用servlet,但我可以学习。

What you are describing is part of the API called the Java Card Connected edition. 您所描述的是API的一部分,称为Java Card Connected版本。 Most - if not all - Java Card implementations on the market are Java Card Classic editions. 大多数 - 如果不是全部 - 市场上的Java Card实现是Java Card Classic版本。 The main technical issue of the connected edition is that it requires smart cards with a memory of 24 to 32 KiB of memory. 连接版的主要技术问题是它需要具有24至32 KiB内存的智能卡。 That may not sound a lot, but on-die SRAM is very expensive. 这可能听起来不是很多,但片上SRAM 非常昂贵。 High end "classic" cards feature about 8 to 12 KiB of RAM. 高端“经典”卡具有大约8到12 KiB的RAM。

To have some sort of interaction with the website you need some kind of connection. 要与网站进行某种互动,您需要某种连接。 Somehow you need to convert this HTTP(S) request to packets send to the card and back. 不知何故,您需要将此HTTP(S)请求转换为发送到卡并返回的数据包。 As long as no software is installed to do so you won't be able to connect the browser to the smart card. 只要没有安装任何软件,您将无法将浏览器连接到智能卡。


There are of course various solutions out there when it comes to connecting browsers to smart cards. 当然,在将浏览器连接到智能卡时,有各种解决方案。 Proprietary browser plugins, PKCS#11 modules, applets. 专有的浏览器插件,PKCS#11模块,小程序。 You already named webstart and the dwindling Java (Standard Edition) applets. 您已经命名为webstart和逐渐减少的Java(标准版)小程序。 All have their pros and cons. 一切都有其优点和缺点。 In most situations Java Card Connected is not directly applicable - unfortunately. 在大多数情况下,Java Card Connected不直接适用 - 不幸的是。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM