Commit Graph

7568 Commits

Author SHA1 Message Date
Cameron
fb471d7d8d satellite/console: delete password recovery token when password is changed
If a user changes password while a password recovery token exists,
delete the token so the reset password email doesn't work.

github issue: https://github.com/storj/storj-private/issues/149

Change-Id: Ibb0c13076e182c46501c1d7ac92d3fecc7d5ee58
2023-03-02 22:47:55 +00:00
Wilfred Asomani
172fcc4f66 web/satellite: add project ownership tag
This change adds a tag to the project dashboard indicating if the user
is the owner of the project.
It also adds the project limit notification to the all projects dashboard

Issue: https://github.com/storj/storj/issues/5485

Change-Id: Ie2f446966459c160408fb5614ac1701179092cd5
2023-03-02 20:55:50 +00:00
Wilfred Asomani
418a0639cd web/satellite: fix project item alignment
The content alignment of project items that have descriptions and those
that don't differ. This change fixes that. It also adds some text style
changes.

Change-Id: Ic7bb348bdafee463a00faec7faa7af2d814416f8
2023-03-02 12:37:05 +00:00
Lizzy Thomson
54f0f47839 satellite/satellitedb: add passphrase_prompt column to user_settings
Add passphrase_prompt column to user_settings table to store a boolean
whether a user would like to be prompted to enter a passphrase when
entering a new project.

Issue https://github.com/storj/storj/issues/5613

Change-Id: I5d086df277aff458453343c7c38a379e7b1b8bf9
2023-03-01 14:53:18 -07:00
Michal Niewrzal
b46c0fb78f satellite/orders: don't cancel flushing bandwidth orders
Earlier we made a change to not cancel flushing orders when flushing
was triggered by orders endpoint method but we missed a case
where it can be also triggered (and canceled) by metainfo endpoints
method. This change moves ignoring context cancellation deeper.

Change-Id: Id43176f552efc3167345783f73aab885411ac247
2023-03-01 17:10:05 +00:00
Vitalii
eab83ee7fa web/satellite: fix locked files number if there are folders
Right now there is a problem that we list objects inside object browser using Delimiter param which helps us to define if bucket includes folders.
If we set Delimiter to '/' then in response we get a list of plain objects called Contents and another list called CommonPrefixes which includes 'folder' keys.
So this approach makes it impossible to know the exact object count because we don't know a number of objects behind folder keys.
So to correctly calculate objects count we have to make another list request without Delimeter param.
By doing this we get a single Contents list which includes plain objects and objects containing folder Prefix.

Example of Contents response without Delimiter param:
['object', 'object1', 'folder/object2', 'folder1/object3']

Change-Id: Id23f26bed369d2063bdbae96e7d915168c6c9bdd
2023-03-01 18:02:04 +02:00
Egon Elbre
71e42ac2a6 storagnode/storagenodedb: fix database queries
Change-Id: Ic5036c30aed7f68b9c28d6190650028461503465
2023-03-01 15:57:08 +02:00
Wilfred Asomani
faeea88265 satellite/{db,analytics,payments}: add chore for auto account freeze
This change adds a new chore that will check for failed invoices and
potentially freeze corresponding accounts.
It makes slight modifications to stripemock.go and invoices.go (adding
stripe CustomerID to the Invoice struct).

Issue: https://github.com/storj/storj-private/issues/140

Change-Id: I161f4037881222003bd231559c75f43360509894
2023-03-01 09:31:27 +00:00
Jeremy Wharton
31ec4fae9e web/satellite: add pricing plan selection to onboarding tour
A pricing plan selection step for users with a recognized partner has
been added to the beginning of the onboarding tour. Once visited, users
have the option of purchasing the pricing plan associated with their
partner or proceeding as a paid or free tier user.

Resolves storj-private#118
Resolves storj-private#126

Change-Id: I3b423194d96deaf87cf9807a766bf4d04fbcf86d
2023-02-28 20:49:59 -06:00
Vitalii
cd192164d2 web/satellite: confirm details step for new access grant flow
Added extra step for new access grant flow where user can confirm all selected caveats (except passphrase).

Change-Id: I9ac603d588016f30a95d4b578b3752e256a496da
2023-02-28 23:14:29 +00:00
Vitalii
552272d189 web/satellite: added more analytics for new access grant flow
Added docs opened tracking.

Change-Id: I9b69d521347e4a26c448312661fd278329b4466b
2023-02-28 23:13:53 +00:00
Vitalii
e9c4d1151f web/satellite: responsiveness and accessibility fixes for new access grant flow
Fixed responsiveness and accessibility for new access grant flow.

