universal-resolver icon indicating copy to clipboard operation
universal-resolver copied to clipboard

Earthid driver integration

Open vaibhavahire99 opened this issue 1 year ago • 38 comments

This pull request removes the driver-did-earthid directory from the Universal Resolver repository to comply with best practices of separating the driver code from the Universal Resolver core. The changes made in this pull request ensure that the Universal Resolver configuration references the EarthID driver Docker image hosted externally, rather than including the driver code in this repository.

Key Changes: Removed driver-did-earthid directory:

The directory containing the EarthID driver code has been removed from the Universal Resolver repository. This ensures that the driver implementation can evolve independently and is maintained separately. Updated docker-compose.yml and configuration files:

The configuration now points to the vibhi09/driver-did-earthid:latest Docker image for resolving did:earthid identifiers. The resolver setup will continue to support EarthID DIDs by referencing the external Docker image.

vaibhavahire99 avatar Oct 14 '24 15:10 vaibhavahire99

Thanks @vaibhavahire99 for your effort. This looks much better, but still one request.. This PR seems to add a lot of newlines to the docker-compose.yml file. Do you think you could also make this small change, so that you actually only add your driver and don't change other driver entries?

Also, this PR doesn't seem to add your driver to application.yml and .env and README.md, as described here: https://github.com/decentralized-identity/universal-resolver/blob/main/docs/driver-development.md

peacekeeper avatar Oct 14 '24 21:10 peacekeeper

Hi thanks @peacekeeper. I've made the changes as mentioned. Can you please take a look and let me know if works.

vaibhavahire99 avatar Oct 15 '24 15:10 vaibhavahire99

Hi,
I've just tested the driver and on startup it throws following error:

exec /usr/local/bin/docker-entrypoint.sh: exec format error

BernhardFuchs avatar Oct 18 '24 09:10 BernhardFuchs

@vaibhavahire99 It seems there are merge conflicts now that need to be resolved..

peacekeeper avatar Oct 27 '24 05:10 peacekeeper

Hi @peacekeeper, I've resolved the conflicts can you please take a look and let me know. Thank you

vaibhavahire99 avatar Oct 27 '24 08:10 vaibhavahire99

Pls fix the issues with indendation and resolve new merge conflicts. We added a new driver in the meantime and that created new conflicts

BernhardFuchs avatar Oct 29 '24 08:10 BernhardFuchs

Hi @BernhardFuchs, I've resolved the conflicts and the indendation issues. Can you please check and let me know if any changes.

vaibhavahire99 avatar Nov 02 '24 15:11 vaibhavahire99

There is still following error thrown:

exec /usr/local/bin/docker-entrypoint.sh: exec format error

BernhardFuchs avatar Nov 04 '24 09:11 BernhardFuchs

Hi @BernhardFuchs, I've updated the platform dependency. Can you please check now and let me know if any changes. Thanks!

vaibhavahire99 avatar Nov 06 '24 07:11 vaibhavahire99

Thx for the update but the driver still throws the same error on startup:

exec /usr/local/bin/docker-entrypoint.sh: exec format error

BernhardFuchs avatar Nov 07 '24 08:11 BernhardFuchs

I also tried it and got the same error as @BernhardFuchs .

@vaibhavahire99 Have you tried testing your own driver locally according to https://github.com/decentralized-identity/universal-resolver/blob/main/docs/driver-development.md#how-to-test-a-driver-locally ?

peacekeeper avatar Nov 07 '24 09:11 peacekeeper

Hi @peacekeeper and @BernhardFuchs , kindly let me review this and get back with updated commit. Thank you!

vaibhavahire99 avatar Dec 23 '24 12:12 vaibhavahire99

@vaibhavahire99 It looks like there are some merge conflicts in files now, could you fix them?

peacekeeper avatar Feb 06 '25 17:02 peacekeeper

Hi @peacekeeper, sure let me take a latest pull and resolve conflicts and update the commit.

vaibhavahire99 avatar Feb 07 '25 12:02 vaibhavahire99

Hi @peacekeeper, I've resolved the conflicts and updated the port. Please kindly let me know if any changes. Thank You!

vaibhavahire99 avatar Feb 07 '25 21:02 vaibhavahire99

Hi @peacekeeper, can you please check this commit and let me know if any update.

vaibhavahire99 avatar Feb 10 '25 10:02 vaibhavahire99

@BernhardFuchs Could you check this when you have time

peacekeeper avatar Feb 10 '25 12:02 peacekeeper

Hi @peacekeeper and @BernhardFuchs, any updates?

