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

Speed up client FS, support server user max storage capacity, use authorized_keys, and some fixes #102

Merged
merged 7 commits into from
Mar 29, 2022

Conversation

aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Mar 24, 2022

  • Use bufferless FS write requests (the encryption part still uses buffers to encrypt files but the request does not)
  • Support setting server user max storage capacity via CHARM_SERVER_USER_MAX_STORAGE, zero is the default which means storage cap is disabled
  • Read data/.ssh/authorized_keys if it exists to limit user access to the server

* don't check client request size, leave that to the server
* use a bufferless request when writting to CharmFS

https://stackoverflow.com/a/39781706/10913628
https://blog.depa.do/post/bufferless-multipart-post-in-go
use CHARM_SERVER_USER_MAX_STORAGE to set user storage capacity (in bytes)
a value of zero disables user cap
"Changing the header map after a call to WriteHeader (or Write) has no
effect unless the modified headers are trailers."

https://pkg.go.dev/net/http#ResponseWriter
having an authorized_keys file will limit the users who can access the
charm server to only those specified in the file

Related: #55
@aymanbagabas aymanbagabas marked this pull request as ready for review March 29, 2022 20:58
@aymanbagabas aymanbagabas merged commit 26bdca4 into main Mar 29, 2022
@aymanbagabas aymanbagabas deleted the bufferless-fs branch March 29, 2022 21:02
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

Successfully merging this pull request may close these issues.

2 participants