Change-Id: Ie39c807a702995610d240e19cf5dfd2c8a51d860
2023-02-28 22:14:14 +00:00
JT Olio
4362761fc7 satellite/audit: fix go1.19 dial timeouts and log more
Change-Id: Ide17c1b8e0ca8c86f305bea1b4ae553cc4cb60d0
2023-02-28 17:09:47 +00:00
Wilfred Asomani
ec4b0c8ff6 web/satellite: add project limit banner
The project limit banner allows free tier users to upgrade, and paid
tier users to request limit increase when project limit is reached.

Issue: https://github.com/storj/storj/issues/5483

Change-Id: I44cca07bee99618adbc1c25b8e559e42a51a3b01
2023-02-28 15:51:47 +00:00
Vitalii
490402132e web/satellite: refactor project level passphrase flow
Refactored project level passphrase flow to work correctly with new access grant flow.
Now we don't generate edge credentials when project passphrase is set.
We set them only when they are needed (bucket is being opened or created).
Replaced edge credentials generation to vuex objects module to be single source of truth.

Change-Id: I2a11194fff5a63f7970f6df60db16ad6a1ac7c60
2023-02-28 14:51:59 +00:00
Wilfred Asomani
bac4c86388 web/satellite: add all projects dashboard
This change does the initial implementation of the all projects
dashboard. It is accessible on satelliteUrl/all-projects.
This change does not implement onboarding step for new accounts.

Issue: https://github.com/storj/storj/issues/5514

Change-Id: Ideadbe91e7ce523f77bde0dee53a7d35ba9f16e0
2023-02-28 13:54:43 +00:00
Márton Elek
644aca0e42 storagenode: fix piecestore download metrics
Storagenode download metrics are not accurate:

 * the current metric bump cancel metrics only for specific error messages, but there are cases where the error is already handled (err == nill)
 * instead of the full size of the piece we need to use the size of the downloaded bytes

Change-Id: I6ca75770e2d40bf514f5e273785c78e02968c919
2023-02-28 12:52:58 +00:00
Egon Elbre
f13d0f7df0 satellite/satellitedb/dbx: document oauth tables
Change-Id: Ide327699f4b7b35f46c9356d558221ece5bd77a9
2023-02-28 09:07:58 +00:00
Wilfred Asomani
76d7bc6d18 web/satellite: add components for new dashboard
This change just adds the components/changes needed by the all projects
dashboard.

Issue: https://github.com/storj/storj/issues/5514

Change-Id: Ie7926f563dd3eb47a56b234cfd004f5b69be00a8
2023-02-27 21:33:24 +00:00
Jeremy Wharton
85d6843f2e web/satellite: registration success responsiveness improvements
This change prevents overlapping of registration success page content
when displayed on short screens. It also prevents the content from
exceeding the page width when it shouldn't.

Change-Id: I7d23da7ade5c023cd96ee9e997196e599a1bc059
2023-02-27 17:52:39 +00:00
Cameron
b24ce98944 satellite/admin: add Groups to config
add new config to the satellite admin: --admin.groups.limit-update.
This can be used as an alternate means of authentication if the request
is coming from the oauth proxy.

Change-Id: Ic2de13862e6414244b060c66a0f2bed72097cbad
2023-02-27 16:07:20 +00:00
Egon Elbre
1cef2334ff satellite/satellitedb/dbx: document billing
Change-Id: Ief90cc0a6bebaa8df9dd9255565eaa42dc0abc9e
2023-02-27 15:13:23 +00:00
Egon Elbre
4aa519a69f satellite/satellitedb/dbx: document node payments
Change-Id: Ie65ec960f1683f5735a2b5959fedbde326007d04
2023-02-27 14:13:35 +00:00
Vitalii
a1c0fa96d2 web/satellite: S3 credentials step for new access grant flow
Added s3 credentials generated step for new access grant flow.
We show access key secret key and endpoint.
They can be copied or downloaded to .txt file.

Change-Id: I647fb0a86453134702812e8ea9425b8417382a65
2023-02-27 15:15:58 +02:00
Vitalii
430b9646dc web/{satellite, storagenode, multinode}: more linter fixes
Added rule to restrict trailing white spaces.
Added rule to always use '===' instead of '=='.
Added rule to have correct spacing around commas.
Added rule to have spaces around '=>'.
Added rule to not have spaces in parentheses.
Added rule to have space before blocks '{}'.

Change-Id: Ibdbd204d591f0356e0745d89672e0e0579b59ce1
2023-02-27 12:37:32 +00:00
Vitalii
bd0ad21c24 web/satellite: CLI access step for new access grant flow
Added CLI access created step for new access grant flow.
We show satellite address and restricted key there.
They can be copied to clipboard or downloaded.

