Project

General

Profile

Control Interface » History » Version 37

Detlef Hühnlein, 09/25/2015 01:27 PM

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 35 Hans-Martin Haase
| 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 24 Tobias Wich
| slotIndex     | The slotIndex determines the slot in the terminal.| Optional[1] |
17 35 Hans-Martin Haase
| contextHandle | The contextHandle addresses a specific IFD. | Optional[1] |
18
| slotHandle    | The slotHandle determines a connected eCard. See TR-03112-6, section 3.2.1. | Optional[1] |
19 8 Tobias Wich
| cardType      | The cardType determines the type of card which must be selected. | Optional[1] |
20
21
*Returns*
22
| 200 OK                    | The refresh address is comprised in the Message Body (Hack for Mac OS Safari). |
23
| 303 See Other             | The Location field in the response should contain the refresh address. |
24
| 400 Bad Request           | Malformed GET request, e.g. parameters are missing. |
25
| 500 Internal Server Error | Other errors. |
26 20 Tobias Wich
| 502 Bad Gateway           | Server where the TCToken was requested, didn't answer or returned an invalid response. |
27 8 Tobias Wich
28
*Content-Types*
29
| text/html | Webpage with user evaluatable content. E.g. error page, manual redirect, ... |
30
31
32
*Description*
33
The interface can be used to start the eID application.
34
35
The parameters ifdName, contextHandle, slotHandle and cardType address a particular eCard, or a type of card.
36
There are three meaningful combinations of the optional parameters:
37
* _none_
38
 Use the fist nPa available. Display a "Please insert nPa" dialog if needed. This is the behaviour of the AusweisApp.
39 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.
40 8 Tobias Wich
* _cardType_
41
 Use the fist card of the specified type which is available. Display a "Please insert <cardType>" dialog if needed.
42 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.
43 8 Tobias Wich
* _ifdName_, _contextHandle_, _slotHandle_
44
 Use exactly the card matching the parameters.
45 13 Tobias Wich
  cardType is requested from the selected card directly. If there is no such card, an error is produced.
46 8 Tobias Wich
47
48 11 Tobias Wich
During the processing of the activation, a TCToken is fetched from a remote server.
49
The TCToken is defined as follows:
50
<pre><code class="xml">
51 28 Max Tuengerthal
<element name="TCToken" type="TCTokenType" />
52 1 Moritz Horsch
53 11 Tobias Wich
<complexType name="TCTokenType">
54
  <sequence>
55
    <element name="ServerAddress" type="anyURI" />
56
    <element name="SessionIdentifier" type="string" />
57 1 Moritz Horsch
    <element name="RefreshAddress" type="anyURI" />
58 25 Max Tuengerthal
    <element name="CommunicationErrorAddress" type="anyURI" minOccurs="0" />
59
    <element name="Binding" type="anyURI" />
60
    <element name="PathSecurity-Protocol" type="anyURI" minOccurs="0" />
61
    <element name="PathSecurity-Parameters" minOccurs="0">
62 11 Tobias Wich
      <complexType>
63
        <choice>
64
          <element name="PSK" type="hexBinary" />
65
        </choice>
66
      </complexType>
67
    </element>
68
  </sequence>
69
</complexType>
70
</code></pre>
71 1 Moritz Horsch
72 11 Tobias Wich
The contents of the elements are defined as follows:
73
* ServerAddress
74
 Must contain a https-URL which shall be used by the eCA to connect to the authentication server.
75 1 Moritz Horsch
* SessionIdentifier
76
 Must contain a unique identifier of the current authentication session.
77 11 Tobias Wich
* RefreshAddress
78
 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.
79 25 Max Tuengerthal
* CommunicationErrorAddress
80 27 Tobias Wich
 If present, the eID-Client redirects the browser to this URL if an communication error occurred and no valid refreshURL could be determined. The URL MAY contain a session ID.
81 11 Tobias Wich
* Binding
82 25 Max Tuengerthal
 Must 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.
83 11 Tobias Wich
 Currently the following values are defined:
84
** @urn:liberty:paos:2006-08@
85 23 Tobias Wich
** @urn:ietf:rfc:2616@
86 11 Tobias Wich
* PathSecurity-Protocol
87
 This element specifies the security protocol, which is to be used for securing the connection between eCA and AS.
88
 Currently the following values are defined:
89 12 Tobias Wich
** @urn:ietf:rfc:4346@
90 32 Tobias Wich
   TLSv1.1 according to [RFC4346].
91
** @urn:ietf:rfc:5246@
92
   TLSv1.2 according to [RFC5246].
93 11 Tobias Wich
** @urn:ietf:rfc:4279@
94
   TLS-PSK according to [RFC4279].
95
* PathSecurity-Parameter
96 32 Tobias Wich
   May be present to supply path security parameters such as PSK values. Must be present if PathSecurity-Protocol is @urn:ietf:rfc:4279@.
97 11 Tobias Wich
98 29 Max Tuengerthal
The following changes are made to the token type defined in [TR-03124-1]:
99 32 Tobias Wich
* PathSecurity-Protocol has additional values. (@urn:ietf:rfc:4346@, @urn:ietf:rfc:5246@)
100 30 Max Tuengerthal
* PathSecurity-Parameter is optional because of the additional TLS protocol (@urn:ietf:rfc:4346@).
101 8 Tobias Wich
102 36 Hans-Martin Haase
&nbsp;
103
104 8 Tobias Wich
h2. GetStatus[1]
105
106
*URL*
107
@http://127.0.0.1:24727/getStatus@
108
109 34 Hans-Martin Haase
or 
110 1 Moritz Horsch
111 36 Hans-Martin Haase
@http://127.0.0.1:24727/eID-Client@
112 34 Hans-Martin Haase
113
The second URL was made available later to be conform to the newest version of BSI-TR03124.
114
115 8 Tobias Wich
*Method*
116
GET
117 1 Moritz Horsch
118
*Query*
119 36 Hans-Martin Haase
| session | The session parameter establishes an event queue for further requests with waitforChange.                                                  | Optional                 |
120
| Status  | The Status parameter is restricted to be used with the second URL and indicates that the status is requested from the eID-Client resource. | Mandatory for second URL |
121 8 Tobias Wich
122
*Returns*
123
| 200 OK                    | Status element (see below). |
124 35 Hans-Martin Haase
| 400 Bad Request           | Malformed GET request, e.g. session parameter is too weak. |
125 8 Tobias Wich
| 500 Internal Server Error | Errors in the smartcard stack or the webserver. |
126
127 16 Tobias Wich
<pre><code class="xml">
128 18 Tobias Wich
<complexType name="StatusType" xmlns:oec="http://ws.openecard.org/schema" targetNamespace="http://ws.openecard.org/schema">
129 16 Tobias Wich
  <sequence>
130
    <element name="ConnectionHandle" type="iso:ConnectionHandleType" maxOccurs="unbounded" minOccurs="0" />
131
    <element name="UserAgent"                                        maxOccurs="1"         minOccurs="0">
132
      <complexType>
133 17 Tobias Wich
        <sequence>
134
          <element name="Name"            type="string" />
135
          <element name="VersionMajor"    type="integer" />
136
          <element name="VersionMinor"    type="integer" maxOccurs="1" minOccurs="0" />
137
          <element name="VersionSubminor" type="integer" maxOccurs="1" minOccurs="0" />
138
        </sequence>
139 16 Tobias Wich
      </complexType>
140
    </element>
141
    <element name="SupportedAPIVersions" maxOccurs="unbounded" minOccurs="0">
142
      <complexType>
143 17 Tobias Wich
        <sequence>
144
          <element name="Name"            type="string" />
145
          <element name="VersionMajor"    type="integer" />
146
          <element name="VersionMinor"    type="integer" maxOccurs="1" minOccurs="0"/>
147
          <element name="VersionSubminor" type="integer" maxOccurs="1" minOccurs="0"/>
148
        </sequence>
149 16 Tobias Wich
      </complexType>
150
    </element>
151 22 Tobias Wich
    <element name="SupportedCards" maxOccurs="unbounded" minOccurs="0">
152
      <complexType>
153
        <sequence>
154
          <element name="CardType" type="anyURI" maxOccurs="1" minOccurs="1" />
155
          <element name="DIDProtocols" type="anyURI" maxOccurs="unbounded" minOccurs="0" />
156
        </sequence>
157
      </complexType>
158
    </element>
159 16 Tobias Wich
    <element name="SupportedDIDProtocols" type="anyURI" maxOccurs="unbounded" minOccurs="0" />
160
    <element name="AdditionalFeatures"    type="anyURI" maxOccurs="unbounded" minOccurs="0" />
161 1 Moritz Horsch
  </sequence>
162
</complexType>
163
164
<element name="Status">
165
  <complexType>
166
    <complexContent>
167
      <extension base="oec:StatusType">
168 17 Tobias Wich
        <sequence />
169 1 Moritz Horsch
      </extension>
170
    </complexContent>
171
  </complexType>
172
</element>
173
</code></pre>
174 17 Tobias Wich
175
The contents of the Status element are defined as follows:
176
* ConnectionHandle
177
  List of ConnectionHandles reflecting the currently available terminals, cards and their types.
