eclipse / kuksa.val

kuksa.val
Apache License 2.0
96 stars 51 forks source link

Authentication of dbcfeeder fails due to expired token. #76

Closed svanstaa closed 3 years ago

svanstaa commented 3 years ago

Call of python3 dbcfeeder.py -d vcan0 -j ../../../certificates/jwt/super-admin.json.token --dbc dias_simple.dbc --mapping dias_mapping.yml

leads to output of dbcfeeder.py:

Open CAN device vcan0 Starting thread Connect Done Handle response for <websockets.client.WebSocketClientProtocol object at 0x7fa19d00e438> Authorize send Authorize done Received { "action": "authorize", "error": { "message": "Check the JWT token passed", "number": 401, "reason": "Invalid Token" }, "requestId": "1", "timestamp": 1606336052 }

and output of kuksa-val-server:

ERROR: Authenticator::validate: token verification failed: token expired Exception occurred while authentication. Token is not valid!

SebastianSchildt commented 3 years ago

Argh you are correct. The token(s) expired yesterday :-/

We will fix that, but meanwhile, can you try if this token works

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJrdWtzYS52YWwiLCJpc3MiOiJFY2xpcHNlIEtVS1NBIERldiIsImFkbWluIjp0cnVlLCJtb2RpZnlUcmVlIjp0cnVlLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MTc2Mzg3NDE4MCwia3Vrc2EtdnNzIjp7IioiOiJydyJ9fQ.EfzkiceljMOjL-SZVMApVu-xYPwGW2hgWFKJyHCxsbKwVJxU5WqtavgQ29vyL2IeMXb14bdJOsBZTZ45RYDRFTuwnimEODUicyb7nIIBobPTL0Dk6liVsY7SBsLT5BcS-djxq7NA1jBr7WPMjjOjgwF_PRK8i5swY2-x-NPuH7ZBe2_-nRY2u7_tTzv7GqzWVcoAfGX87J4OPVKc70WOytm3S77XeAXy2fBtr0oY00ADL1skQwIZrz1e3FIxN_SGU_jYuNZad--qBOtHo857CuRpN3QjupyJV2HD7l3T_OKw1WDQOXYnvA_IFFL8XgZTyVSamBd46eTlWizTRxB2_y1gbJ-f_CmqDZ7M1QAeuFWM2CZBEif_drkd66fXaJU0jS7UdYF1LW9jevbSX4r1gTMISkEAE1EuBosKttVigzIqIkpTNY_DOJOP2arVz5c2qZdRR3K9WEse-f0tPbbhEB7_F4VXRTq-kcrw1wgmx185i5k4CxpRFAcahfGrsOfDN4uaDe4GXVch9lnV005U4lSkJZtQ6zImsdoKN1SwsO2A5TDJiTYnjvRdpI7qF6oovElQPqTBitKFProKRrw9dHgwA_yzBU-EVRNo8-fNhJSKr_bDeyzFVCwn3E4r58cE-oT9GkYgK945hxfNEDjhuSd35TcGboY6T3QSXHLM3nk

(save to file, and use instead of super-admin.json.token)

If it works (or nit..) if you are familiar with jwt, you can update/generate tokens here https://jwt.io (both, the needed public and private key are in certificates/jwt folder).Of course for a "real" setup you should roll your own (really) secret keys....

svanstaa commented 3 years ago

Thanks! Didn't get it to work though lat night either way. Using this token, as well as generating a new one, yielded the same result...

Am Mi., 25. Nov. 2020 um 21:40 Uhr schrieb SebastianSchildt < notifications@github.com>:

Argh you are correct. The token(s) expired yesterday :-/

We will fix that, but meanwhile, can you try if this token works

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJrdWtzYS52YWwiLCJpc3MiOiJFY2xpcHNlIEtVS1NBIERldiIsImFkbWluIjp0cnVlLCJtb2RpZnlUcmVlIjp0cnVlLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MTc2Mzg3NDE4MCwia3Vrc2EtdnNzIjp7IioiOiJydyJ9fQ.EfzkiceljMOjL-SZVMApVu-xYPwGW2hgWFKJyHCxsbKwVJxU5WqtavgQ29vyL2IeMXb14bdJOsBZTZ45RYDRFTuwnimEODUicyb7nIIBobPTL0Dk6liVsY7SBsLT5BcS-djxq7NA1jBr7WPMjjOjgwFPRK8i5swY2-x-NPuH7ZBe2-nRY2u7_tTzv7GqzWVcoAfGX87J4OPVKc70WOytm3S77XeAXy2fBtr0oY00ADL1skQwIZrz1e3FIxN_SGU_jYuNZad--qBOtHo857CuRpN3QjupyJV2HD7l3T_OKw1WDQOXYnvA_IFFL8XgZTyVSamBd46eTlWizTRxB2_y1gbJ-f_CmqDZ7M1QAeuFWM2CZBEif_drkd66fXaJU0jS7UdYF1LW9jevbSX4r1gTMISkEAE1EuBosKttVigzIqIkpTNY_DOJOP2arVz5c2qZdRR3K9WEse-f0tPbbhEB7_F4VXRTq-kcrw1wgmx185i5k4CxpRFAcahfGrsOfDN4uaDe4GXVch9lnV005U4lSkJZtQ6zImsdoKN1SwsO2A5TDJiTYnjvRdpI7qF6oovElQPqTBitKFProKRrw9dHgwA_yzBU-EVRNo8-fNhJSKr_bDeyzFVCwn3E4r58cE-oT9GkYgK945hxfNEDjhuSd35TcGboY6T3QSXHLM3nk

(save to file, and use instead of super-admin.json.token)

If it works (or nit..) if you are familiar with jwt, you can update/generate tokens here https://jwt.io (both, the needed public and private key are in certificates/jwt folder).Of course for a "real" setup you should roll your own (really) secret keys....

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/kuksa.val/issues/76#issuecomment-733935931, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZWOMZ3F6EWH77GTQTQ2VTSRVTUBANCNFSM4UC3U53A .

junh-ki commented 3 years ago

Thanks for this issue!!