Change-Id: Ic1942abfa575017fbb57abb9f09e8de66039bb8d
2023-02-27 13:59:47 +02:00
Egon Elbre
1f439f5ae9 satellite/satellitedb/dbx: document audit tables
Change-Id: Iae0f2d7eaddb30cf43a3a7cd678f1dcfb8256a45
2023-02-27 09:56:39 +00:00
JT Olio
8befcaab27 go.mod: bump storj.io/{common,drpc,uplink}
this set of changes re-enables noise with fixes

Change-Id: I122142d202dd76a83b678ac8d709407b0791ed0b
2023-02-24 23:17:16 +00:00
Vitalii
991211a2b0 web/satellite: access created step for new access grant flow
Added access created step to new access grant flow.
Also added some really tiny fixes for current project passphrase flow.

Change-Id: I94eb25b53cf7cc0c6ea7b9c13762ca76736ea7ac
2023-02-24 22:26:42 +00:00
Vitalii
fa2f7336cd web/satellite: encryption info step for new access grant flow
Added middleware info step in case if 'S3' access type is selected.
It's possible to toggle checkbox to not show it again in current browser,

Change-Id: I78b297b373f14715dc67b247baa8e684bea3a265
2023-02-24 21:49:27 +00:00
JT Olio
f3c5cd9df2 cmd/satellite: limit time spent restoring trash from a node
okay to do now that
https://review.dev.storj.io/c/storj/storj/+/7882
is widely deployed

Change-Id: I26c9a982b3999186e7c34a30515d151bf18a8648
2023-02-24 20:56:09 +00:00
Jeremy Wharton
cbbd5ab1ef satellite/payments/stripecoinpayments: undo price override removal
Commit fb59974 disabled usage price overrides because of a failing
test. This change reenables it while resolving the issue that caused
the test to fail.

The previous version of the test passed Gerrit verification and was
merged, but it failed for the primary Jenkins pipeline after merge.

This is due to a difference in how the Jenkins build runs Cockroach
and Postgres for each pipeline.

This commit rewrites the test to be safe for concurrent execution by
ensuring any mutable variables are defined within each test so that
shared state across tests is reduced.

Change-Id: Ia4566c9cd2d698afdb2caa4b7e2808b17e18de4e
2023-02-24 16:54:51 +00:00
Vitalii
17ec326fd4 web/satellite: make inactivity modal appear on top of other modals
This change makes sure that inactivity modal appears on top of everything else including other modals.
If it is the last element of main dashboard wrapper then it will be the last element in DOM tree which makes it appear on top of everything.

Issue:
https://github.com/storj/storj/issues/5549

Change-Id: Ibb0c6e2036c0be09aae17118f672dbed4ffc5b62
2023-02-24 16:03:31 +00:00
paul cannon
20bcdeb8b1 satellite/repair: fix flaky test TestECREpairerGetOffline
It was possible to get into a situation where successfulPieces =
es.RequiredCount(), errorCount < minFailures, and inProgress == 0 (when
the succeeding gets all completed before the failures), whereupon the
last goroutine in the limiter would sit and wait forever for another
goroutine to finish.

This change corrects the handling of that situation.

As an aside, this is really pretty confusing code and we should think
about redoing the whole function.

Change-Id: Ifa3d3ad92bc755e563fd06b2aa01ef6147075a69
2023-02-24 09:05:21 -06:00
Egon Elbre
4a6e34bb2c satellite/satellitedb/dbx: document peer_identity table
Change-Id: I112ef00cb80638a8168dd46a531522b0785b537a
2023-02-24 14:06:46 +00:00
Egon Elbre
cf324c5b6e satellite/satellitedb/dbx: document node tables
Also, fix nodevents iota usage. Type is directly used in the database
hence we should avoid iota, because it's easy to mess-up the constant
values.

Change-Id: I32bf6d0502fbf3d18660dab5b1dd0b5627b444df
2023-02-24 14:05:55 +00:00
Egon Elbre
e4914e9b7a satellite/satellitedb/dbx: document accounting tables
Change-Id: I94478892a37623882d306a811e272f51865e48dd
2023-02-24 16:04:29 +02:00
Márton Elek
dfe3c87b87 satellite/metabase/rangedloop: save observer durations to eventkit
Change-Id: I2d027cd7f7421e2c38dcc1277d640d4183af4cec
2023-02-24 13:30:19 +00:00
Egon Elbre
4e70ef83fb satellite/satellitedb/dbx: split accounting.dbx by project and node
Change-Id: Ia3dee52abf98a41ea62d94af0a155f4f09661224
2023-02-24 09:08:20 +00:00
Cameron
8842985571 satellite/console/consoleweb: create purchase-package endpoint
Add new purchase-package endpoint to Server. The endpoint can be enabled
or disabled by a new config, --console.pricing-packages-enabled.
The purchase-package endpoint applies a coupon and adds and charges a
credit card if user's useragent is a partner with a configured package
plan.

