Project

General

Profile

Control Interface » History » Version 23

Tobias Wich, 11/25/2013 10:06 AM

1 8 Tobias Wich
h1. Client Control Interface
2 1 Moritz Horsch
3 8 Tobias Wich
The Client Control Interface is http based. The webserver of the eCard client is available only under http://localhost:24724.
4 1 Moritz Horsch
5 8 Tobias Wich
h2. Activation
6
7
*URL*
8
@http://127.0.0.1:24727/eID-Client@
9
10
*Method*
11
GET
12
13
*Query*
14
| tcTokenURL    | The URL determines where the client can retrieve the TC Token. See TR-03112-7, section 3.2 | Mandatory | 
15
| ifdName       | The ifdName determines the card terminal.|  Optional[1] | 
16
| contextHandle | The contextHandle addresses a specific IFD. | Optional[1] | 
17
| slotHandle    | The slotHandle determines a connected eCard. See TR-03112-6, section 3.2.1. | Optional[1] | 
18
| cardType      | The cardType determines the type of card which must be selected. | Optional[1] |
19
20
*Returns*
21
| 200 OK                    | The refresh address is comprised in the Message Body (Hack for Mac OS Safari). |
22
| 303 See Other             | The Location field in the response should contain the refresh address. |
23
| 400 Bad Request           | Malformed GET request, e.g. parameters are missing. |
24
| 500 Internal Server Error | Other errors. |
25 20 Tobias Wich
| 502 Bad Gateway           | Server where the TCToken was requested, didn't answer or returned an invalid response. |
26 8 Tobias Wich
27
*Content-Types*
28
| text/html | Webpage with user evaluatable content. E.g. error page, manual redirect, ... |
29
30
31
*Description*
32
The interface can be used to start the eID application.
33
34
The parameters ifdName, contextHandle, slotHandle and cardType address a particular eCard, or a type of card.
35
There are three meaningful combinations of the optional parameters:
36
* _none_
37
 Use the fist nPa available. Display a "Please insert nPa" dialog if needed. This is the behaviour of the AusweisApp.
38 13 Tobias Wich
 In other words the lack of the cardType parameter sets it to the default value @http://bsi.bund.de/cif/npa.xml@, and thus the next rule becomes effective.
39 8 Tobias Wich
* _cardType_
40
 Use the fist card of the specified type which is available. Display a "Please insert <cardType>" dialog if needed.
