International-Data-Spaces-Association / IDS-testbed

Apache License 2.0
24 stars 32 forks source link

jsonwebtoken.PrematureJwtException ... a difference of 666 milliseconds. Allowed clock skew: 0 milliseconds #126

Closed txipiroia closed 1 year ago

txipiroia commented 1 year ago

Hi,

I have three connectors in three companies. I will call them A, B and C the DAPS is in C company but in diferent machine

connector of A as consumer VS connector C as provider--> works connector of A as provider VS connector C as consumer--> it works

connector of B as consumer VS connector C as provider--> works connector of B as provider VS connector C as consumer --> works

connector A as provider VS connector B as consumer --> not working

I get the following error:

Captura

Company A is behind 2 firewalls, I don't know if that has anything to do with those 666 milliseconds.

Can the connector be configured so that the JWT validation leaves some more time?

jfernandezsqs commented 1 year ago

As connector A has worked with connector C, I guess that the two firewall setup of Company A will not be the reason for the failure.

It seems that the request you made happened before the JWT`s validity time.

The error reason could be the time defined for both machines, please check that both machines are synchronized with the same time.

If this is not the reason of the error, it will be neccessary the help from the DSC and DAPS developers.

txipiroia commented 1 year ago

Yep, It seems that the machine that has the connector A had the timesyncd service unconfigured (port 123 of ntp.ubuntu.com blocked by some of the firewalls), we have reconfigured it and although the connectors do not use the same NTP server it seems that the error has been fixed.

Thanks!!!! @jfernandezsqs

jfernandezsqs commented 1 year ago

Great to hear that!! As it has been solved I will close the issue.