-
Notifications
You must be signed in to change notification settings - Fork 14
Description
When the library parses an MSO MDoc Credential Configuration and converts it to a domain object, it tries to convert the COSE Algorithm Identifiers in credential_signing_alg_values_supported to COSE Algorithm names (reference). Whenever an unknown COSE Algorithm Identifier is encountered it is simply discarded.
Currently the library supports only:
- -7 (ES256)
- -35 (ES384)
- -36 (ES512)
and support for additional COSE Algorithm Identifiers must be explicitly added in the code.
For Credential Configuration of other Credential Formats, the library simply passes through the identifiers present in credential_signing_alg_values_supported as is. The same behavior should apply to MSO MDoc Credential Configurations as well.
To that end, the following is proposed:
- Remove
credentialSigningAlgorithmsSupportedfromCredentialConfiguration - Define
credentialSigningAlgorithmsSupportedinMsoMdocCredentialasList<CoseAlgorithm> - Define
credentialSigningAlgorithmsSupportedinSdJwtVcCredentialasList<JwsAlgorithm> - Define
credentialSigningAlgorithmsSupportedinW3CSignedJwtCredentialasList<JwsAlgorithm> - Define
credentialSigningAlgorithmsSupportedinW3CJsonLdDataIntegrityCredentialasList<LinkedDataAlgorithm> - Define
credentialSigningAlgorithmsSupportedinW3CJsonLdSignedJwtCredentialasList<LinkedDataAlgorithm>
where:
data class CoseAlgorithm(val value: Int)
data class JwsAlgorithm(val name: String)
data class LinkedDataAlgorithm(val id: String)
and wrap the values as needed without performing any filtering or conversion.