Details
-
Type: extRequest
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
Sender Email:
-
HD-Chapter:Cloud
-
HD-Enabler:Object Storage
Description
Hi,
I'm not sure where I should be reporting this. I have found a couple of
errors in the Object Storage notification:
First of all, cloud.lab.fi-ware.org is not the correct host, it should be
cloud.lab.fiware.org (without the dash)
Then, the following script will not properly parse auth value:
curl -v \
-d '{ "auth" :
{ "passwordCredentials" :
,
"tenantName" : "'$tenantName'" }
}' \
-H "Content-Type: application/json" \
http://cloud.lab.fiware.org:4730/v2.0/tokens \
> auth_token2.dat
token=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
{if($i~/id\042/)
}
}' auth_token2.dat | awk -F'"' '
')
auth=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
{if($i~/publicURL\042/)
}
}' auth_token2.dat | \
grep "v1/AUTH" | awk -F'"}]' '{print $1;}' | awk -F"/" '{print $3;}' )
Executing this will return something like the following:
root@ubuntu1404:~# echo $auth
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866
Instead, the last part of the previous script should look something like
the following:
auth=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
{if($i~/publicURL\042/)
{print $(i+3)}
}
}' auth_token2.dat | \
grep "v1/AUTH" | head -n 1 | awk -F'"}' '
' | awk -F"/"
'
' )
So the value is parsed properly:
root@ubuntu1404:~# echo $auth
AUTH_00000000000000000000000000009866
Best regards,
Andrés
[image: www.usheru.com] <http://www.usheru.com>
WWW.USHERU.COM <http://www.usheru.com/> | @USHERUHQ
<http://www.twitter.com/usheruhq> | LINKEDIN
<http://ie.linkedin.com/in/catdownes/en> | ANGELLIST
<https://angel.co/usheru>
This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received it by mistake, please let us know by e-mail reply and delete it
from your system; you may not copy this message or disclose its contents to
anyone. Please send us by fax any message containing deadlines as incoming
e-mails are not screened for response deadlines. The integrity and security
of this message cannot be guaranteed on the Internet.
usherU is a trading name of We Love Cinema Ltd registered in Ireland no. 547302
having its registered office at Saint Martins House, Waterloo Road,
Ballsbridge, Dublin 4.
_______________________________________________
Fiware-tech-help mailing list
Fiware-tech-help@lists.fi-ware.org
https://lists.fi-ware.org/listinfo/fiware-tech-help
[Created via e-mail received from: =?UTF-8?B?QW5kcsOpcyBNYWPDrWFz?= <amacias@usheru.com>]
Thanks, we will fix it.
Regards,
Alex
From: Andrés Macías <amacias@usheru.com>
To: fiware-tech-help@lists.fi-ware.org, Thomas Winkler
<thomas.winkler@iais.fraunhofer.de>
Date: 16/03/2015 03:07 PM
Subject: [Fiware-tech-help] Object Storage documentation
Sent by: fiware-tech-help-bounces@lists.fi-ware.org
Hi,
I'm not sure where I should be reporting this. I have found a couple of
errors in the Object Storage notification:
https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Object_Storage_-_User_and_Programmers_Guide#3._Authenticate_tenant_to_get_token_for_Object_Storage
First of all, cloud.lab.fi-ware.org is not the correct host, it should be
cloud.lab.fiware.org (without the dash)
Then, the following script will not properly parse auth value:
curl -v \
{ "username" : "'$username'" , "password" : "'$password'" }-d '{ "auth" :
{ "passwordCredentials" :
,
{print $(i+1)}"tenantName" : "'$tenantName'" }
}' \
-H "Content-Type: application/json" \
http://cloud.lab.fiware.org:4730/v2.0/tokens \
> auth_token2.dat
token=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
{if($i~/id\042/)
}
{print $2; exit}}' auth_token2.dat | awk -F'"' '
')
{print $(i+3)}auth=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
{if($i~/publicURL\042/)
}
}' auth_token2.dat | \
grep "v1/AUTH" | awk -F'"}]' '{print $1;}' | awk -F"/" '{print $3;}' )
Executing this will return something like the following:
root@ubuntu1404:~# echo $auth
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866"}
AUTH_00000000000000000000000000009866
Instead, the last part of the previous script should look something like
the following:
auth=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
{if($i~/publicURL\042/)
{print $(i+3)}
}
{print $1;}}' auth_token2.dat | \
grep "v1/AUTH" | head -n 1 | awk -F'"}' '
' | awk -F"/"
{print $3;}'
' )
So the value is parsed properly:
root@ubuntu1404:~# echo $auth
AUTH_00000000000000000000000000009866
Best regards,
Andrés
WWW.USHERU.COM | @USHERUHQ | LINKEDIN | ANGELLIST
This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received it by mistake, please let us know by e-mail reply and delete it
from your system; you may not copy this message or disclose its contents
to anyone. Please send us by fax any message containing deadlines as
incoming e-mails are not screened for response deadlines. The integrity
and security of this message cannot be guaranteed on the Internet.
usherU is a trading name of We Love Cinema Ltd registered in Ireland no.
547302 having its registered office at Saint Martins House, Waterloo Road,
Ballsbridge, Dublin 4