178
* UserAgent
179
  Description of the user agent (client). 
180
** Name must be set to "Open eCard App" for all client types of the Open eCard App.
181
** VersionMajor, VersionMinor and VersionSubminor correspond to the major, minor and patch fields in the Version class.
182
   (see source:common/src/main/java/org/openecard/client/common/Version.java)
183
* SupportedAPIVersions
184 1 Moritz Horsch
  This element names and describes all supported API versions. At the moment, this is solely the eCard-API.
185
** Name and the version elements are one of
186 17 Tobias Wich
*** @http://www.bsi.bund.de/ecard/api@, 1, 1, @not set@
187 22 Tobias Wich
* SupportedCards
188
  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.
189 17 Tobias Wich
* SupportedDIDProtocols
190
  List of supported DID protocols. That means the list of SAL modules' DID protocol URIs registered in the client.
191
* AdditionalFeatures
192
  Not yet defined, but could be further stuff like a Signature plugin etc.
193 8 Tobias Wich
194
*Content-Types*
195
| text/xml  | The Status element. |
196 15 Tobias Wich
| text/html | Message in case of an error. |
197 8 Tobias Wich
198
199 1 Moritz Horsch
*Description*
200
The interface can be used to request information about the eID application and its current state.
201 36 Hans-Martin Haase
202
&nbsp;
203
204
h2. ShowUI
205
206
*URL*
207
@http://127.0.0.1:24727/eID-Client@
208
209
*Method*
210
GET
211
212
*Query*
213
| ShowUI | The query parameter has to have a module name as value indicating the GUI component to open. | Mandatory |
214
215
*Returns*
216
| 200 OK | The GUI was opened successfully there are no other status codes. |
217
218
*Content Types*
219
none
220
221
*Description*
222
The interface opens an GUI component which is specified by the components name in the ShowUI query parameter. The following components are currently accessible:
223
224
| PINManagement | Opens the UI for the PIN management |
225
| Settings      | Opens the Settings dialog           |
226
227
If the parameter @ShowUI@ does not contain a module name or contains a unknown module name the default UI is opened. In case of the Swing GUI this is the About dialog.
228
229
&nbsp;
230 8 Tobias Wich
231
h2. WaitForChange
232
233
*URL*
234
@http://127.0.0.1:24727/waitForChange@
235
236
*Method*
237 1 Moritz Horsch
GET
238 8 Tobias Wich
239
*Query*
240 10 Tobias Wich
| session | The session of a previously set up event queue (see [[Client_Activation#GetStatus1|GetStatus]]). | Mandatory | 
241 8 Tobias Wich
242
*Returns*
243
| 200 OK                    | StatusChange element (see below). |
244 14 Tobias Wich
| 400 Bad Request           | Malformed GET request, e.g. session parameter is too weak. |
245 8 Tobias Wich
| 500 Internal Server Error | Errors in the smartcard stack or the webserver. |
246
247 19 Tobias Wich
<pre><code class="xml">
248
<complexType name="StatusChangeType" xmlns:oec="http://ws.openecard.org/schema" targetNamespace="http://ws.openecard.org/schema">
249
  <sequence>
250
    <element name="ConnectionHandle" type="iso:ConnectionHandleType" maxOccurs="1" minOccurs="1" />
251
    <element name="Action"           type="anyURI"                   maxOccurs="1" minOccurs="1" />
252
  </sequence>
253
</complexType>
254
255
<element name="StatusChange">
256
  <complexType>
257
    <complexContent>
258
      <extension base="oec:StatusChangeType">
259
        <sequence />
260
      </extension>
261
    </complexContent>
262
  </complexType>
263
</element>
264
</code></pre>
265
266
The contents of the StatusChange element are defined as follows:
267
268
* ConnectionHandle
269
  The meaning of the ConnectionHandle parameter is exactly as in the StartPAOS call defined in [BSI-TR-03112-7, Section 2.6].
270
* Action
271
  This element contains the URI describing the event. Currently there are the following event types defined:
272
** http://openecard.org/event/terminal_added
273
** http://openecard.org/event/terminal_removed
274
** http://openecard.org/event/card_inserted
275
** http://openecard.org/event/card_removed
276
** http://openecard.org/event/card_recognized
277
278 8 Tobias Wich
279
*Content-Types*
280
| text/xml  | The StatusChange element. |
281 15 Tobias Wich
| text/html | Message in case of an error. |
282 8 Tobias Wich
283
284
*Description*
285
The interface can be used to request status change information after an initial GetStatus call.
286
287
288
---
289
290
fn1. Openecard proposal: This parameter/interface is an Open eCard specific extension. It is not part of the official eCard specification.