1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
7 HTTP Basic Authentication in FileReady messages
8 """""""""""""""""""""""""""""""""""""""""""""""
9 File ready message for http server is the same like in other protocols. The only difference is scheme set to
10 "http". Processed uri is in the form of:
14 scheme://userinfo@host:port/path
16 http://demo:demo123456!@example.com:80/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
18 If port number was not provided, port 80 is used by default.
20 Example file ready message is as follows:
24 curl --location --request POST 'https://portal.api.simpledemo.onap.org:30417/eventListener/v7' \
25 --header 'Content-Type: application/json' \
26 --header 'Authorization: Basic c2FtcGxlMTpzYW1wbGUx' \
29 "commonEventHeader": {
31 "vesEventListenerVersion": "7.0.1",
32 "domain": "notification",
33 "eventName": "Notification_gnb-Nokia_FileReady",
34 "eventId": "FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1",
35 "lastEpochMicrosec": 8745745764578,
37 "reportingEntityName": "NOK6061ZW3",
39 "sourceName": "NOK6061ZW3",
40 "startEpochMicrosec": 8745745764578,
41 "timeZoneOffset": "UTC+05.30"
43 "notificationFields": {
44 "changeIdentifier": "PM_MEAS_FILES",
45 "changeType": "FileReady",
46 "notificationFieldsVersion": "2.0",
47 "arrayOfNamedHashMap": [
49 "name": "C_28532_measData_file.xml",
51 "location": "http://login:password@server.com:80/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz",
52 "compression": "gzip",
53 "fileFormatType": "org.3GPP.32.435#measCollec",
54 "fileFormatVersion": "V10"
62 Note, more than one file from the same location can be added to the "arrayOfNamedHashMap". If so, they are downloaded
63 from the endpoint through single http connection.
65 HTTPS connection with DFC
66 """""""""""""""""""""""""
67 The file ready message for https server is the same as used in other protocols and http. The only difference is that the scheme is set to
73 "arrayOfNamedHashMap": [
75 "name": "C_28532_measData_file.xml",
77 "location": "https://login:password@server.com:443/file.xml.gz",
80 The processed uri depends on the https connection type that has to be established (client certificate authentication, basic
81 authentication, and no authentication).
83 For client certificate authentication:
87 scheme://host:port/path
89 https://example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
91 Authentication is based on the certificate used by the DFC.
93 For basic authentication:
97 scheme://userinfo@host:port/path
99 https://demo:demo123456!@example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
101 Authentication is based on the "userinfo" applied within the link.
103 If no authentication is required:
107 scheme://host:port/path
109 https://example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
111 Note, effective way of authentication depends of uri provided and http server configuration.
113 If port number was not supplied , port 443 is used by default.
114 Every file is sent through separate https connection.
116 JWT token in HTTP/HTTPS connection
117 """"""""""""""""""""""""""""""""""
119 JWT token is processed, if it is provided as a ``access_token`` in the query part of the **location** entry:
123 scheme://host:port/path?access_token=<token>
125 https://example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vIiwiaWF0IjoxNTE2MjM5MDIyfQ.MWyG1QSymi-RtG6pkiYrXD93ZY9NJzaPI-wS4MEpUto
127 JWT tokens are consumed both in HTTP and HTTPS connections. Using JWT token is optional. If it is provided, its
128 **validity is not verified**. Token is extracted to the HTTP header as ``Authorization: Bearer <token>`` and is **NOT**
129 used in URL in HTTP GET call. Only single JWT token entry in the query is acceptable. If more than one ''access_token''
130 entry is found in the query, such situation is reported as error and DFC tries to download file without token. Another
131 query parameters are not modified at all and are used in URL in HTTP GET call.
133 If both JWT token and basic authentication are provided, JWT token has the priority. Such situation is considered
134 as fault and is logged on warning level.