@@ -140,7 +140,7 @@ tutorial:
140140
141141## :arrow_forward : Video : Introduction to Wilma PEP Proxy
142142
143- [ ![ ] ( https://fiware.github.io/tutorials.Step-by-Step/img/video-logo.png )] ( https://www.youtube.com/watch?v=8tGbUI18udM " Introduction " )
143+ [ ![ ] ( https://fiware.github.io/tutorials.Step-by-Step/img/video-logo.png )] ( https://www.youtube.com/watch?v=8tGbUI18udM ' Introduction ' )
144144
145145Click on the image above to see an introductory video
146146
@@ -418,7 +418,7 @@ accounts can be created by using either the Keyrock GUI or by using the REST API
418418
419419## :arrow_forward : Video : Wilma PEP Proxy Configuration
420420
421- [ ![ ] ( https://fiware.github.io/tutorials.Step-by-Step/img/video-logo.png )] ( https://www.youtube.com/watch?v=b4sYU78skrw " PEP Proxy Configuration " )
421+ [ ![ ] ( https://fiware.github.io/tutorials.Step-by-Step/img/video-logo.png )] ( https://www.youtube.com/watch?v=b4sYU78skrw ' PEP Proxy Configuration ' )
422422
423423Click on the image above to see a video about configuring the Wilma PEP Proxy using the ** Keyrock** GUI
424424
@@ -692,9 +692,9 @@ orion-proxy:
692692 depends_on :
693693 - keyrock
694694 ports :
695- - " 1027:1027"
695+ - ' 1027:1027'
696696 expose :
697- - " 1027"
697+ - ' 1027'
698698 environment :
699699 - PEP_PROXY_APP_HOST=orion
700700 - PEP_PROXY_APP_PORT=1026
@@ -760,21 +760,21 @@ tutorial-app:
760760 aliases:
761761 - tutorial
762762 expose:
763- - " 3000"
764- - " 3001"
763+ - ' 3000'
764+ - ' 3001'
765765 ports:
766- - " 3000:3000"
767- - " 3001:3001"
766+ - ' 3000:3000'
767+ - ' 3001:3001'
768768 environment:
769- - " WEB_APP_PORT=3000"
770- - " SECURE_ENDPOINTS=true"
771- - " CONTEXT_BROKER=http://orion-proxy:1027/v2"
772- - " KEYROCK_URL=http://localhost"
773- - " KEYROCK_IP_ADDRESS=http://172.18.1.5"
774- - " KEYROCK_PORT=3005"
775- - " KEYROCK_CLIENT_ID=tutorial-dckr-site-0000-xpresswebapp"
776- - " KEYROCK_CLIENT_SECRET=tutorial-dckr-site-0000-clientsecret"
777- - " CALLBACK_URL=http://localhost:3000/login"
769+ - ' WEB_APP_PORT=3000'
770+ - ' SECURE_ENDPOINTS=true'
771+ - ' CONTEXT_BROKER=http://orion-proxy:1027/v2'
772+ - ' KEYROCK_URL=http://localhost'
773+ - ' KEYROCK_IP_ADDRESS=http://172.18.1.5'
774+ - ' KEYROCK_PORT=3005'
775+ - ' KEYROCK_CLIENT_ID=tutorial-dckr-site-0000-xpresswebapp'
776+ - ' KEYROCK_CLIENT_SECRET=tutorial-dckr-site-0000-clientsecret'
777+ - ' CALLBACK_URL=http://localhost:3000/login'
778778` ` `
779779
780780All of the `tutorial` container settings have been described in previous tutorials. One important change is necessary
@@ -802,7 +802,7 @@ To start the system with a PEP Proxy protecting access to **Orion**, run the fol
802802
803803# ## :arrow_forward: Video : Securing A REST API
804804
805- [](https://www.youtube.com/watch?v=coxFQEY0_So " Securing a REST API" )
805+ [](https://www.youtube.com/watch?v=coxFQEY0_So ' Securing a REST API' )
806806
807807Click on the image above to see a video about securing a REST API using the Wilma PEP Proxy
808808
@@ -918,7 +918,7 @@ the User. The `access_token` is stored in session:
918918
919919` ` ` javascript
920920function userCredentialGrant(req, res) {
921- debug(" userCredentialGrant" );
921+ debug(' userCredentialGrant' );
922922
923923 const email = req.body.email;
924924 const password = req.body.password;
@@ -936,7 +936,7 @@ For each subsequent request, the `access_token` is supplied in the `X-Auth-Token
936936function setAuthHeaders(req) {
937937 const headers = {};
938938 if (req.session.access_token) {
939- headers[" X-Auth-Token" ] = req.session.access_token;
939+ headers[' X-Auth-Token' ] = req.session.access_token;
940940 }
941941 return headers;
942942}
@@ -950,18 +950,18 @@ async function buyItem(req, res) {
950950 const inventory = await retrieveEntity(
951951 req.params.inventoryId,
952952 {
953- options: " keyValues" ,
954- type: " InventoryItem"
953+ options: ' keyValues' ,
954+ type: ' InventoryItem'
955955 },
956956 setAuthHeaders(req)
957957 );
958958 const count = inventory.shelfCount - 1;
959959
960960 await updateExistingEntityAttributes(
961961 req.params.inventoryId,
962- { shelfCount: { type: " Integer" , value: count } },
962+ { shelfCount: { type: ' Integer' , value: count } },
963963 {
964- type: " InventoryItem"
964+ type: ' InventoryItem'
965965 },
966966 setAuthHeaders(req)
967967 );
@@ -991,14 +991,14 @@ kong-api-gateway:
991991 default :
992992 ipv4_address : 172.18.1.10
993993 ports :
994- - " 8000:8000/tcp"
994+ - ' 8000:8000/tcp'
995995 environment :
996996 - KONG_DATABASE=off
997997 - KONG_DECLARATIVE_CONFIG=/etc/kong/kong.yaml
998998 - KONG_PLUGINS=bundled,pep-plugin
999999 - KONG_PLUGINSERVER_NAMES= pep-plugin
1000- - " KONG_PLUGINSERVER_PEP_PLUGIN_QUERY_CMD=/go-plugins/pep-plugin -dump"
1001- - " KONG_PLUGINSERVER_PEP_PLUGIN_START_CMD=/go-plugins/pep-plugin"
1000+ - ' KONG_PLUGINSERVER_PEP_PLUGIN_QUERY_CMD=/go-plugins/pep-plugin -dump'
1001+ - ' KONG_PLUGINSERVER_PEP_PLUGIN_START_CMD=/go-plugins/pep-plugin'
10021002 - KONG_LOG_LEVEL=debug
10031003` ` `
10041004
@@ -1007,8 +1007,8 @@ and port of the proxied broker (`orion`)
10071007
10081008` ` ` yaml
10091009services:
1010- - host: " orion"
1011- name: " orion-oidc"
1010+ - host: ' orion'
1011+ name: ' orion-oidc'
10121012 port: 1026
10131013 protocol: http
10141014 routes:
@@ -1170,9 +1170,9 @@ iot-agent-proxy:
11701170 depends_on:
11711171 - keyrock
11721172 ports:
1173- - " 7897:7897"
1173+ - ' 7897:7897'
11741174 expose:
1175- - " 7897"
1175+ - ' 7897'
11761176 environment:
11771177 - PEP_PROXY_APP_HOST=iot-agent
11781178 - PEP_PROXY_APP_PORT=7896
@@ -1239,19 +1239,19 @@ tutorial-app:
12391239 aliases:
12401240 - tutorial
12411241 expose:
1242- - " 3000"
1243- - " 3001"
1242+ - ' 3000'
1243+ - ' 3001'
12441244 ports:
1245- - " 3000:3000"
1246- - " 3001:3001"
1245+ - ' 3000:3000'
1246+ - ' 3001:3001'
12471247 environment:
1248- - " IOTA_HTTP_HOST=iot-agent-proxy"
1249- - " IOTA_HTTP_PORT=7897"
1250- - " DUMMY_DEVICES_PORT=3001" # Port used by the dummy IoT devices to receive commands
1251- - " DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
1252- - " DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov"
1253- - " DUMMY_DEVICES_USER=iot_sensor_00000000-0000-0000-0000-000000000000"
1254- - " DUMMY_DEVICES_PASSWORD=test"
1248+ - ' IOTA_HTTP_HOST=iot-agent-proxy'
1249+ - ' IOTA_HTTP_PORT=7897'
1250+ - ' DUMMY_DEVICES_PORT=3001' # Port used by the dummy IoT devices to receive commands
1251+ - ' DUMMY_DEVICES_TRANSPORT=HTTP' # Default transport used by dummy IoT devices
1252+ - ' DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov'
1253+ - ' DUMMY_DEVICES_USER=iot_sensor_00000000-0000-0000-0000-000000000000'
1254+ - ' DUMMY_DEVICES_PASSWORD=test'
12551255` ` `
12561256
12571257The `tutorial` container hosts the dummy Ultralight sensors. Rather than accessing the **IoT Agent** directly on port
@@ -1338,15 +1338,15 @@ curl -X POST \
13381338When an IoT Sensor starts up, it must log-in like any other user to obtain an access token :
13391339
13401340` ` ` javascript
1341- const DUMMY_DEVICE_HTTP_HEADERS = { " Content-Type": " text/plain" };
1341+ const DUMMY_DEVICE_HTTP_HEADERS = { ' Content-Type': ' text/plain' };
13421342` ` `
13431343
13441344` ` ` javascript
13451345function initSecureDevices() {
13461346 Security.oa
13471347 .getOAuthPasswordCredentials(process.env.DUMMY_DEVICES_USER, process.env.DUMMY_DEVICES_PASSWORD)
13481348 .then((results) => {
1349- DUMMY_DEVICE_HTTP_HEADERS[" X-Auth-Token" ] = results.access_token;
1349+ DUMMY_DEVICE_HTTP_HEADERS[' X-Auth-Token' ] = results.access_token;
13501350 return;
13511351 })
13521352 .catch((error) => {
@@ -1360,7 +1360,7 @@ Each HTTP request thereafter includes the `X-Auth-Token` Header in the request i
13601360
13611361` ` ` javascript
13621362const options = {
1363- method: " POST" ,
1363+ method: ' POST' ,
13641364 url: UL_URL,
13651365 qs: { k: UL_API_KEY, i: deviceId },
13661366 headers: DUMMY_DEVICE_HTTP_HEADERS,
@@ -1369,7 +1369,7 @@ const options = {
13691369
13701370request(options, (error) => {
13711371 if (error) {
1372- debug(debugText + " " + error.code);
1372+ debug(debugText + ' ' + error.code);
13731373 }
13741374});
13751375` ` `
@@ -1386,7 +1386,7 @@ The `iot-agent` container is listening on port `4041`, it is configured to forwa
13861386` ` ` yaml
13871387iot-agent:
13881388 labels:
1389- org.fiware: " tutorial"
1389+ org.fiware: ' tutorial'
13901390 image: quay.io/fiware/iotagent-ul:${ULTRALIGHT_VERSION}
13911391 hostname: iot-agent
13921392 container_name: fiware-iot-agent
@@ -1396,8 +1396,8 @@ iot-agent:
13961396 networks:
13971397 - default
13981398 ports:
1399- - " 4041:4041"
1400- - " 7896:7896"
1399+ - ' 4041:4041'
1400+ - ' 7896:7896'
14011401 environment:
14021402 - IOTA_CB_HOST=orion-proxy
14031403 - IOTA_CB_PORT=1027
0 commit comments