Walkthrough

Andre Martins edited this page Jan 29, 2015 · 2 revisions
Clone this wiki locally

This is a description and walkthrough for the XDI Cloud Manager.

Scenario

XDI Cloud Manager is a web application which allows the configuration of personal clouds. It currently has as main features:

  • Personal Profile
  • Facebook Connector
  • Cloud Cards Editor
  • Connection Management
  • Key Pairs Management
  • Personal Cloud Status

Walkthrough

Step 1: User authentication

As this application uses the Root Link Contract, the user should authenticate using the respective secret token.


Step 2: Dashboard

The Dashboard displays in a short format some information about the personal cloud:

  • Cloud Cards count
  • Connections count
  • Dependents count
  • Cloud Names count

Step 3: Personal Profile

The user can store in his own cloud some personal information such as name, birth date, address and so on. This information can be used by other applications and/or users who request them through a connection.

This information is stored in the user's graph with the following format:

[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#first><#name>&/&/"Andre"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#last><#name>&/&/"Martins"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#email>&/&/"andre@danubeclouds.com"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#phone>&/&/"+351129889382"	

Step 4: Facebook Connector

This is an integration with the XDI2 Facebook Connector plugin, which allows the mapping of some facebook attributes in the user's graph. After this connection is completed, those attributes will be available through simple XDI statements. Example:

(https://facebook.com/)[=]!588183713#(user)<#(email)>&/&/"markus@projectdanube.org"
(https://facebook.com/)[=]!588183713#(user)<#(first_name)>&/&/"Markus"
(https://facebook.com/)[=]!588183713#(user)<#(gender)>&/&/"male"
(https://facebook.com/)[=]!588183713#(user)<#(last_name)>&/&/"Sabadello"

More information can be found in the XDI2 Facebook Connector Walkthrough.


Step 5: Cloud Cards Editor

This editor allows the user to create, edit Cloud Cards which can be shared with other users. Each card can have a predefined set of fields which can be set as public or private field.

A card is identified by a "user friendly" tag which represents a $ref relation to the actual card address. Example:

[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97#work$card/$ref/[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911

This way it is possible to refer to a card as, for instance, =andrepm#work$card. A card can also be defined as the "Default Card", allowing to refer to this one only as =andrepm$card. In order to simplify, cloud card applications, such as XDI Cloud Manager or XDI Cloud Card Viewer, automatically add the subsegment $card. As a result cards are generally referred as only =cloudName#tag.

A Cloud Card have two types of fields: basic and personal fields. The basic fields are always public: Card shortcut, description and background image. The personal fields can be defined either as Public or Private.

An interesting feature of Cloud Cards is the integration with the Personal Profile and Facebook Connector. This means that each personal field can be linked to the respective field of the Personal Profile or Facebook attribute. The maintenance of the personal information is simplified in this case, when, for instance, the phone number change, the user just need to change it in his Personal Profile and all the cards including this information are automatically updated. This link is done using a $ref relation in XDI. Additionally, a field can also have its own value, not depending on any other graph node.

[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$private<#email>&/&/"andre@danubeclouds.com"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#first><#name>&/$ref/[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#first><#name>&
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#last><#name>&/$ref/[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#last><#name>&
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#phone>&/$ref/[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#phone>&
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#first><#name>&/&/"Andre"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#last><#name>&/&/"Martins"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#phone>&/&/"+351129889382"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#background><#image>&/&/"..."
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#connect><#button>&/&/"...."
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#description>&/&/"This is my professional card"
[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97[$card]!:uuid:88b6c8ea-3976-42f8-96c3-253039005911$public<#tag>&/&/"work"

As it can be observed, the previous card has 4 personal fields: First Name, Last Name, Email and Phone. All of them are linked through a $ref relation to the Personal Profile except the Email which has its own value node.

More information about how the private part of the card is revealed can be found in the XDI Cloud Card Viewer Walkthrough.


Step 6: Connection Management

Connections are the representation of the XDI Link Contracts. They represent a connection between two XDI graphs, usually giving permissions to access information stored in the graph.

There are four types of permissions:

  • Read access ($get operation)
  • Write access ($set operation)
  • Deletion access ($del operation)
  • Full access (all previous operations, represented as $all in a XDI Link Contract)

As it can be observed in the previous image, the user =markus is allowed to read and write in the subgraph [=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#email>. This connection is defined in XDI as:

([=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97/[=]!:uuid:91f28153-f600-ae24-91f2-8153f600ae24)$do/$set/[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#email>
([=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97/[=]!:uuid:91f28153-f600-ae24-91f2-8153f600ae24)$do/$get/[=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97<#email>
([=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97/[=]!:uuid:91f28153-f600-ae24-91f2-8153f600ae24)($do$if$and/$true){$from}/$is/[=]!:uuid:91f28153-f600-ae24-91f2-8153f600ae24
([=]!:uuid:37d37c44-5551-46f3-9264-e4dd2ebbbf97/[=]!:uuid:91f28153-f600-ae24-91f2-8153f600ae24)($do$if$and/$true){$msg}<$sig><$valid>&/&/true

Step 7: Key Pairs Management

Each personal cloud includes two key pairs:

  • Signature Key Pair
  • Encryption Key Pair

Here it is possible to view and re-generate both key pairs, for instance, if any of the private keys got compromised.


Step 8: Personal Cloud Status

Some personal cloud technical information is displayed here:

  • Cloud Number
  • Cloud Endpoint
  • Encryption Public Key
  • Signature Public Key
  • Cloud Names
  • Guardians
  • Dependents