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
72 {"arrayOfNamedHashMap": [
74 "name": "C_28532_measData_file.xml",
76 "location": "https://login:password@server.com:443/file.xml.gz"
79 The processed uri depends on the https connection type that has to be established (client certificate authentication, basic
80 authentication, and no authentication).
82 For client certificate authentication:
86 scheme://host:port/path
88 https://example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
90 Authentication is based on the certificate used by the DFC.
92 For basic authentication:
96 scheme://userinfo@host:port/path
98 https://demo:demo123456!@example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
100 Authentication is based on the "userinfo" applied within the link.
102 If no authentication is required:
106 scheme://host:port/path
108 https://example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
110 Note, effective way of authentication depends of uri provided and http server configuration.
112 If port number was not supplied , port 443 is used by default.
113 Every file is sent through separate https connection.
115 JWT token in HTTP/HTTPS connection
116 """"""""""""""""""""""""""""""""""
118 JWT token is processed, if it is provided as a ``access_token`` in the query part of the **location** entry:
122 scheme://host:port/path?access_token=<token>
124 https://example.com:443/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vIiwiaWF0IjoxNTE2MjM5MDIyfQ.MWyG1QSymi-RtG6pkiYrXD93ZY9NJzaPI-wS4MEpUto
126 JWT tokens are consumed both in HTTP and HTTPS connections. Using JWT token is optional. If it is provided, its
127 **validity is not verified**. Token is extracted to the HTTP header as ``Authorization: Bearer <token>`` and is **NOT**
128 used in URL in HTTP GET call. Only single JWT token entry in the query is acceptable. If more than one ''access_token''
129 entry is found in the query, such situation is reported as error and DFC tries to download file without token. Another
130 query parameters are not modified at all and are used in URL in HTTP GET call.
132 If both JWT token and basic authentication are provided, JWT token has the priority. Such situation is considered
133 as fault and is logged on warning level.