Commit graph

356 commits

Author SHA1 Message Date
Matthew Jaffee
6cc5d198ee remove unused stuff and fix a bunch of random staticcheck issues
sorry... once I saw, I couldn't unsee
2022-02-07 15:10:10 -06:00
reesporte
88d2914b15 fb1172: enable refresh tokens
- rip out gobby stuff
- add tokenCache, groupsCache
- refresh the token if needed
- set cookies after authenticate
- remove signature validation, the IDP does that for us
- added way more unit tests
- update older tests to use new API
- add fake idp to authcluster tests
2022-02-07 13:42:11 -06:00
Matthew Jaffee
254bacc40c remove http subpackage and bring implementations into core
remove interfaces as necessary
2022-02-03 21:04:04 -06:00
Ben Johnson
9ebf0e2119 Upgrade go.mod to featurebase/v3 2022-01-21 10:57:05 -07:00
reesporte
87bbca938c add a redirect-base-url config option
this allows the user to configure a url for their IDP to redirect to, rather
than relying on the bind address of the featurebase server itself
2022-01-20 12:09:18 -06:00
reesporte
7644922406 adds logging to all network requests
addresses ticket FB-1109:
when auth is turned on, we log:
- source ip (if available)
- user-agent
- user id
- user name
- query string
- request endpoint

also adds some minor tweaks and comments  to chkAuthZ flow
2022-01-15 12:21:27 -06:00
reesporte
cf2410fea6 addresses multiple authn/z tickets
* fb-998 - authn/z enabled in handlers (kitchen-sink ticket)
    - authorization is enabled through the use of a bearer token (using header "Authorization")
    - authorization may occur through the use of an "Authorization" header or "molecula-chip" cookie
    - ui is updated for changes to handler
* fb-1131 - protect grpc endpoints
    - GRPC endpoints now check authorization if auth is enabled
* fb-1129 - inter-node communication
    - the following endpoints use the secretKey for authentication:
        - /internal/cluster/message: POST
        - /internal/translate/data: GET, POST

* added test to api_test.go (TestAuth_MultiNode) testing various auth/permissions stuff on a multi-node cluster

not included:
    - fb-1130 - filter response of endpoints
    - fb-1109 - improved audit logging

@jaffee [are you not entertained](https://www.youtube.com/watch?v=mutgotxrcqg)

Co-authored-by: souhailanoor <90720110+souhailanoor@users.noreply.github.com>
Co-authored-by: tgruben <tgruben@gmail.com>
Co-authored-by: 54mir <48686912+54mir@users.noreply.github.com>
Co-authored-by: kcrodgers24 <49999391+kcrodgers24@users.noreply.github.com>
2022-01-14 12:31:32 -06:00
Matthew Jaffee
34393dee09 rip out rowcache
not strictly backward compatible... hopefully no one is actually using
the rowcache config option
2022-01-11 13:49:09 -06:00
reesporte
bebc54b4e2 fix file perms to be _actually_ 600
based on staticcheck results:
server/server.go:627:58: file mode '600' evaluates to 01130; did you mean '0600'? (SA9002)
server/server.go:632:65: file mode '600' evaluates to 01130; did you mean '0600'? (SA9002)
2022-01-07 09:30:11 -06:00
kcrodgers24
5dfca76fbb correct TLS enabled check 2022-01-06 09:29:03 -08:00
reesporte
8d6490329b Merge branch 'master' into protect-endpoints 2022-01-04 16:18:18 -06:00
Samir Patel
a7fada30dd revisions 1 2022-01-03 20:43:51 -06:00
Samir Patel
7750900310 more logging 2021-12-29 13:18:42 -05:00
reesporte
be66103c45 requirements when auth is enabled
postgres binding is turned off
TLS must be turned on
2021-12-29 11:20:19 -06:00
Samir Patel
0ef67fd699 move query logger option to auth 2021-12-27 16:42:13 -05:00
Samir Patel
684c408b93 Merge branch '54mir/protect-endpoints' into queryLoggerSetup 2021-12-22 15:12:31 -06:00
rachithrr
5650a24c9b query logger is set up. 2021-12-21 16:52:22 -05:00
Samir Patel
fd7d905be2 fix formatting issues 2021-12-21 15:49:51 -06:00
Samir Patel
3b374a62bf Merge branch 'master' into 54mir/authentication 2021-12-20 16:42:11 -06:00
Samir Patel
6faa889bfb move logout url to conf 2021-12-20 14:30:19 -06:00
Samir Patel
e7f4eb1e36 response codes 2021-12-20 12:28:17 -06:00
souhailanoor
e82088e086
Merge branch 'master' into fb1000 2021-12-19 11:38:08 -06:00
Souhaila Noor
a606bd030a addressed reviewer's feedback 2021-12-17 16:46:07 -06:00
Souhaila Noor
f05f1d0de2 added more authz functionality 2021-12-17 15:51:37 -06:00
Matthew Jaffee
1fd872b126 less write locks in fragment.importRoaring/row 2021-12-17 15:09:25 -06:00
Souhaila Noor
2ca29e6018 addressed reviewer's comments and added more tests 2021-12-17 11:45:35 -06:00
Samir Patel
b37f13e5c5 rename 2021-12-16 20:33:23 -06:00
Samir Patel
10dbbb49c8 rename 2021-12-15 14:54:01 -06:00
Souhaila Noor
48913caafd renamed package to authz, inmplemented reviewer's feedback 2021-12-15 13:36:27 -06:00
Samir Patel
4eee8a4245 change the way auth is instantiated, and send to handler 2021-12-13 23:12:04 -06:00
reesporte
48aef0c8a4 add copyright notice back in
```bash
for file in `cat diffys`; do
   printf '%s\n%s\n' "// Copyright 2021 Molecula Corp. All rights reserved." "$(cat $file)" >$file;
done
```
2021-12-10 11:01:04 -06:00
reesporte
4c53f86e82 removed license from each go file
i used this script, a little clunky but it got the job done

```bash
for file in `find . -type f -print | grep '\.go'`; do
    sed '1,/^\/\/ limitations under the License.$/d' $file > $file.tmp;
    result=`cat $file.tmp`
    if [[ result != "" ]]; then
        gofmt $file.tmp &> /dev/null;
        if [[ $? == 0 ]]; then
            mv $file.tmp $file && gofmt -w $file;
        else
            rm $file.tmp;
        fi
    else
        rm $file.tmp;
    fi
done
```
2021-12-10 09:17:17 -06:00
reesporte
b046ad5e8f fixes some more staticcheck errors 2021-12-03 16:50:02 -06:00
Souhaila Noor
06fd65cb31 resolved reviewer's suggestions and made it pretty & user friendly 2021-12-03 10:56:21 -06:00
Souhaila Noor
78e11e0fda resolved reviewer's comments 2021-12-02 16:15:15 -06:00
Souhaila Noor
b5ba3fb2ea added auth arg validation and set up auth package 2021-12-02 13:09:13 -06:00
Souhaila Noor
dc1c39fd21 updated featurebase.conf 2021-11-29 16:46:55 -06:00
Seebs
dcab1a6708 unbreak featurebase holder subcommand
The "just open the holder" subcommand doesn't work the way it used
to, because now that we rely on etcd to open a holder, trying to open
a holder without things set up just coredumps.

Step 1: Fix that.
Step 2: Also add a test that covers it so we don't get bitrotted again.
Step 3: Remove an unrelated stale comment that doesn't deserve its
own commit log, having to do with an option that no longer exists
which is no longer being set right under the comment saying we set it.
2021-11-16 14:23:35 -06:00
Seebs
d4b06d077e Import/ImportValue API rework and improvements
Underlying goal: Don't use the http client to send messages back to the
local host. Also, when sending data to other nodes, don't collate it
from an ImportRequest into a completely different format, then immediately
collate that back into an ImportRequest. This does require changing
the logic over in ctl/import to make it create an ImportRequest.

Also, add additional testing to make sure we're actually trying anything
at all with several combinations (such as submitting import requests
which don't match the configuration of index or field), and improve
test coverage for that.

This introduces the ability to tell an http/client InternalClient about
a specific API that it should use for local queries where applicable.
That's not implemented outside of the import stuff, but should probably
be applied eventually to other things that are trying to talk to many
nodes one of which may be the local node. That behavior is contingent
on passing in a Qcx, because it is implicitly tied to an existing
execution context, and it can't assume that it can create a new one,
because that could deadlock.
2021-11-05 13:06:38 -05:00
Samir Patel
b787fccf3a Add cmd option to disable cardinality calc 2021-10-28 10:25:26 -05:00
Todd Gruben
5176b7ff03 added sqlversion config option 2021-09-25 13:53:19 -05:00
Alan Bernstein
9565620f4d Disable /ui/usage endpoint completely when usage-duty-cycle is set to 0 2021-08-04 16:22:55 -05:00
Ben Johnson
60d534c505 Limit translation memory & add max query memory config 2021-08-02 15:28:00 -06:00
Mahesh Arumugam
f51fd2351c Merge branch 'master' into ma/cloud-109 2021-07-19 12:40:35 -07:00
Mahesh Arumugam
858f889745 FeatureBase Renaming: changing go.mod module name for featurebase 2021-07-19 09:20:30 -07:00
Alan Bernstein
b7898b0a22 Allow usage-duty-cycle < 20%, and 0 disables 2021-07-15 14:22:17 -05:00
Mahesh Arumugam
2cec88e19d Merge branch 'master' into ma/cloud-110 2021-07-13 09:10:36 -07:00
Travis
4b494c3ec3
Update metric names to use "featurebase" prefix
If the `--future.rename` flag is set (to true), this commit will cause
metric names to be prefixed with "featurebase" instead of "pilosa".
2021-07-12 17:51:59 -05:00
Mahesh Arumugam
48fcb3a198 FeatureBase renaming: version info in server log 2021-07-12 12:25:43 -07:00
Samir Patel
8bf472bb75 add duty cycle config flag 2021-06-14 10:48:52 -05:00