Commit graph

30 commits

Author SHA1 Message Date
Samir Patel
ef6decf63a update handler tests 2022-04-11 10:42:14 -05:00
Samir Patel
bddccf6ead add http status check to authenticate 2022-04-11 10:42:14 -05:00
Samir Patel
eea6a40fe0 Iterate through group membership http response
Follows the nextLink in http response to iterate through
paginated group membership response in order to obtain all
groups that the user is a member of.

Also, checks cache to make sure we don't add empty groups
to the cache.
2022-04-11 10:42:14 -05: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
reesporte
836df379ac add test coverage
for the following auth related packages:
* authn
* http
* server

fix minor bugs, do some cleaning up, etc in `authn/authenticate.go` and `http/handler.go`
2022-01-21 13:57:47 -06:00
Ben Johnson
9ebf0e2119 Upgrade go.mod to featurebase/v3 2022-01-21 10:57:05 -07: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
reesporte
fd896de270 rename CookieValue to AuthContext
because we're not using cookies anymore
2022-01-05 12:10:33 -06:00
reesporte
e335886741 adding Groups Struct back in
"It was pure hubris that brought us to this point."
2022-01-04 16:23:25 -06:00
reesporte
8d6490329b Merge branch 'master' into protect-endpoints 2022-01-04 16:18:18 -06:00
Samir Patel
23a1b4c536 revisions and docs 2022-01-04 16:02:25 -06:00
Samir Patel
414dff1d22 revisions 2022-01-03 22:56:21 -06:00
Samir Patel
a7fada30dd revisions 1 2022-01-03 20:43:51 -06:00
reesporte
9b77432952 fix bad formatting 2021-12-29 14:22:29 -06:00
reesporte
2847c22a4c linter things 2021-12-29 11:06:58 -06:00
Samir Patel
8b40c6bf7b rm comments 2021-12-22 13:47:16 -06:00
Samir Patel
b8b4425d4f clean up 2021-12-22 12:05:24 -06:00
Samir Patel
52d941d127 more tests 2021-12-22 11:31:37 -06:00
Samir Patel
10a7aa55ea same-site strict 2021-12-20 18:00:13 -06:00
Samir Patel
6faa889bfb move logout url to conf 2021-12-20 14:30:19 -06:00
Samir Patel
405692e376 Update authn/authenticate_test.go
Co-authored-by: souhailanoor <90720110+souhailanoor@users.noreply.github.com>
2021-12-20 13:16:34 -06:00
Samir Patel
e7f4eb1e36 response codes 2021-12-20 12:28:17 -06:00
Samir Patel
0d52a952e0 resolve some comments 2021-12-19 23:33:44 -06:00
Samir Patel
7ce07d4e4a settings 2021-12-17 11:42:02 -06:00
Samir Patel
3b58e887ed add group lenth check 2021-12-17 11:34:48 -06:00
Samir Patel
c2d51a2257 remove settings 2021-12-17 10:00:21 -06:00
Samir Patel
1555746ff1 test 2021-12-16 23:53:30 -06:00
Samir Patel
db2263465b tests 2021-12-16 23:39:58 -06:00
Samir Patel
eb693beb0b add authN login test 2021-12-16 20:35:34 -06:00
Samir Patel
b082a318f3 move authN to its own package 2021-12-16 20:34:09 -06:00