github issue: https://github.com/storj/storj-private/issues/125

Change-Id: I0d6ccccd6874ddba360c45f338fd1c44f95e135a
2023-02-23 15:42:36 -05:00
JT Olio
529e3674e4 storagenode/piecestore: handle upload write if provided in first message
we may in the future want to accept writes and commits as part of the
initial request message, just like
https://review.dev.storj.io/c/storj/storj/+/9245

this change is forward compatible but continues to work with
existing clients.

Change-Id: Ifd3ac8606d498a43bb35d0a3751859656e1e8995
2023-02-23 18:33:08 +00:00
Egon Elbre
1a2ad602d7 satellite/satellitedb/dbx: document gracefulexit tables
Change-Id: Ia76b67fa85e797c1d75438ae882bdfe83a6ee057
2023-02-23 19:14:51 +02:00
Jeremy Wharton
fb5997484e satellite/payments/stripecoinpayments: remove usage price overriding
Project usage price overriding has been removed because it produces
incorrect results when tested. It should not be re-implemented until
the issues it causes are resolved.

Change-Id: Ic92eff374c9af4fea3bf32782a72303a7978b055
2023-02-23 13:36:59 +00:00
Ivan Fraixedes
16d3fcde70 satellite/admin/ui/lib: Fix bug in API
The update user API function was defining a parameter that the API
calling function doesn't receive, so all the values were shifted by
1 after this extra parameter and the calling function was sending these
  values to the next one updating the fields that the user was not
  expecting.

  The API server doesn't allow to update this removed parameter, so it
  was likely a bug caused by copy-pasta.

Change-Id: I52a2b66abc1f6e5cb0070dc6fd230c30d1133dcf
2023-02-23 10:59:18 +00:00
Jeremy Wharton
209b669e84 satellite/console/consoleweb: create and serve frontend config
A new struct containing configuration values for the satellite frontend
is populated and served to the client. In the future, this struct will
be used to configure the frontend rather than using Go templates and
meta tags to do so.

References #5494

Change-Id: Ie2c8a140d53b20fab159d34f2e3767e5dbd43bdb
2023-02-22 23:24:35 -06:00
Vitalii
a9ca643e3f web/satellite: added passphrase generated screen for new access grant flow
Added passphrase generated screen.
Passphrase is a 12-word mnemonic in this case and it is generated with bip39 lib.
It can be copied to clipboard or downloaded as a .txt file.

Change-Id: I031f6c0e92f4f783c07a2d8d35c0433c1d9a81ff
2023-02-22 14:18:34 +02:00
Michal Niewrzal
16b7901fde satellite/metabase: add piece size calculation to segment
This code is essentially replacement for eestream.CalcPieceSize. To call
eestream.CalcPieceSize we need eestream.RedundancyStrategy which is not
trivial to get as it requires infectious.FEC. For example infectious.FEC
creation is visible on GE loop observer CPU profile because we were
doing this for each segment in DB.

New method was added to storj.Redundancy and here we are just wiring it
with metabase Segment.

BenchmarkSegmentPieceSize
BenchmarkSegmentPieceSize/eestream.CalcPieceSize
BenchmarkSegmentPieceSize/eestream.CalcPieceSize-8         	    5822	    189189 ns/op	    9776 B/op	       8 allocs/op
BenchmarkSegmentPieceSize/segment.PieceSize
BenchmarkSegmentPieceSize/segment.PieceSize-8              	94721329	        11.49 ns/op	       0 B/op	       0 allocs/op

Change-Id: I5a8b4237aedd1424c54ed0af448061a236b00295
2023-02-22 11:04:02 +00:00
Michal Niewrzal
3abe7ac0da private/testplanet: add uplink config to use different path cipher
From time to time it would be handy to test uplink operations
without encrypting paths.

Change-Id: I00c64fafa133cb711fcdcfe915c3bfbe5eb75d81
2023-02-22 10:28:25 +00:00
Vitalii
a1f46fe721 web/satellite: enter passphrase step for new access grant flow
Added generic enter passphrase component for new access grant flow to fulfill 2 cases where user enters project level passphrase and a new passphrase.

Change-Id: I10e89d0e32690b0423462ad76c20dafdb6ff096c
2023-02-22 00:00:41 +00:00
Wilfred Asomani
81d7f751da web/satellite: clean up popup constants
This change removes unused modal and dropdown action/mutation constants

Change-Id: Ib4f789ec967727d3619e9fd7769caf99dc9531ac
2023-02-21 23:11:02 +00:00