Commit de70f7bd authored by Sachin Agrawal's avatar Sachin Agrawal

Add README for Provisioning Tool

Using Provisioning tool sample in Security module is not
straight-forward and it may be tricky for a new user to
get familiar with it. This README details all the steps
and files needed for a successful Just Works Provisioning.

Change-Id: I4afbcbbb5ad6310df42810bc6d3ada663b2ce243
Signed-off-by: default avatarSachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1699Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
parent 11a2f8ab
LAST UPDATED 7/16/2015
To execute Provisioning Tool sample:
1) Build IoTivity with security enabled:
$ cd <iotivity-base>
$ scons resource SECURED=1
2) Verify Provisioning Tool functionality using secure sample apps:
On Resource Server Device which needs to be 'provisioned':
$ cd <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure
$ export LD_LIBRARY_PATH=<iotivity-base>/out/<...>/release
$ cp ../../../../security/provisioning/sample/oic_svr_db_unowned_server.json oic_svr_db_server.json
$ ./ocserverbasicops
On Provisioning Tool Device:
$ cd <iotivity-base>/out/<...>/release/resource/csdk/security/provisioning/sample
$ ./provisioningclient
Follow the prompts on Provisioning Tool device and provisioning should be completed
successfully. You should see a message 'Provisioning Success~!!'.
......@@ -72,4 +72,6 @@ sec_provisioning_src_dir = src_dir + '/resource/csdk/security/provisioning/sampl
sec_provisioning_build_dir = env.get('BUILD_DIR') +'/resource/csdk/security/provisioning/sample/'
provisioning_env.Alias("install", provisioning_env.Install( sec_provisioning_build_dir,
sec_provisioning_src_dir + 'oic_svr_db.json'))
sec_provisioning_src_dir + 'oic_svr_db_prov_tool.json'))
provisioning_env.Alias("install", provisioning_env.Install( sec_provisioning_build_dir,
sec_provisioning_src_dir + 'oic_svr_db_unowned_server.json'))
{
"acl": [
{
"sub": "Kg==",
"rsrc": [
"/oic/res",
"/oic/d",
"/oic/p",
"/oic/res/types/d",
"/oic/ad",
"/oic/sec/acl",
"/oic/sec/svc",
"/oic/sec/amacl"
],
"perms": 2,
"ownrs" : ["MTExMTExMTExMTExMTExMQ=="]
},
{
"sub": "Kg==",
"rsrc": [
"/oic/sec/doxm",
"/oic/sec/pstat"
],
"perms": 6,
"ownrs" : ["MTExMTExMTExMTExMTExMQ=="]
}
],
"pstat": {
"isop": false,
"deviceid": "ZGV2aWNlaWQAAAAAABhanw==",
"ch": 0,
"cm": 0,
"tm": 0,
"om": 3,
"sm": [3]
},
"doxm": {
"oxm": [0],
"oxmsel": 0,
"owned": false,
"deviceid": "MTExMTExMTExMTExMTExMQ=="
}
}
......@@ -41,7 +41,7 @@
#define TAG "provisioningclient"
static OicSecAcl_t *gAcl = NULL;
static char CRED_FILE[] = "oic_svr_db.json";
static char PROV_TOOL_DB_FILE[] = "oic_svr_db_prov_tool.json";
/**
* Perform cleanup for ACL list
......@@ -233,7 +233,7 @@ static SPResult InputACL(OicSecAcl_t *acl)
FILE* client_fopen(const char *path, const char *mode)
{
(void)path;
return fopen(CRED_FILE, mode);
return fopen(PROV_TOOL_DB_FILE, mode);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment