Skip to content

Authentication using API keys #48

@ricardobalk

Description

@ricardobalk

While testing the location tracker with a simple nginx reverse proxy set-up, I found out that the OsmAnd does not support Basic Authentication nor Digest Authentication. Bummer. However, TLS/SSL works. 👍

So, instead of using Basic Authentication, authentication with API keys would be a good alternative.

As TLS/SSL has been added (#44), the key can be added to the query parameters of a GET request (GET /submit?api_key=...). If used with TLS/SSL, it won't compromise the security. Only thing is that the server, when started in debug mode, might show the full URL with this "sensitive" data. Still, considering the server runs in a production environment, this is fine.

An even better way of sending an API key via a GET request would be by using a cookie or request header, like X-API-KEY: ..., so there won't be a URL containing an API key written to the log files. However, setting cookies or request headers not possible with OsmAnd.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions