Egon Elbre
892b190db6
satellite/admin: add project limit modification and authorization token
...
Change-Id: If9a7214a940b8544f8023c2cd82da21f19d3f521
2020-02-17 07:56:16 +00:00
Yingrong Zhao
f9189f8d94
satellite/console: only create user with registration token
...
we should only allow new user to register with a registration
token
Change-Id: Iea579976f1e7aa98799693a90401b31a7915bb22
2020-02-13 17:23:03 +00:00
Cameron Ayer
33d696b096
storage/redis/redisserver: simplify redisserver creation
...
Change-Id: I881576a7881db671b5abeeca7120a022987cc47f
2020-02-11 19:11:57 +00:00
Qweder93
dc075eaa96
satellite/payments : deposit bonuses (credits) added
...
Change-Id: Ib151bbb9b02d655fa619c53bfbc04ed6f3bb39e0
2020-02-11 11:11:42 +00:00
NikolaiYurchenko
6679036ace
web/satellite: unauthorize error handled
...
Change-Id: I12c6937ed1660af097d6930fe2a90fac5f298311
2020-02-10 11:14:51 +00:00
Jeff Wendling
7999d24f81
all: use monkit v3
...
this commit updates our monkit dependency to the v3 version where
it outputs in an influx style. this makes discovery much easier
as many tools are built to look at it this way.
graphite and rothko will suffer some due to no longer being a tree
based on dots. hopefully time will exist to update rothko to
index based on the new metric format.
it adds an influx output for the statreceiver so that we can
write to influxdb v1 or v2 directly.
Change-Id: Iae9f9494a6d29cfbd1f932a5e71a891b490415ff
2020-02-05 23:53:17 +00:00
crawter
9bb7ceb651
satellite\payments: amount for coupons increased
...
Change-Id: I1f357b76361e6e3e50bbe4ee66a8edb6ff033f36
2020-01-29 22:08:54 +02:00
crawter
f4667426b5
satellite\payments: project limits for coupons increased
...
Change-Id: I51eb47eb635fd096348befd39b7efbe3ce8982d6
2020-01-29 19:34:50 +02:00
NikolaiYurchenko
e641ff45a5
web/satellite: logout fix
...
Change-Id: I1b2b14c098e0959e9c5bd36adc889a425d00963c
2020-01-29 16:53:21 +00:00
crawter
e549e32976
satellite/payments: fix promotional coupons
...
Change-Id: Ib8b7e38f2cb07085655448264f281fd7fc7867dd
2020-01-29 16:40:43 +02:00
Yaroslav Vorobiov
083b396c16
satellite/payments: allow floating point numbers for pricing
...
Change-Id: I78b60134cf043746efef5371b761939a10f75aaf
2020-01-28 22:52:13 -05:00
NikolaiYurchenko
9bcb81108f
web/satellite: verification email change
...
Change-Id: I0293ef4411b55e42bb372b230d797d6798eda515
2020-01-27 15:55:52 +02:00
Ivan Fraixedes
f5c9597d29
golangci: Enable new linter added to last release
...
Enable a new golangci-lint linter that has been added to the last
release. It reports a very little number of issues so they are fix it in
this commit.
Change-Id: I74fef4779c3f592aae19103fd9f70103586fe24e
2020-01-24 18:09:37 +00:00
Ethan
21a5d70a83
satellite/metainfo: Rate limiting - API requests
...
Limits how many times metainfo APIs can be called per second by project ID. If limit is exceeded, the API will return Unauthorized/Too Many requests.
Limit per second and the size of the limiter cache per project are configurable, as well as whether the limiter is enabled.
Tests added/updated for the new rate_limit field in projects table.
Tests added for exceeding limits and disableing limiter.
Change-Id: Ic8ad102de3b690a475809d4f684156d5715f20fa
2020-01-21 14:25:04 +00:00
Yaroslav
c636b06191
satellite/console: use cookie based auth scheme
...
Change-Id: I143b56f49fa9028ec172db8c29fd93577c3e7878
2020-01-20 21:35:23 +02:00
Yaroslav
33790e0f7e
satellite/console: handle graphql errors properly
...
Change-Id: Id62b4f10cff9e9caba64ec940f558530eadbabbc
2020-01-20 15:20:24 +00:00
Egon Elbre
f3b4bf2b7c
satellite/satellitedb/satellitedbtest: pass ctx as an argument
...
ctx is created in most tests, instead pass in as argument
to reduce code duplication.
Change-Id: I466c51c008392001129c8b007c9d6b3619935ac4
2020-01-20 16:35:42 +02:00
crawter
c4cbc6ff2f
satellite/payments: promotional coupons generation functional added
...
Change-Id: Ie0df256503114ca377d81bf7c8b26cc90a1f5b26
2020-01-20 11:01:55 +00:00
Yaroslav
48303bc0a9
satellite/console/limits: add content-type to response, fix error
...
Change-Id: I63dffb5372456569b100f97b04eacc1fc19bddf5
2020-01-19 15:42:55 +00:00
Yaroslav
d8368d0b30
satellite/payments: coinpayments add completed status, treat received status as pending, add balance for completed transactions only
...
Change-Id: I20494bdddfda6d4f37ba2c5b6f7955cd29a6d798
2020-01-17 17:26:34 +00:00
Cameron Ayer
4424697d7f
satellite/accounting: refactor live accounting to hold current estimated totals
...
live accounting used to be a cache to store writes before they are picked up during
the tally iteration, after which the cache is cleared. This created a window in which
users could potentially exceed the storage limit. This PR refactors live accounting to
hold current estimations of space used per project. This should also reduce DB load
since we no longer need to query the satellite DB when checking space used for limiting.
The mechanism by which the new live accounting system works is as follows:
During the upload of any segment, the size of that segment is added to its respective
project total in live accounting. At the beginning of the tally iteration we record
the current values in live accounting as `initialLiveTotals`. At the end of the tally
iteration we again record the current totals in live accounting as `latestLiveTotals`.
The metainfo loop observer in tally allows us to get the project totals from what it
observed in metainfo DB which are stored in `tallyProjectTotals`. However, for any
particular segment uploaded during the metainfo loop, the observer may or may not
have seen it. Thus, we take half of the difference between `latestLiveTotals` and
`initialLiveTotals`, and add that to the total that was found during tally and set that
as the new live accounting total.
Initially, live accounting was storing the total stored amount across all nodes rather than
the segment size, which is inconsistent with how we record amounts stored in the project
accounting DB, so we have refactored live accounting to record segment size
Change-Id: Ie48bfdef453428fcdc180b2d781a69d58fd927fb
2020-01-16 10:26:49 -05:00
crawter
41d5e86306
satellite/payments: coupon addition removed
...
Change-Id: I92781d9133603fdefd58b19a6f0ac6b1c6df3ac6
2020-01-14 16:24:48 +00:00
NikolaiYurchenko
224025d714
web/satellite: password recovery page title fixed
...
Change-Id: I4e070315ec2e5f0b7ff0140f93dd6aacf1e68112
2020-01-14 13:34:54 +00:00
crawter
a57ce18f58
satellite/payments: coupons, coupons usage, invoice generation with pricing model applied
...
Change-Id: Ic5d5a2fc116388647efe46896cfccc2038c77537
2020-01-14 12:45:00 +00:00
Egon Elbre
d3d75a597f
satellite,storage: clean global ctx usage in tests
...
Change-Id: I89ea5c95fc6895518b464f8eb6a4c74c6ae37651
2020-01-09 10:37:21 +00:00
paul cannon
0c5e381434
satellite/console: use transaction helpers in consoledb
...
Transactions in our code that might need to work against CockroachDB
need to be retried in the event of a retryable error. The transaction
helper functions in dbutil do that automatically. I am changing this
code to use those helpers instead.
I also fleshed out consoledb_test.go to do actual inserts and gets to
make sure things were working correctly.
Change-Id: I089bf4c776d15dc8578080e26760bd6dff4beec9
2020-01-07 17:59:10 +00:00
Yaroslav
389567fc9e
satellite/console: add credit card charges to billing history
...
Change-Id: I82a08c42c01086dc7fb9508da5c6c0baa2438124
2020-01-03 17:34:59 +02:00
Yaroslav
0cc7056a9a
satellite/console: convert dates to UTC in advanced usage reports
...
Change-Id: I5c72c869533a7613bffdb8077fdedff2a4e203d0
2020-01-03 14:17:37 +02:00
Egon Elbre
6615ecc9b6
common: separate repository
...
Change-Id: Ibb89c42060450e3839481a7e495bbe3ad940610a
2019-12-27 14:11:15 +02:00
Egon Elbre
7a36507a0a
private/testcontext: ensure we call cleanup everywhere
...
Change-Id: Icb921144b651611d78f3736629430d05c3b8a7d3
2019-12-17 14:16:09 +00:00
Jessica Grebenschikov
c5116cb2a0
satellitedb: fix migration cockroach test
...
Change-Id: Ie3b4a4b0795d156238d50a58078282cc0918a334
2019-12-16 18:02:31 +00:00
Yaroslav Vorobiov
f659d98a4d
satellite/payments/tokens: return checkout url on new deposit ( #3696 )
2019-12-12 15:09:19 +02:00
Yaroslav Vorobiov
77839dd41b
satellite/console: project usage limits api ( #3702 )
2019-12-12 14:58:15 +02:00
Nikolai Siedov
5d8d9cd89f
projectLimit error message changed ( #3718 )
2019-12-10 15:54:23 -05:00
Nikolai Siedov
c6776ae6bb
error messages fixed ( #3712 )
2019-12-09 15:20:44 +02:00
Cameron
52851026a7
satellite/console : remove code for creating user credit in CreateUser, skip TestUserCredits ( #3680 )
...
* remove code for creating user credit in CreateUser, skip TestUserCredits
2019-12-02 15:23:12 -05:00
Malcolm Bouzi
18a5e614d9
satellite/web: add segmentio plugin ( #3405 )
2019-11-27 11:57:59 -05:00
Yingrong Zhao
79a4fff6c7
satellite/referrals: set up referrals service and http endpoints ( #3566 )
2019-11-25 16:36:36 -05:00
Yaroslav Vorobiov
8a002e8c8e
satellite/accounting: separate project limit from project entity ( #3632 )
2019-11-25 16:18:04 +02:00
Nikolai Siedov
e5934cc92a
satellite/console/auth: return in error handle added ( #3639 )
2019-11-22 21:44:57 +02:00
Nikolai Siedov
ded7f6e2eb
web/satellite: registration/welcome message fixed, usage-report url fixed, storj-sim fixed ( #3622 )
2019-11-22 19:03:15 +02:00
Matt Robinson
976881f72b
satellite/console: Add security headers ( #3615 )
...
* satellite/console: Add X-Frame-Options and Referrer-Policy security headers
* Update to use CSP instead of XFO and include tardigrade.io
* Make FrameAncestors a config option
* Update satellite-config lock
* Make help text for FrameAncestors better
2019-11-21 11:15:22 -05:00
Yaroslav Vorobiov
87c7a2ff42
satellite/payments: token deposit accept cents ( #3628 )
2019-11-21 16:25:37 +02:00
Yaroslav Vorobiov
c72c443564
satellite/payments: add cents values to transaction info ( #3614 )
2019-11-21 15:23:16 +02:00
Yingrong Zhao
b995406ff9
satellite/satellitedb: separate uuid creation from db layer ( #3600 )
2019-11-20 14:16:27 -05:00
Yehor Butko
9ca547acb1
web/satellite: project charges ( #3611 )
2019-11-20 15:46:22 +02:00
Yaroslav Vorobiov
3d94c3fc99
satellite/payments: stripe client use satellite logger, give credits when applying transaction to balance ( #3603 )
2019-11-19 19:56:18 +02:00
Nikolai Siedov
24318d74b3
storagenode/console: show satellite url in satellite selection ( #3602 )
2019-11-19 14:16:56 +02:00
Nikolai Siedov
3fe518d547
satellite: added ability to inject stripe public key post build ( #3560 )
2019-11-18 13:38:43 +02:00
Yehor Butko
a8e4e9cb03
satellite/payments: project usage charges ( #3512 )
2019-11-15 16:27:44 +02:00
Egon Elbre
ee6c1cac8a
private: rename internal to private ( #3573 )
2019-11-14 21:46:15 +02:00
Egon Elbre
1e64006e32
lint: add staticcheck as a separate step ( #3569 )
2019-11-14 10:31:30 +02:00
Nikolai Siedov
9797f8c49b
satellite/console: service error types added, error handling fixed ( #3538 )
2019-11-12 15:14:31 +02:00
Nikolai Siedov
70c7ee842e
satellite: adding proper headers to api responses ( #3489 )
2019-11-12 15:05:35 +02:00
Nikolai Siedov
c1ae8c332f
satellite/console: auth API error handling refactored ( #3540 )
2019-11-12 13:53:00 +02:00
Yaroslav Vorobiov
36311a3a05
satellite/console: add token deposit API, populate billing history with transactions ( #3500 )
2019-11-12 13:14:34 +02:00
Egon Elbre
23c556ae15
satellite/rewards: fixes from review comments ( #3495 )
2019-11-06 20:37:53 +02:00
Nikolay Yurchenko
e6c7b8180c
web/satellite: tabs title change ( #3496 )
2019-11-06 14:27:26 +02:00
Yaroslav Vorobiov
0b32690d0a
satellite/peer: add payments config ( #3488 )
...
* satellite/peer: add payments config
* remove stripe-key from console config
* update config lock
* fix imports
* fix config-lock
2019-11-05 21:26:19 +01:00
Yaroslav Vorobiov
35edc2bcc3
satellite/payments: invoice creation ( #3468 )
2019-11-05 15:16:02 +02:00
Egon Elbre
9c59efd33d
satellite/rewards: ensure that partner information is asked from a service ( #3275 )
2019-11-05 14:58:09 +02:00
Nikolai Siedov
1a0757ebf7
web/satellite: auth error messages fixed ( #3426 )
2019-11-05 13:55:26 +02:00
Yehor Butko
0c2e498f09
satellite/satellitedb: console tables archview comments updated ( #3465 )
2019-11-04 16:37:39 +02:00
Nikolai Siedov
8ce09700af
web/satellite: internal server error template added, errors separated ( #3430 )
2019-10-31 20:42:28 +02:00
Yehor Butko
ecde507e4e
satellite/payments: list invoices ( #3389 )
2019-10-31 18:56:54 +02:00
Nikolai Siedov
6354b38849
web/satellite: auth graphql api replaced with REST API ( #3396 )
2019-10-29 16:24:16 +02:00
Nikolai Siedov
f4f142bf3e
satellite/console: get, update auth api endpoints added ( #3375 )
2019-10-25 15:07:17 +03:00
Yehor Butko
e82245e10e
satellite/payments: credit card selection ( #3304 )
2019-10-23 20:33:24 +03:00
Nikolai Siedov
655e2b3422
sattelite/console: sattellite name API endpoint added ( #3349 )
2019-10-23 18:36:58 +03:00
Yaroslav Vorobiov
1a304f5ef9
satellite/payments: add payments loop, update pending transactions ( #3318 )
2019-10-23 15:04:54 +03:00
Nikolai Siedov
3eec4e9070
satellite/console: add REST delete API endpoint ( #3337 )
2019-10-22 19:17:09 +03:00
Vitalii Shpital
867771787f
web/satellite: project owner status added on team page ( #3160 )
2019-10-22 14:12:49 +03:00
Nikolai Siedov
6dd478e43c
satellite/console: forgot password, resend email endpoints added, default http route replaced with gorilla mux ( #3327 )
2019-10-21 19:42:49 +03:00
Nikolai Siedov
1814fbfa89
satellite/console: new passwordChange API endpoint ( #3308 )
2019-10-21 15:48:29 +03:00
Nikolai Siedov
f4162bd33f
satellite/console: add REST registration API endpoint ( #3303 )
2019-10-17 19:34:27 +03:00
Yehor Butko
26cc625dc6
satellite/console: payments api ( #3297 )
2019-10-17 17:42:18 +03:00
Nikolai Siedov
c1033fc1ed
satellite/console: move token to separate endpoint ( #3292 )
2019-10-16 18:01:15 +03:00
Bogdan Artemenko
5f775b9e46
satellite/console: Added error for adding api key with existing name attempt. ( #3185 )
2019-10-10 16:28:35 +03:00
Bogdan Artemenko
ed3a424858
satellite/console: Removed 'user not found' message on password reset request ( #3184 )
2019-10-09 13:18:58 +03:00
Egon Elbre
6afa4dd9cf
satellite/accounting: refactor code and remove unused fields ( #3178 )
2019-10-04 22:09:52 +03:00
Nikolay Yurchenko
51003dcad2
web/satellie: added missing alt attribute to img tags ( #3172 )
2019-10-04 16:22:26 +03:00
Yaroslav Vorobiov
f05a2eea5b
satellite/console: remove domain prefix from token cookie key ( #3170 )
2019-10-04 10:23:52 +03:00
Bogdan Artemenko
423d35fb3f
satellite/console: Added support URLs and other fields to config file ( #3090 )
2019-09-27 10:48:53 -06:00
Yaroslav Vorobiov
acbe449435
satellite/console: remove payments ( #3074 )
2019-09-27 12:46:37 +03:00
Bogdan Artemenko
69aa0c6cc4
satellite/console: GraphQL input length limitation. ( #3045 )
2019-09-20 20:40:26 +03:00
Yaroslav Vorobiov
9d1e19cd92
satellite/console/server: fix usage rollup report ( #3047 )
2019-09-13 18:38:29 +03:00
Egon Elbre
7240e6cbb2
satellite: remove remote/inline file from BucketTally ( #3041 )
2019-09-13 16:51:41 +03:00
Egon Elbre
8ef57a2af3
satellite/satellitedb: use noreturn ( #3022 )
2019-09-12 20:31:50 +03:00
Bogdan Artemenko
bb6086aeab
web/satellite: API keys paged backend ( #2839 )
2019-09-12 17:19:30 +03:00
Bogdan Artemenko
2c7813d40d
satellite/console: Added email normalization to users table ( #2586 )
2019-09-10 17:00:33 +03:00
Egon Elbre
a801fab66a
all: add archview annotations ( #2964 )
2019-09-10 16:24:16 +03:00
Yehor Butko
1e22f58043
satellite/server diagnostics and http headers improved ( #2978 )
2019-09-09 21:33:05 +03:00
Bogdan Artemenko
a4dddc65ba
web/satellite: Fixed Project Members deletion. ( #2891 )
2019-09-04 18:02:39 +03:00
Egon Elbre
6ff94caf22
satellite/satellitedb: move tests near the interface ( #2863 )
2019-08-26 13:19:02 +03:00
Egon Elbre
00b2e1a7d7
all: enable staticcheck ( #2849 )
...
* by having megacheck in disable it also disabled staticcheck
* fix closing body
* keep interfacer disabled
* hide bodies
* don't use deprecated func
* fix dead code
* fix potential overrun
* keep stylecheck disabled
* don't pass nil as context
* fix infinite recursion
* remove extraneous return
* fix data race
* use correct func
* ignore unused var
* remove unused consts
2019-08-22 13:40:15 +02:00
Yingrong Zhao
7db6851722
satellite/rewards: update current reward to be finished once redemption cap has reached ( #2745 )
...
* update offer once redemption cap has reached
* use transaction to get offer info before insert
* update offer status when redeemable capacity has reached
* fix format
* use pgutil to check constraint error
* change error message
2019-08-14 15:53:48 -04:00
Yingrong Zhao
786828ea0a
satellite/console: bypass activation token logic for open source partner referral link ( #2736 )
...
* when there's partner id, we will not require an activation token for creating a new account
* create new token if user has a partner id on creation
* validate partner id first
* fix format
* remove unnecessary code
* display error message instead of reroute
* add more test
* add comments
* add comment
2019-08-14 11:27:22 -04:00
Yingrong Zhao
a496e26e44
satellite/rewards: hardcoded partner ids ( #2776 )
...
* hardcoded partner ids
* fix test
2019-08-14 09:55:12 -04:00
Yehor Butko
ce5c45b33c
satellite/console/server: parse html files as templates ( #2750 )
2019-08-13 15:37:01 +03:00
Yingrong Zhao
878a3c802b
satellite/console: store partner id on api key and project creation ( #2743 )
...
* init
* remove commented code
* add test
* remove unnecessary code
* add error log
2019-08-12 17:29:40 -04:00