Commit Graph

1220 Commits

Author SHA1 Message Date
Derrick Hammer 4d75f5659c
ci: use git provider 2024-01-12 08:27:48 -05:00
Derrick Hammer 862570bc57
ci: disable github provider 2024-01-12 08:24:12 -05:00
Derrick Hammer e6f3df2882
refactor: use a sub logger 2024-01-12 08:22:59 -05:00
Derrick Hammer 522ed11d50
refactor: store portal identity 2024-01-12 08:22:40 -05:00
Derrick Hammer 0bd089e046
refactor: update Initialize signature 2024-01-12 08:22:21 -05:00
Derrick Hammer b5c540ab8e
refactor: change Protocol Initialize to take a portal instance 2024-01-12 08:21:41 -05:00
Derrick Hammer 2fb08f35ed
feat: implement identity and seed generation 2024-01-12 08:15:36 -05:00
Derrick Hammer 7ccfaa57da
fix: use logger.Fatal 2024-01-12 06:37:11 -05:00
Derrick Hammer 5fbac2ae13
fix: use config for db 2024-01-12 06:37:01 -05:00
Derrick Hammer fa4a3e6f2a
fix: pass domain and port info to s5 http config 2024-01-11 23:33:11 -05:00
Derrick Hammer c7af6286ad
fix: namespace config under protocol 2024-01-11 23:32:31 -05:00
Derrick Hammer 8917be5077
fix: add init func for config 2024-01-11 23:32:02 -05:00
Derrick Hammer b8572ea712
fix: use logger and return errors 2024-01-11 23:23:22 -05:00
Derrick Hammer a54341dd68
fix: subdomain comes before domain 2024-01-11 23:22:56 -05:00
Derrick Hammer a57e575a82
fix: change config path 2024-01-11 23:22:33 -05:00
Derrick Hammer 519426ba7d
feat: bare bones s5 support, and more dynamic loading of subsystems 2024-01-11 23:13:10 -05:00
Derrick Hammer 82aded34ac
cleanup: remove random files 2024-01-11 21:32:47 -05:00
Derrick Hammer 959005f29c
ci: set defaultBranch 2024-01-11 21:09:21 -05:00
Derrick Hammer 444de35e31
feat: initial new portal bones 2024-01-11 19:11:53 -05:00
Derrick Hammer c80046e95f
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	package.json
2024-01-11 14:59:16 -05:00
Derrick Hammer 8e8ea8ce86
ci: try switching to go-semantic-release 2024-01-11 14:58:44 -05:00
Derrick Hammer c7bce2ff23
refactor: Prune old code base to prepare for rewrite 2024-01-11 14:49:50 -05:00
semantic-release-bot 540457fb2f chore(release): 0.1.0-develop.3 [skip ci]
# [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/portal/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-09-09)

### Bug Fixes

* handle failure on verifying token ([a06b79a](a06b79a537))
2023-09-09 18:02:27 +00:00
Derrick Hammer d1b0aa5139
Merge remote-tracking branch 'origin/develop' into develop 2023-09-09 14:00:22 -04:00
Derrick Hammer a06b79a537
fix: handle failure on verifying token 2023-09-09 14:00:16 -04:00
semantic-release-bot fdd6b08b71 chore(release): 0.1.0-develop.2 [skip ci]
# [0.1.0-develop.2](https://git.lumeweb.com/LumeWeb/portal/compare/v0.1.0-develop.1...v0.1.0-develop.2) (2023-08-15)

### Bug Fixes

* need to change dnslink route registration to use a path param based route ([ae071a3](ae071a30ec))
* need to string off forward slash at beginning to match manifest file paths ([2f64f18](2f64f18e24))
2023-08-15 13:24:38 +00:00
Derrick Hammer ae071a30ec
fix: need to change dnslink route registration to use a path param based route 2023-08-15 09:21:54 -04:00
Derrick Hammer 37cdbfbc0d
refactor: move cors handler inside api party 2023-08-15 09:20:54 -04:00
Derrick Hammer 2f64f18e24
fix: need to string off forward slash at beginning to match manifest file paths 2023-08-15 09:20:11 -04:00
semantic-release-bot 66b9cd2022 chore(release): 0.1.0-develop.1 [skip ci]
# [0.1.0-develop.1](https://git.lumeweb.com/LumeWeb/portal/compare/v0.0.1...v0.1.0-develop.1) (2023-08-15)

### Bug Fixes

* abort if we don't have a password for the account, assume its pubkey only ([c20dec0](c20dec0204))
* add a check for a 500 error ([df08fc9](df08fc980a))
* add missing request connection close ([dff3ca4](dff3ca4589))
* add shutdown signal and flag for renterd ([fb65690](fb65690abd))
* **auth:** eager load the account relation to return it ([a23d165](a23d165caa))
* change jwtKey to ed25519.PrivateKey ([bf576df](bf576dfaee))
* close db on shutdown ([78ee15c](78ee15cf4b))
* Ctx must be public ([a0d747f](a0d747fdf4))
* ctx needs to be public in AuthService ([a3cfeba](a3cfebab30))
* **db:** need to set charset, parseTime and loc in connection for mysql ([5d15ca3](5d15ca330a))
* disable client warnings ([9b8cb38](9b8cb38496))
* dont try to stream if we have an error ([b21a425](b21a425e24))
* encode size as uint64 to the end of the cid ([5aca66d](5aca66d919))
* ensure all models auto increment the id field ([934f8e6](934f8e6236))
* ensure we store the pubkey in lowercase ([def1b50](def1b50cfc))
* handle duplicate tus uploads by hash ([f3172b0](f3172b0d31))
* hasher needs the size set to 32 ([294370d](294370d88d))
* if upload status code isn't 200, make it an err based on the body ([039a4a3](039a4a3354))
* if uploading returns a 500 and its a slab error, treat as a 404 ([6ddef03](6ddef03790))
* if we have an existing upload, just return it as if successful ([90170e5](90170e5b81))
* iris context.User needs to be embedded in our User struct for type checking to properly work ([1cfc222](1cfc2223a6))
* just use the any route ([e100429](e100429b60))
* load config before db ([58165e0](58165e01af))
* make an attempt to look for the token before adding to db ([f11b285](f11b285d4e))
* missing setting SetTusComposer ([80561f8](80561f89e9))
* newer gorm version causes db rebuilds every boot ([72255eb](72255eb3c5))
* only panic if the error is other than a missing config file ([6e0ec8a](6e0ec8aaf9))
* output error info ([cfa7ceb](cfa7ceb2f4))
* PostPubkeyChallenge should be lowercasing the pubkey for consistency ([d680f06](d680f0660f))
* PostPubkeyChallenge should be using ChallengeRequest ([36745bb](36745bb55b))
* PostPubkeyChallenge should not be checking email, but pubkey ([db3ba1f](db3ba1f014))
* PostPubkeyLogin should be lowercasing the pubkey and signature ([09d53ff](09d53ffa76))
* PostPubkeyLogin should not preload any model ([27e7ea7](27e7ea7d7a))
* properly handle missing size bytes ([c0df04d](c0df04d7d5))
* public_key should be pubkey ([09b9f19](09b9f195f4))
* register LoginSession model ([48164ec](48164ec320))
* register request validation ([c197b14](c197b1425b))
* remove PrivateKey, rename PublicKey in Key model ([00f2b96](00f2b962a0))
* rewrite gorm query logic for tus uploads ([f8aaeff](f8aaeff6de))
* rewrite sql logic ([ce1b5e3](ce1b5e31d5))
* rewrite streaming logic and centralize in a helper function ([bb26cfc](bb26cfca5b))
* save upload info after every chunk ([038d2c4](038d2c440b))
* temp workaround on race condition ([e2db880](e2db880038))
* **tus:** switch to normal clone package, not generic ([faaec64](faaec649ea))
* update default flag values ([241db4d](241db4deb6))
* update model relationships ([628f1b4](628f1b4aca))
* **upload:** add account to upload record ([e018a4b](e018a4b743))
* uploading of main file ([7aea462](7aea462ab7))
* upstream renterd updates ([5ad91ad](5ad91ad263))
* use AccountID not Account ([f5e4377](f5e437777a))
* use bufio reader ([90e4ce6](90e4ce6408))
* use challengeObj ([9b82fa7](9b82fa7828))
* use database.path over database.name ([25c7d6d](25c7d6d4fb))
* use getWorkerObjectUrl ([4ff1334](4ff1334d8a))
* Use gorm save, and return nil if successful ([26042b6](26042b62ac))
* we can't use AddHandler inside BeginRequest ([f941ee4](f941ee46d4))
* wrap Register api in an atomic transaction to avoid dead locks ([e09e51b](e09e51bb52))
* wrong algo ([86380c7](86380c7b3a))

### Features