41 13 Tobias Wich
 A special case must be made when software certificates (cardType=@http://openecard.org/cif/soft-credential@) are used. In that case no dialog is shown, when there is no certificate. Instead an error is produced.
42 8 Tobias Wich
* _ifdName_, _contextHandle_, _slotHandle_
43
 Use exactly the card matching the parameters.
44 13 Tobias Wich
  cardType is requested from the selected card directly. If there is no such card, an error is produced.
45 8 Tobias Wich
46
47
*Notes*
48
49 1 Moritz Horsch
<pre>
50
TODO
51
* What happens if the Client Activator cannot start an application?
52
</pre>
53
54 11 Tobias Wich
During the processing of the activation, a TCToken is fetched from a remote server.
55
The TCToken is defined as follows:
56
<pre><code class="xml">
57
<element name="TCToken" type="TCTokenType" />
58 1 Moritz Horsch
59 11 Tobias Wich
<complexType name="TCTokenType">
60
  <sequence>
61
    <element name="ServerAddress" type="anyURI" />
62
    <element name="SessionIdentifier" type="string" />
63
    <element name="RefreshAddress" type="anyURI" />
64
    <element name="Binding" type="anyURI" maxOccurs="1" minOccurs="0"/>
65
    <element name="PathSecurity-Protocol" type="anyURI" />
66 21 Johannes Schmölz
    <element name="PathSecurity-Parameters" maxOccurs="1" minOccurs="0">
67 11 Tobias Wich
      <complexType>
68
        <choice>
69
          <element name="PSK" type="hexBinary" />
70
        </choice>
71
      </complexType>
72
    </element>
73
  </sequence>
74
</complexType>
75
</code></pre>
76 1 Moritz Horsch
77 11 Tobias Wich
The contents of the elements are defined as follows:
78
* ServerAddress
79
 Must contain a https-URL which shall be used by the eCA to connect to the authentication server.
80
* SessionIdentifier
81
 Must contain a unique identifier of the current authentication session.
82
* RefreshAddress
83
 Must be a https-URL. The eCA redirects the browser to this URL (or the URL retrieved by following redirects starting from this URL) after conclusion of the online authentication.
84
* Binding
85
 May be used to indicate that an authentication protocol according to [ISO24727-3] is to be performed over the session between eCA and the authentication server.
86
 Currently the following values are defined:
87
** @urn:liberty:paos:2006-08@
88 23 Tobias Wich
** @urn:ietf:rfc:2616@
89 11 Tobias Wich
* PathSecurity-Protocol
90
 This element specifies the security protocol, which is to be used for securing the connection between eCA and AS.
91
 Currently the following values are defined:
92 12 Tobias Wich
** @urn:ietf:rfc:4346@
93 11 Tobias Wich
   TLS according to [RFC4346].
94
** @urn:ietf:rfc:4279@
95
   TLS-PSK according to [RFC4279].
96
** @urn:ietf:rfc:5487@
97
   TLS-PSK with a cipher suite according to [RFC5487].
98
* PathSecurity-Parameter
99
   Must be present to supply path security parameters such as PSK values.
100
101
The following changes are made to the token type defined in [eCard-7]:
102
* Binding is optional to use solely the transport protocol for authentication.
103 12 Tobias Wich
* PathSecurity-Protocol has an additional value. (@urn:ietf:rfc:4346@)
104 11 Tobias Wich
* PathSecurity-Parameter is optional because of the additional default TLS Protocol.
105 8 Tobias Wich
106
h2. GetStatus[1]
107
108
*URL*
109
@http://127.0.0.1:24727/getStatus@
110
111
*Method*
112
GET
113
114
*Query*
115
| session | The session parameter establishes an event queue for further requests with waitforChange. | Optional | 
116
117
*Returns*
118
| 200 OK                    | Status element (see below). |
119 14 Tobias Wich
| 400 Bad Request           | Malformed GET request, e.g. session parameter is too weak. | 
120 8 Tobias Wich
| 500 Internal Server Error | Errors in the smartcard stack or the webserver. |
121
122 16 Tobias Wich
<pre><code class="xml">
123 18 Tobias Wich
<complexType name="StatusType" xmlns:oec="http://ws.openecard.org/schema" targetNamespace="http://ws.openecard.org/schema">
124 16 Tobias Wich
  <sequence>
125
    <element name="ConnectionHandle" type="iso:ConnectionHandleType" maxOccurs="unbounded" minOccurs="0" />
126
    <element name="UserAgent"                                        maxOccurs="1"         minOccurs="0">
127
      <complexType>
128 17 Tobias Wich
        <sequence>
129
          <element name="Name"            type="string" />
130
          <element name="VersionMajor"    type="integer" />
131
          <element name="VersionMinor"    type="integer" maxOccurs="1" minOccurs="0" />
132
          <element name="VersionSubminor" type="integer" maxOccurs="1" minOccurs="0" />
133
        </sequence>
134 16 Tobias Wich
      </complexType>
135
    </element>
136
    <element name="SupportedAPIVersions" maxOccurs="unbounded" minOccurs="0">
137
      <complexType>
138 17 Tobias Wich
        <sequence>
139
          <element name="Name"            type="string" />
140
          <element name="VersionMajor"    type="integer" />
141
          <element name="VersionMinor"    type="integer" maxOccurs="1" minOccurs="0"/>
142
          <element name="VersionSubminor" type="integer" maxOccurs="1" minOccurs="0"/>
143
        </sequence>
144 16 Tobias Wich
      </complexType>
145
    </element>
146 22 Tobias Wich
    <element name="SupportedCards" maxOccurs="unbounded" minOccurs="0">
147
      <complexType>
148
        <sequence>
149
          <element name="CardType" type="anyURI" maxOccurs="1" minOccurs="1" />
150
          <element name="DIDProtocols" type="anyURI" maxOccurs="unbounded" minOccurs="0" />
151
        </sequence>
152
      </complexType>
153
    </element>
154 16 Tobias Wich
    <element name="SupportedDIDProtocols" type="anyURI" maxOccurs="unbounded" minOccurs="0" />
155
    <element name="AdditionalFeatures"    type="anyURI" maxOccurs="unbounded" minOccurs="0" />
156 1 Moritz Horsch
  </sequence>
157
</complexType>
158
159
<element name="Status">
160
  <complexType>
161
    <complexContent>
162
      <extension base="oec:StatusType">
163 17 Tobias Wich
        <sequence />
164 1 Moritz Horsch
      </extension>
165
    </complexContent>
166
  </complexType>
167
</element>
168
</code></pre>
169 17 Tobias Wich
170
The contents of the Status element are defined as follows:
171
* ConnectionHandle
172
  List of ConnectionHandles reflecting the currently available terminals, cards and their types.
173
* UserAgent
174
  Description of the user agent (client). 
175
** Name must be set to "Open eCard App" for all client types of the Open eCard App.
176
** VersionMajor, VersionMinor and VersionSubminor correspond to the major, minor and patch fields in the Version class.
177
   (see source:common/src/main/java/org/openecard/client/common/Version.java)
178
* SupportedAPIVersions
179 1 Moritz Horsch
  This element names and describes all supported API versions. At the moment, this is solely the eCard-API.
180
** Name and the version elements are one of
181 17 Tobias Wich
*** @http://www.bsi.bund.de/ecard/api@, 1, 1, @not set@
182 22 Tobias Wich
* SupportedCards
183
  List of supported DIDProtocols per card type. That means the list of DIDProtocols, for which an implementation exists and which are listed in the respective CardInfo file.
184 17 Tobias Wich
* SupportedDIDProtocols
185
  List of supported DID protocols. That means the list of SAL modules' DID protocol URIs registered in the client.
186
* AdditionalFeatures
187
  Not yet defined, but could be further stuff like a Signature plugin etc.
188 8 Tobias Wich
189
*Content-Types*
190
| text/xml  | The Status element. |
191 15 Tobias Wich
| text/html | Message in case of an error. |
192 8 Tobias Wich
193
194
*Description*
195
The interface can be used to request information about the eID application and its current state.
196
197
h2. WaitForChange
198
199
*URL*
200
@http://127.0.0.1:24727/waitForChange@
201
202
*Method*
203 1 Moritz Horsch
GET
204 8 Tobias Wich
205
*Query*
206 10 Tobias Wich
| session | The session of a previously set up event queue (see [[Client_Activation#GetStatus1|GetStatus]]). | Mandatory | 
207 8 Tobias Wich
208
*Returns*
209
| 200 OK                    | StatusChange element (see below). |
210 14 Tobias Wich
| 400 Bad Request           | Malformed GET request, e.g. session parameter is too weak. |
211 8 Tobias Wich
| 500 Internal Server Error | Errors in the smartcard stack or the webserver. |
212
213 19 Tobias Wich
<pre><code class="xml">
214
<complexType name="StatusChangeType" xmlns:oec="http://ws.openecard.org/schema" targetNamespace="http://ws.openecard.org/schema">
215
  <sequence>
216
    <element name="ConnectionHandle" type="iso:ConnectionHandleType" maxOccurs="1" minOccurs="1" />
217
    <element name="Action"           type="anyURI"                   maxOccurs="1" minOccurs="1" />
218
  </sequence>
219
</complexType>
220
221
<element name="StatusChange">
222
  <complexType>
223
    <complexContent>
224
      <extension base="oec:StatusChangeType">
225
        <sequence />
226
      </extension>
227
    </complexContent>
228
  </complexType>
229
</element>
230
</code></pre>
231
232
The contents of the StatusChange element are defined as follows:
233
234
* ConnectionHandle
235
  The meaning of the ConnectionHandle parameter is exactly as in the StartPAOS call defined in [BSI-TR-03112-7, Section 2.6].
236
* Action
237
  This element contains the URI describing the event. Currently there are the following event types defined:
238
** http://openecard.org/event/terminal_added
239
** http://openecard.org/event/terminal_removed
240
** http://openecard.org/event/card_inserted
241
** http://openecard.org/event/card_removed
242
** http://openecard.org/event/card_recognized
243
244 8 Tobias Wich
245
*Content-Types*
246
| text/xml  | The StatusChange element. |
247 15 Tobias Wich
| text/html | Message in case of an error. |
248 8 Tobias Wich
249
250
*Description*
251
The interface can be used to request status change information after an initial GetStatus call.
252
253
254
---
255
256
fn1. Openecard proposal: This parameter/interface is an Open eCard specific extension. It is not part of the official eCard specification.