Note: This spec is a component of the parent Solid specification; the parent spec and all its components are versioned as a whole.
- Overview
- Profile Representation Formats
- Required Profile Information
- Minimum Recommended Profile Information
- Public and Private Profiles
- Public Key Certificates
- Account Resource Discovery
Solid uses WebID Profile Documents for management of user identity and security credentials (such as public keys), and user preferences discovery.
From the WebID Profile spec:
A WebID Profile Document is an RDF Web resource that MUST be available as text/turtle, but MAY be available in other RDF serialization formats (such as JSON-LD or HTML+RDFa) if requested through content negotiation.
There are only 3 statements required for a valid (though not very useful) WebID Profile Document:
- Identifying the document as a
foaf:PersonalProfileDocumentinstance - Having a
foaf:primaryTopicpredicate - Having that primary topic be a valid
foaf:Agenttype, such asfoaf:Person
Here's an example of a minimum valid profile, in Turtle (text/turtle) format:
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
<https://alice.databox.com/profile/card>
a foaf:PersonalProfileDocument ;
foaf:primaryTopic <#me> .
<#me>
a foaf:Person .Same profile, in JSON-LD (application/ld+json) format:
{
"@context": {
"foaf": "http://xmlns.com/foaf/0.1/"
},
"@graph": [
{
"@id": "https://alice.databox.com/profile/card",
"@type": "foaf:PersonalProfileDocument",
"foaf:primaryTopic": {
"@id": "#me"
}
},
{
"@id": "#me",
"@type": "foaf:Person"
}
]
}The above minimal valid profile doesn't provide enough useful information for the purposes of building distributed read-write-web applications. In addition, Solid recommends that WebID profiles include the following statements:
- A profile SHOULD include a
foaf:name(see the discussion on user names below). - A profile SHOULD include
cert:keypublic key certificate information, for use with WebID+TLS (which is currently the primary Solid authentication mechanism). - A profile SHOULD point to the root storage location using
pim:storage(so that applications will know where to read and write their data).
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
<https://alice.databox.com/profile/card>
a foaf:PersonalProfileDocument ;
foaf:primaryTopic <#me> .
<#me>
a foaf:Person ;
foaf:name "Alice" ;
<http://www.w3.org/ns/auth/cert#key> <#key6b4c> ;
<http://www.w3.org/ns/pim/space#storage> <../> ;
<#key6b4c>
# ... certificate key statements go here, see Certificates sectionClient-side applications frequently need to know what to name the user, both when interacting with the user directly (such as displaying the currently logged in user in the navigation bar), or talking about users indirectly (an event manager app, when listing which users are invited to a meeting, needs to know how to display their names).
The Solid recommendation for client-side application code, when discovering what to name the user, is to perform the following steps:
- An app SHOULD look in the user's WebID Profile for the
foaf:namepredicate, and use that as the name, if it's available. - If an app does not find a name in the user profile, it MAY fall back to using the WebID URL as the username.
Solid servers must be able to support the separation of public and private data
in a user's profile. As a result, Solid WebID profiles MAY be split into
multiple RDF resources with different read/write permissions, linked together
either via owl:sameAs and rdfs:seeAlso predicates, or via the Solid-specific
predicate space:preferencesFile.
For example, a typical Solid user would have profile-related statements split across several RDF documents:
/profile/card- their primary (public-readable) WebID Profile. Which would contain aspace:preferencesFilelink to:/settings/prefs.ttl- a private (only the user has read/write access) Preferences file which contains further profile-related statements.
The combination of the main WebID Profile document, and all of the related profile documents is referred to as the Extended Profile.
Solid apps that interact with the WebID profile MUST also load and parse all of the related RDF resources that are linked to from the main profile using the following predicates:
http://www.w3.org/2002/07/owl#sameAshttp://www.w3.org/2000/01/rdf-schema#seeAlsohttp://www.w3.org/ns/pim/space#preferencesFile
Solid currently uses WebID+TLS as its main Authentication mechanism.
To enable this, WebID Profile documents on Solid-compliant servers MAY contain
one or more Public Key Certificate sections, linked to from the main WebID
subject via cert:key predicates.
Example profile with a public key certificate (created by LDNode):
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix cert: <http://www.w3.org/ns/auth/cert#>.
@prefix dc: <http://purl.org/dc/terms/>.
@prefix XML: <http://www.w3.org/2001/XMLSchema#>.
<https://alice.databox.com/profile/card>
a foaf:PersonalProfileDocument ;
foaf:primaryTopic <#me> .
<#me>
a foaf:Person ;
foaf:name "Alice" ;
<http://www.w3.org/ns/auth/cert#key> <#key6b4c> ;
<http://www.w3.org/ns/pim/space#storage> <../> ;
<#key6b4c>
dc:created
"2016-02-12T15:07:46.916Z"^^XML:dateTime;
dc:title
"Created by ldnode";
a cert:RSAPublicKey;
rdfs:label
"LDNode Localhost Test Cert";
cert:exponent
"65537"^^XML:int;
cert:modulus
"970E88..(many digits here)..167801"^^XML:hexBinary.Solid WebID Profile documents MAY contain the following links, to support the discovery of resources that are of interest to client side applications.
A Solid WebID Profile SHOULD contain a link to one or more Solid Containers that act as Storage (a space for apps to read and write data).
Example link to Root Storage (gets created by default on account creation):
# ...
<#me>
a foaf:Person ;
<http://www.w3.org/ns/pim/space#storage> <../> .A Solid WebID Profile MAY contain a link to the Solid Inbox container (gets created by default on account creation).
If an inbox link exists, there MUST be only one Inbox for the profile.
Example:
# ...
<#me>
a foaf:Person ;
<http://www.w3.org/ns/solid/terms#inbox> </inbox/> .A Solid WebID Profile SHOULD contain one or more links to Type Registry Index resources.
If links to type indexes exist, there MUST be only one link each to a private and a public type registry index file, respectively.
For example, a link to the Listed Type Index in the main profile document:
# ...
<#me>
a foaf:Person ;
<http://www.w3.org/ns/solid/terms#publicTypeIndex>
</settings/publicTypeIndex.ttl> .And an example corresponding link to the Unlisted Type Index, in a private
resources of the Extended Profile, such as the Preferences file
(in /settings/prefs.ttl):
# ...
<#me>
<http://www.w3.org/ns/solid/terms#privateTypeIndex>
</settings/privateTypeIndex.ttl> .