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

Worker authorization #103

Open
rndquu opened this issue Dec 20, 2024 · 5 comments
Open

Worker authorization #103

rndquu opened this issue Dec 20, 2024 · 5 comments

Comments

@rndquu
Copy link
Member

rndquu commented Dec 20, 2024

Depends on #92

The cloudflare worker implemented in #92 does not have any authentication mechanic.

Right now calling the permit generation worker in a secure way should be supported by:

  • pay.ubq.fi worker backend
  • kernel worker backend
Copy link

Note

The following contributors may be suitable for this task:

whilefoo

80% Match ubiquity-os/ubiquity-os-kernel#43

rndquu

75% Match ubiquity/pay.ubq.fi#343

@Keyrxng
Copy link
Contributor

Keyrxng commented Dec 20, 2024

I had in mind that we'd

  1. Verify direct kernel reqs using the same handshake other plugins do
  2. UI reqs could be tld bound or IP bound (I'm sure you had to make a static one for reloadly yeah?)

@gentlementlegen
Copy link
Member

If we verify the signature, only our kernel would be able to run the worker, wouldn't that be enough for authentication?

Maybe at this time it would be problematic for pay.ubq.fi, however, because we should make it work through the kernel which seems odd.

@rndquu
Copy link
Member Author

rndquu commented Dec 31, 2024

If we verify the signature, only our kernel would be able to run the worker, wouldn't that be enough for authentication?

Maybe at this time it would be problematic for pay.ubq.fi, however, because we should make it work through the kernel which seems odd.

As far as I understand right now there're no clear specs that the kernel should be able to generate permits. But pay.ubq.fi backend will definitely generate them by calling the permit generation worker.

@0x4007
Copy link
Member

0x4007 commented Jan 1, 2025

Why don't we just make it redundant for this one off use case?

It seems a lot simpler and we don't change that code much if ever.

It seems nice that the auth works well for our kernel via GitHub built-ins. It would be a shame to compromise its integrity by trying to mix the use cases for being called by our ui as well.

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

No branches or pull requests

4 participants