Skip to content

Use SHA1 of commit for generating a contributor DID as well? #17

@canadaduane

Description

@canadaduane

Context

While it's certainly possible (and even encouraged, as DIDs become more wide-spread) to use an external DID as one's contributor DID (e.g. did:sov, did:btcr, etc.) it also seems useful and likely common to create a DID within the git repository for a contributor. It could be that the contributor has no other DID, or they prefer to remain anonymous, and thus need a new DID.

Proposal

We could require that all new DIDs generated via the did:git method be by appending the commit sha.

So for the genesis DID of the repo itself, the DID would be generated from did:git:$commit. (Producing did:git:<genesis commit SHA>.)

For a subsequent new contributor DID to be generated, it would be did:git:<genesis commit SHA>:$commit where this $commit refers not to the genesis commit, but to the SHA1 of the commit where the contributor's new DID document was added.

Corollaries

This would imply that DID document filenames stored like did/<contributor>.did do not contain the actual DID in the filename (nor in the document). Since the SHA1 is generated as a result of checking in the DID Document, a contributor DID doc would suffer from the same problem as the genesis DID document--the DID itself is known only after creation.

So, the <contributor> in <contributor>.did could be the name or handle of the contributor, rather than their DID. As an aside, I think this would actually be easier to manage, since listing the directory contents would show recognizable names rather than a list of SHA-like DIDs.

Also, contributor DID generation would be exactly like repository DID generation: the DID is contained in the context of the DID Document creation (i.e. in the SHA1) not in the repository content.

Lastly, only one new contributor DID can be generated per commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions