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

API key suddenly stopped working #9

Open
ghost opened this issue Jan 28, 2019 · 5 comments
Open

API key suddenly stopped working #9

ghost opened this issue Jan 28, 2019 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jan 28, 2019

Describe the bug
We had a test running on https://try.iotagency.sigfox.com but it had stopped reporting on the 22nd of January. (The first message that got the 401 arrived at 2019-01-22 10:37:40)

On the SigFox backend we got a 401 message:

[ERROR] - Base station 3849 - 1 second
401 - Unauthorized - #1
POST https://api.try.iotagency.sigfox.com/api/Messages/sigfox HTTP/1.0
authorization : <was valid, redacted for obvious reasons>
content-length : 180
accept-encoding : gzip,deflate
accept-language : fr
host : api.try.iotagency.sigfox.com
user-agent : SIGFOX
accept-charset : UTF-8;q=0.9,*;q=0.7
content-type : application/json

{ "deviceId": "20AEAB", "time": 1548682015, "seqNumber": 9, "data": "101207480000000100000001", "reception": [{ "id": "3849", "RSSI": -118.00, "SNR": 18.11 }], "duplicate": false }

The authorization key was however correct.
I generated a new authorization key and inserted this one in the SigFox backend, and the 401 messages disappeared. The device is now reporting again.

Expected behavior
The key should have continued to work as it had already been running for a couple of days.

@adechassey
Copy link
Member

adechassey commented Jan 28, 2019

Hello Giovanni,
This is quite strange as the error has already been seen some time ago.
I will keep track of this issue but a new way of managing the developer access tokens has to be implemented in the future anyway. @siyu6974 will have a look at this this week if he can.
I know the Sigfox Backend can also be buggy, do not hesitate to validate twice when updating the callbacks...

@adechassey adechassey pinned this issue Jan 28, 2019
@adechassey adechassey assigned adechassey and siyu6974 and unassigned adechassey Jan 28, 2019
@adechassey adechassey added bug Something isn't working enhancement New feature or request labels Jan 28, 2019
@ghost
Copy link
Author

ghost commented Jan 28, 2019

Hello Antoine,

Just to clarify, we did not do any changes at the time. The callback was set up somewhere at the end of december and had been running fine up until Jan. 22.
It was only today when I noticed the demo was not working anymore on the dashboard page that I needed to update the callback with a new API key.

Kind regards,
Giovanni.

@adechassey adechassey unpinned this issue Jan 31, 2019
@adechassey
Copy link
Member

Hello Giovanni,

Coming back to this issue, I just figured the tokens where automatically deleted when a user changes his password.
This is a default security functionality implemented by Loopback (the backend framework used).
When I have some time, I will isolate developer access tokens to another collection, preventing this to happen.
I'll let the issue open until I implement the fix.

Best regards,
Antoine

@Vandewaetere
Copy link

Hi Antoine,

I just noticed that again the tokens got deleted recently (so our devices stopped reporting because of an authorization error).
I see that there has been some activity on this repository again.
Was our auth. key deleted due to an update? This time I am sure I did not change the password.

In the future can we expect this to happen again?

Kind regards,
Giovanni.

@adechassey
Copy link
Member

Hi Giovanni,

Nothing must have been deleted.
The only possible error I see might be a change in the callbacks on the Sigfox Backend..

Best,
Antoine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants