hyperledger / anoncreds-spec

The specification for AnonCreds verifiable credential exchange.
https://hyperledger.github.io/anoncreds-spec/
Apache License 2.0
45 stars 24 forks source link

Consider the need of the `tag` property from credential definition and revocation registry definition models #123

Closed TimoGlastra closed 1 year ago

TimoGlastra commented 1 year ago

The tag was previously used to allow multiple cred defs / revocation registries to be created for the same schema / cred def and giving them a unique identifier.

As the identifiers is not based on the model contents anymore (but any identifier the specific anoncreds method wishes it it to be), we don't really need the tag anymore.

The tag for a credential definition is used by wallets as basically the only human readable context you can add, so it may be worth to keep it in, but I think we can loose the rule that it should be unique for each cred def / revoc reg def.

The indy method could still add as a rule that all cred defs for the same schema and issuer must have a unique tag and that all revoc reg defs for the same cred def must have a unique tag

swcurran commented 1 year ago

I think we should keep them.

They are useful in keeping the identifiers differentiated, even if they are not required to be used for that purpose. For example, in Indy, if we drop them, we would have to just generate them to make the IDs unique.

As well, as you note above, they are used by wallets to make a (sort of) human readable display.

Most importantly though, tag is in the existing implementation and not needed to be removed to make AnonCreds "ledger agnostic", so I don't see a compelling reason to remove them.

TimoGlastra commented 1 year ago

Makes sense.

Do you agree though that it's not a requirement to make them unique as is currently the case for indy? I think the identifier should be unique, and for the indy identifier to be unique the tag needs to be unique (per schema/issuer combi for cred defs, per cred def for rev regs), however it's not needed to make the tag unique I would say.

Reason for this is that it is not possible to enforce. How would I know if there's not any other cred def with the same tag if the tag isn't in the id?

swcurran commented 1 year ago

Agreed on the tag uniqueness. The tag is an issuer generated term, and so it is up to them to make the tag whatever they want.

swcurran commented 1 year ago

Discussed at AnonCreds Spec Meeting 2023.01.09 -- agreed to close and keep as is.