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

Consider an HTTP POST option to mitigate browser triggering #36

Open
PeterRounce opened this issue Sep 17, 2023 · 2 comments
Open

Consider an HTTP POST option to mitigate browser triggering #36

PeterRounce opened this issue Sep 17, 2023 · 2 comments

Comments

@PeterRounce
Copy link
Member

Raised by Nicholas Burtey in the Bolt Card Telegram group.

The current (nice and simple) interface for the NFC writer app to get the keys is:

  • scan a QR code or copy an HTTPS link
  • app hits the endpoint to get the keys (endpoint is only available one time)
  • app is available to program the cards

This is designed to be simple and secure.

Nicholas has pointed out that the link could be (accidentally or on purpose) opened by a browser and then will not work, as it is one use only. This could be mitigated using an HTTP POST request.

If implemented, this should be done in a backward compatible way.
I suggest adding a parameter to the URI, e.g. use_post=true .
This can be detected by the app and a POST request made with the key passed as a paremeter.
In this case, the server should detect a GET request and respond with an error message.

@robertclarkson
Copy link
Member

Yeah sounds good.
I wonder if we allow direct QR code key transfer as well (assuming possible) while we're at it?
This would allow setup without any network requests. What do you think?

@PeterRounce
Copy link
Member Author

I'm not so keen on keys in QR code fo these reasons:

  • It widens the key exposure
  • It's good to find out if the service is not accessable by https:// early on
  • The service needs to be online for the app programming test to pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants