Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alpha125] legacy did:sov prefix in oob invitation #875

Closed
Iskander508 opened this issue Jun 17, 2022 · 3 comments · Fixed by #889
Closed

[alpha125] legacy did:sov prefix in oob invitation #875

Iskander508 opened this issue Jun 17, 2022 · 3 comments · Fixed by #889
Milestone

Comments

@Iskander508
Copy link
Contributor

During the yesterdays Cardea interop-a-thon, I have tested the alpha.125 version of the react-native/core AFJ as a holder against multiple agents.
I was presented this invitationUrl from a cardea test agent (I'm not sure which implementation is it using): https://mediator4.test.indiciotech.io:443?oob=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9vdXQtb2YtYmFuZC8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiZWRkNjY4NGYtMmE1ZC00ZTg1LWJiNDItYmEwNzQ0YjJmZTUyIiwgInNlcnZpY2VzIjogW3siaWQiOiAiI2lubGluZSIsICJ0eXBlIjogImRpZC1jb21tdW5pY2F0aW9uIiwgInJlY2lwaWVudEtleXMiOiBbImRpZDprZXk6ejZNa2tqd2dEeVlGM3BIVXFYTkNGRlRLTVBxTlo5U0JCYlhpdE1pdlVqaGpKNFUyIl0sICJyb3V0aW5nS2V5cyI6IFsiZGlkOmtleTp6Nk1rdUVUOXoyRzdnSldTRFZ0ZTl4U2cyOGhSUFNCRHFUTW5mdDlGVndRWDY2M3AiLCAiZGlkOmtleTp6Nk1rbnZwTmEzQXdWOHl6SHJaM0s3WXVDdU1adXBiSEt0ZDJwVDN4U3NzODRqenEiXSwgInNlcnZpY2VFbmRwb2ludCI6ICJodHRwczovL21lZGlhdG9yNC50ZXN0LmluZGljaW90ZWNoLmlvOjQ0MyJ9XSwgImhhbmRzaGFrZV9wcm90b2NvbHMiOiBbImRpZDpzb3Y6QnpDYnNOWWhNcmpIaXFaRFRVQVNIZztzcGVjL2Nvbm5lY3Rpb25zLzEuMCJdLCAibGFiZWwiOiAiTGFiIn0=
When passing this to the agent.oob.receiveInvitationFromUrl() it fails with the following error:

[{
	"target": {
		"@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation",
		"@id": "edd6684f-2a5d-4e85-bb42-ba0744b2fe52",
		"services": [{
			"id": "#inline",
			"serviceEndpoint": "https://mediator4.test.indiciotech.io:443",
			"type": "did-communication",
			"recipientKeys": ["did:key:z6MkkjwgDyYF3pHUqXNCFFTKMPqNZ9SBBbXitMivUjhjJ4U2"],
			"routingKeys": ["did:key:z6MkuET9z2G7gJWSDVte9xSg28hRPSBDqTMnft9FVwQX663p", "did:key:z6MknvpNa3AwV8yzHrZ3K7YuCuMZupbHKtd2pT3xSss84jzq"]
		}],
		"handshake_protocols": ["did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"],
		"label": "Lab"
	},
	"value": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation",
	"property": "type",
	"children": [],
	"constraints": {
		"isValidMessageType": "type does not match the expected message type (only minor version may be lower)"
	}
}]

I'm not sure whether I understand the RFC's correctly, but according to RFC 0348: Transition Message Type to HTTPs we should still accept the did:sov:BzCbsNYhMrjHiqZDTUASHg;spec prefix, right?

When slightly adjusting the invitation content, it is processed correctly and a connection was established:

  • @type: did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation -> https://didcomm.org/out-of-band/1.0/invitation
  • handshake_protocols: ["did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"] -> ["https://didcomm.org/connections/1.0"]
@TimoGlastra
Copy link
Contributor

This is fixed as part of #840. However it may take a while for that PR to get merged (complex thing get right) so if you want to resolve this sooner, maybe you can extract the replaces the legacydidsovprefix?

@TimoGlastra TimoGlastra added this to the v0.2.0 milestone Jun 17, 2022
@TimoGlastra
Copy link
Contributor

Hi @Iskander508, is this something you planned on working on? Would like to get this in before the 0.2.0 release. If not I can take a look at it, but don't want to void your work.

@Iskander508
Copy link
Contributor Author

Iskander508 commented Jun 20, 2022

Hi @Iskander508, is this something you planned on working on? Would like to get this in before the 0.2.0 release. If not I can take a look at it, but don't want to void your work.

@TimoGlastra No, I'm not preparing a special PR for this. I understand that it is just 2 lines (in packages/core/src/modules/oob/messages/OutOfBandInvitation.ts) from #840. We can patch it locally for now, until the full PR is merged. Or feel free to create a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants