Comment 12 for bug 100079

Revision history for this message
Christian Reis (kiko) wrote :

I asked James H. for his opinion here, and he wrote me this:

There are two ways we could export the data as valid RDF. One is to
have a string property for the public key hanging off the person:

    <foaf:Person>
        <lp:sshPubKey>ssh-rsa ....</lp:sshPubKey>
        ...
    </foaf:Person>

Or we could expose the key as an RDF resource, similar to the PGP keys:

    <foaf:Person>
        <lp:hasSSHKey>
            <lp:SSHKey>
                <lp:keyType>ssh-rsa</lp:keyType>
                <lp:keyText>...</lp:keyText>
                <lp:keyComment>...</lp:keyComment>
            </lp:SSHKey>
        </lp:hasSSHKey>
        ...
    </foaf:Person>

The nesting of elements in RDF basically goes "object, property,
object, property ...", so this defines a single SSHKey and relates it
to the given person. For multiple keys, you'd need multiple hasSSHKey
property elements (rather than multiple SSHKey elements in a single
hasSSHKey element).

For the use cases in the bug, a simple string property would be
enough. The more structured form might be more useful if someone was
actually working with RDF tools.