* add a status endpoint and move cid validation to a utility method ([38b7615](38b76155af))
* add a Status method for uploads ([1f195cf](1f195cf328))
* add auth status endpoint ([1dd4fa2](1dd4fa22cd))
* add bao package and rust bao wasm library ([4c649bf](4c649bfcb9))
* add cid package ([706f7a0](706f7a05b9))
* add ComputeFile bao RPC method ([687f26c](687f26cc77))
* add debug mode logging support ([99d7b83](99d7b8347a))
* add download endpoint ([79fd550](79fd550c54))
* add EncodeString function ([488f873](488f8737c0))
* add files service with upload endpoint ([b16beeb](b16beebabb))
* add files/upload/limit endpoint ([b77bebe](b77bebe3b1))
* add getCurrentUserId helper function ([29d6db2](29d6db2009))
* add global cors ([1f5a3d1](1f5a3d19e4))
* add jwt package ([ea99108](ea99108327))
* add more validation, and put account creation, with optional pubkey in a transaction ([699e424](699e4244e0))
* add new user service object that implements iris context User interface ([a14dad4](a14dad43ed))
* add newrelic support ([06b3ab8](06b3ab87f7))
* add pin model ([aaa2c17](aaa2c17212))
* add pin service method ([8692a02](8692a0225e))
* add PostPinBy controller endpoint for pinning a file ([be03a6c](be03a6c686))
* add pprof support ([ee17409](ee17409e12))
* add proof download ([3b1e860](3b1e860256))
* add StringHash ([118c679](118c679f76))
* add swagger support ([49c3844](49c3844406))
* add upload model ([f73a04b](f73a04bb2e))
* add Valid, and Decode methods, and create CID struct ([4e6c29f](4e6c29f1fd))
* add validation to account register ([7257b5d](7257b5d597))
* generate and/or load an ed25519 private key for jwt token generation ([85a0295](85a02952df))
* initial dnslink support ([cd2f63e](cd2f63eb72))
* pin file after basic upload ([892f093](892f093d93))
* pin file after tus upload ([5579ab8](5579ab85a3))
* tus support ([3005be6](3005be6fec))
* wip version ([9a4c3d5](9a4c3d5d13))
2023-08-15 06:18:56 +00:00
Derrick Hammer 9879662d5b
ci: add semantic-release pkgs 2023-08-15 02:16:22 -04:00
Derrick Hammer cd2f63eb72
feat: initial dnslink support 2023-08-15 02:11:55 -04:00
Derrick Hammer 3e80bb43fa
reactor: revert
Revert "feat: add pprof support"

This reverts commit ee17409e12.

Revert "fix: just use the any route"

This reverts commit e100429b60.
2023-08-14 23:17:25 -04:00
Derrick Hammer e100429b60
fix: just use the any route 2023-08-09 03:28:42 -04:00
Derrick Hammer ee17409e12
feat: add pprof support 2023-08-09 03:03:12 -04:00
Derrick Hammer 18529f2cd1
refactor: Revert "feat: add newrelic support"
This reverts commit 06b3ab87f7.
2023-08-09 02:36:24 -04:00
Derrick Hammer 06b3ab87f7
feat: add newrelic support 2023-08-05 17:19:03 -04:00
Derrick Hammer 18e102cc8a
refactor: always ensure the db connection closes by using a defer 2023-08-05 17:17:26 -04:00
Derrick Hammer f11b285d4e
fix: make an attempt to look for the token before adding to db 2023-08-04 12:54:45 -04:00
Derrick Hammer a7ac5a5b72
refactor: change generateToken to set audience based on a type to separate auth and challenge tokens 2023-08-04 12:54:13 -04:00
Derrick Hammer e2db880038
fix: temp workaround on race condition 2023-08-04 12:53:13 -04:00
Derrick Hammer e09e51bb52
fix: wrap Register api in an atomic transaction to avoid dead locks 2023-08-04 11:51:18 -04:00
Derrick Hammer dff3ca4589
fix: add missing request connection close 2023-08-04 11:46:25 -04:00
Derrick Hammer 8d3f490c01
Merge remote-tracking branch 'origin/develop' into develop 2023-08-03 08:49:20 -04:00
Derrick Hammer 78ee15cf4b
fix: close db on shutdown 2023-08-03 08:48:49 -04:00
Derrick Hammer 1cfc2223a6
fix: iris context.User needs to be embedded in our User struct for type checking to properly work 2023-06-29 07:05:46 -04:00
Derrick Hammer a23d165caa
fix(auth): eager load the account relation to return it 2023-06-29 07:04:24 -04:00
Derrick Hammer 934f8e6236
fix: ensure all models auto increment the id field 2023-06-29 06:19:50 -04:00
Derrick Hammer 504dcefb35
ci: allow both "deps" and "dep" to be a patch 2023-06-29 06:01:38 -04:00
Derrick Hammer 76d3043dda
deps: update 2023-06-29 06:01:05 -04:00