vaibhavahire99 avatar Feb 13 '25 09:02 vaibhavahire99

Hi @peacekeeper, can you please let me know if any updates? Thanks!

vaibhavahire99 avatar Feb 17 '25 09:02 vaibhavahire99

Hello @vaibhavahire99 I'm sorry please wait a few more days, @BernhardFuchs is currently away, and we will look at it asap.

peacekeeper avatar Feb 17 '25 13:02 peacekeeper

Just checked the driver and it seems that the image is behind a login.
docker pull docker.io/earthid/services:driver-did-earthid-v1.0 throws following error:

Error response from daemon: pull access denied for earthid/services, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

BernhardFuchs avatar Feb 18 '25 08:02 BernhardFuchs

Hi @BernhardFuchs, Thanks for the update. I've updated the image visiblity to public access now. You can try pulling with: docker pull earthid/driver-did-earthid-v1.0:latest Let me know if any changes. Thanks!

vaibhavahire99 avatar Feb 19 '25 07:02 vaibhavahire99

Tried it and when resolving the example DID the resolver throws this error:

Resolve problem for did:earthid:testnet:6XXVvDkgXCjD6fy62dWaQdyk5368yE1QFdkDpoCFS1d1:0.0.5032772: 404 Not Found (<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /1.0/identifiers/1.0/identifiers/did:earthid:testnet:6XXVvDkgXCjD6fy62dWaQdyk5368yE1QFdkDpoCFS1d1:0.0.5032772</pre>
</body>
</html>
)
uniresolver.ResolutionException: 404 Not Found (<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /1.0/identifiers/1.0/identifiers/did:earthid:testnet:6XXVvDkgXCjD6fy62dWaQdyk5368yE1QFdkDpoCFS1d1:0.0.5032772</pre>
</body>
</html>
)
	at uniresolver.driver.http.HttpDriver.resolve(HttpDriver.java:155)
	at uniresolver.local.LocalUniResolver.resolveWithDrivers(LocalUniResolver.java:155)
	at uniresolver.local.LocalUniResolver.resolve(LocalUniResolver.java:108)
	at uniresolver.local.LocalUniResolver.resolve(LocalUniResolver.java:57)
	at uniresolver.web.WebUniResolver.resolve(WebUniResolver.java:58)
	at uniresolver.web.servlet.ResolveServlet.doGet(ResolveServlet.java:108)

@vaibhavahire99 Does this work for you locally?

BernhardFuchs avatar Feb 21 '25 14:02 BernhardFuchs

The /1.0/identifiers/ part seems to be added twice:

Cannot GET /1.0/identifiers/1.0/identifiers/did:earthid:testnet:6XXVvDkgXCjD6fy62dWaQdyk5368yE1QFdkDpoCFS1d1:0.0.5032772

Try removing the duplicate path segments.

peacekeeper avatar Feb 25 '25 11:02 peacekeeper

Hi @peacekeeper and @BernhardFuchs, that's correct try using: http://localhost:8080/1.0/identifiers/did:earthid:testnet:6XXVvDkgXCjD6fy62dWaQdyk5368yE1QFdkDpoCFS1d1:0.0.5032772 this should work. Let me know if any query. Thanks!

vaibhavahire99 avatar Feb 27 '25 22:02 vaibhavahire99

@vaibhavahire99 You need to update the PR with the correct path.

Please first try it yourself locally. We cannot do your work for you. You need to fix the configuration, try it locally, and if it works, update the PR.

peacekeeper avatar Feb 28 '25 00:02 peacekeeper

Sure thanks for the update @peacekeeper. Let me update the PR with the updated url after testing on local.

vaibhavahire99 avatar Mar 06 '25 08:03 vaibhavahire99

@vaibhavahire99 In this line: https://github.com/decentralized-identity/universal-resolver/blob/05ff1667cb99b13427248bedbd640d2cf81c3b08/.env#L73

You need to remove the 1.0/identifiers/ part, to avoid it being added twice.

Please try it locally.

peacekeeper avatar Mar 18 '25 07:03 peacekeeper

Hi @peacekeeper, we have resolved the url repeatition issue as suggested removed the repeated part of the url and tested locally. I've updated the pull request by resolving the conflicts. Please let me know if works.

Thank you, Vaibhav

vaibhavahire99 avatar Mar 30 '25 12:03 vaibhavahire99

Hi @peacekeeper, can you please let me know if any updates? Thanks!

vaibhavahire99 avatar Apr 07 '25 07:04 vaibhavahire99