Giter VIP home page Giter VIP logo

Comments (5)

peacekeeper avatar peacekeeper commented on September 4, 2024 2

@kaimeinke No need to repeat the keys.. I think this is what you want:

{
	"@context": [
		"https://www.w3.org/ns/did/v1",
		"https://w3id.org/security/suites/jws-2020/v1",
		"https://w3id.org/security/suites/secp256k1-2019/v1"
	],
	"id": "did:web:exampledomain.com",
	"assertionMethod": [
		"did:web:exampledomain.com#918a8e68f4374c7ea347cd765f754617",
		"did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed"
	],
	"authentication": [
		"did:web:exampledomain.com#918a8e68f4374c7ea347cd765f754617",
		"did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed"
	],
	"verificationMethod": [{
			"controller": "did:web:exampledomain.com",
			"id": "did:web:exampledomain.com#918a8e68f4374c7ea347cd765f754617",
			"type": "EcdsaSecp256k1VerificationKey2019",
			"publicKeyJwk": {
				"alg": "ES256K",
				"crv": "secp256k1",
				"kid": "918a8e68f4374c7ea347cd765f754617",
				"kty": "EC",
				"use": "sig",
				"x": "GbAPnwci7RSsF8eiE7WdMlMfxUBnnywglxAiDru0Jjk",
				"y": "BNsZpL09OdMzDR-daDfDvJPN8i8suVM62LZd8UcyR4k"
			}
		},
		{
			"controller": "did:web:exampledomain.com",
			"id": "did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed",
			"type": "RsaVerificationKey2018",
			"publicKeyJwk": {
				"alg": "RS256",
				"kid": "6b8779c2a89143fa8969337aab1673ed",
				"kty": "RSA",
				"use": "sig"
			}
		}
	],
	"services": [{
			"id": "did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed#x509PublicKey",
			"type": "X509PublicKey",
			"serviceEndpoint": "https://exampledomain.com/.well-known/x509PublicKey.pem"
		},
		{
			"id": "did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed#x509CertificateChain",
			"type": "X509Certificate",
			"serviceEndpoint": "https://exampledomain.com/.well-known/x509CertificateChain.pem"
		}
	]
}

from did-core.

peacekeeper avatar peacekeeper commented on September 4, 2024

Regarding the service endpoints, did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed#x509PublicKey is not a good idea, since multiple # characters are invalid per the DID URL syntax and generic URI syntax.

from did-core.

OR13 avatar OR13 commented on September 4, 2024

You can look at the examples from did;key here: https://did.key.transmute.industries/

and find replace the did:key:...# part...

from did-core.

kaimeinke avatar kaimeinke commented on September 4, 2024

Dear @peacekeeper and @OR13 thank you very much, this was super helpful.

Will check the DID:KEY example right away.

I will remove the multiple # characters as they are not allowed. Then I would replace these IDs with URIs such as

"services": [
                {
			"id": "exampledomain.com/.well-known/x509PublicKey",
			"type": "X509PublicKey",
			"serviceEndpoint": "https://exampledomain.com/.well-known/x509PublicKey.pem"
		},
		{
			"id": "exampledomain.com/.well-known/x509CertificateChain",
			"type": "X509Certificate",
			"serviceEndpoint": "https://exampledomain.com/.well-known/x509CertificateChain.pem"
		}
]

from did-core.

kaimeinke avatar kaimeinke commented on September 4, 2024

I think we can close this one for now and I would go from here with the following DID Document. Thanks for your quick and great help, I'll come back when we did the next steps of our integration.

{
	"@context": [
		"https://www.w3.org/ns/did/v1",
		"https://w3id.org/security/suites/jws-2020/v1",
		"https://w3id.org/security/suites/secp256k1-2019/v1"
	],
	"id": "did:web:exampledomain.com",
	"assertionMethod": [
		"did:web:exampledomain.com#918a8e68f4374c7ea347cd765f754617",
		"did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed"
	],
	"authentication": [
		"did:web:exampledomain.com#918a8e68f4374c7ea347cd765f754617",
		"did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed"
	],
	"verificationMethod": [{
			"controller": "did:web:exampledomain.com",
			"id": "did:web:exampledomain.com#918a8e68f4374c7ea347cd765f754617",
			"type": "EcdsaSecp256k1VerificationKey2019",
			"publicKeyJwk": {
				"alg": "ES256K",
				"crv": "secp256k1",
				"kid": "918a8e68f4374c7ea347cd765f754617",
				"kty": "EC",
				"use": "sig",
				"x": "GbAPnwci7RSsF8eiE7WdMlMfxUBnnywglxAiDru0Jjk",
				"y": "BNsZpL09OdMzDR-daDfDvJPN8i8suVM62LZd8UcyR4k"
			}
		},
		{
			"controller": "did:web:exampledomain.com",
			"id": "did:web:exampledomain.com#6b8779c2a89143fa8969337aab1673ed",
			"type": "RsaVerificationKey2018",
			"publicKeyJwk": {
				"alg": "RS256",
				"kid": "6b8779c2a89143fa8969337aab1673ed",
				"kty": "RSA",
				"use": "sig"
			}
		}
	],
	"services": [
        {
            "id": "exampledomain.com/.well-known/x509PublicKey",
            "type": "X509PublicKey",
            "serviceEndpoint": "https://exampledomain.com/.well-known/x509PublicKey.pem"
        },
        {
            "id": "exampledomain.com/.well-known/x509CertificateChain",
            "type": "X509Certificate",
            "serviceEndpoint": "https://exampledomain.com/.well-known/x509CertificateChain.pem"
        }
    ]
}

from did-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.