Skip to main content

Sharing Secure, Trusted Data

One major problem that Fluree solves is providing secure, trusted data using only the database.

Secure means that users only access the data they're authorized to access. This kind of security is typically implemented by building an API layer in front of a data store, but Fluree provides a fine-grained security model that allows other systems to directly request data from the database without the risk of incorrectly exposing data.

Trusted means that a data consumer can verify that the data they've received is accurate and is being provided by a trustworthy real-world entity, like a bank or government institution. Fluree's designed to allow this verification to happen automatically and transparently as part of a query, without the need for additional offline verification.

The Academic Credentials Dataset (ACD) is a fictional dataset that represents an ecosystem of Academic Credentials (degrees, certificates, etc.) and the related Institutions, Learners, and Employers. It's modeled after a real world use case where stakeholders need security and trust:

  • Employers want to verify that Learners have earned the Acaedemic Credentials they claim they have
  • Learners want to consent to Employers getting access to this data
  • Institutions want to provide this data on behalf of the Learners, and no other data - they don't want to leak information about other Learners

This walkthrough demonstrates how to use Fluree to support this kind of secure, trusted data exchange among unaffiliated stakeholders.

The walkthrough also demonstrates core concepts for working with Fluree and semantic data, including:

  • Modeling graph data with types and relationships
  • What vocabularies are, and how to make use of vocabularies published by third parties
  • Usage of @context to provide meaning to data
  • Specifying the shape of your query results using the select clause
  • Using the where and union clauses with logic variables to filter query results

This walkthrough assumes that you've gone through the tutorial.

Schema Overview

This graph shows the relationships between the types of resources we'll be interacting with, and their relationships to each other:

graph LR as(Assertion) -->|recipient| r(Learner) as -->|achievement| ac(Achievement) ac -->|creator| inst(Institution) c(Credential) -->|credentialSubject| as c -->|issuer| inst

Here's an example Achievement resource to illustrate the relationship between the schema and the JSON-LD objects you'll encounter:


{
"@context": {
"id": "@id",
"type": "@type",
"schema": "http://schema.org/",
"vc": "https://w3.org/2018/credentials#",
"clr": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#",
"acd": "https://academic-credential-dataset.net/ns/"
},
"clr:issuanceDate": "2013-08-10",
"id": "acd:credentials/1",
"type": [
"acd:Credential",
"clr:AchievementCredential",
"vc:VerifiableCredential"
],
"clr:issuer": {
"schema:name": "Fluree University",
"acd:profileType": "Institution",
"id": "acd:institutions/fu",
"schema:url": "https://fluree.edu/",
"type": "clr:Profile"
},
"clr:name": "Recognition of Course Completion",
"clr:credentialSubject": {
"clr:activityEndDate": "2013-05-15",
"clr:activityStartDate": "2013-01-09",
"acd:recipient": {
"acd:profileType": "Learner",
"schema:email": "freddyyeti1@fluree.edu",
"id": "acd:learners/freddyyeti1",
"clr:dateOfBirth": "2016-11-24",
"schema:givenName": "Freddy",
"schema:familyName": "Yeti",
"type": "clr:Profile"
},
"id": "acd:assertions/1",
"clr:achievement": {
"clr:creator": {
"schema:name": "Fluree University",
"acd:profileType": "Institution",
"id": "acd:institutions/fu",
"schema:url": "https://fluree.edu/",
"type": "clr:Profile"
},
"clr:humanCode": "MAT 117",
"clr:creditsAvailable": 3,
"id": "acd:achievements/FU/MAT117",
"clr:achievementType": "Course",
"type": "clr:Achievement",
"clr:name": "College Algebra",
"clr:description": "Linear functions, quadratic functions, general polynomial functions, rational functions, systems of linear equations, logarithmic and exponential functions."
},
"clr:result": {
"id": "_:f211106232533083"
},
"clr:term": "Spring 2023",
"type": [
"acd:Assertion",
"clr:AchievementSubject",
"clr:CredentialSubject"
],
"clr:creditsEarned": 3
}
}

Interacting with the ACD

As with many choices in life there is an easy way to interact with the ACD and then there is an even easier one. We have, in fact, configured each of the ACD Article Series pages to use the Fluree Sandbox! The Sandbox is a handy interface for interacting with a transient instance of Fluree that is running right here in your browser!

You can open the Sandbox at any time by clicking Freddy on the bottom-right of the page.

Wheres Freddy

Each time you refresh or come back to this page, the Sandbox is populated anew with a fresh load of the Academic Credential Dataset. You can add or delete whatever data you like and just refresh the page to get back to Square One. As you read through the articles, try clicking the Freddy Button in the top-right of each code block to drop the code into the Sandbox for your querying convenience!

The other option is to clone the Academic Credential Dataset git repo and follow the instructions in the Introduction tutorial to run the ledger on your machine.

Summary

Well folks, now you know what the "ACD" is. You know where to access it. You know what's inside of it and you know how the ledger is built! You are CRUSHING this! We hope you will use this knowledge wisely and enjoy the rest of the walkthrough. Please let us know if you have any questions or feedback by joining the Fluree Discord and remember, sometimes the best preparation is a calm nervous system.

Stay safe out there.