4ec4c277b7
lint: fix all major issues
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-14 16:16:01 +03:00
f6c0728a59
fix context usage across codebase
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-12-17 22:52:00 +03:00
b7b28f6b9a
lint
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-12-08 00:38:37 +03:00
daffa9e548
use metadata.Metadata ( #8 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-18 16:50:41 +03:00
14c97d59c1
many improvements with options and noop stuff
...
* add many options helpers
* fix noop client to allow publish messages to topic in broker
* fix noop server to allow registering in registry
* fix noop server to allow subscribe to topic in broker
* fix new service initialization
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-10-16 09:38:57 +03:00
caec730248
move out tracers
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-10 00:06:29 +03:00
2c136b005e
resurrect default for auth
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-28 11:55:18 +03:00
Ben Toogood
5712cc9c62
Merge master
2020-05-26 15:52:21 +01:00
Ben Toogood
9c072a372c
Add auth scope constants
2020-05-22 11:37:12 +01:00
Ben Toogood
12061bd006
Add account issuers
2020-05-21 16:41:55 +01:00
Ben Toogood
856c73b341
Remove roles (replaced with scope)
2020-05-21 14:56:17 +01:00
Ben Toogood
344ce061ce
Verify Options
2020-05-20 16:49:52 +01:00
Ben Toogood
5d14970a55
Fix nil account bug
2020-05-20 16:11:34 +01:00
Ben Toogood
f6d9416a9e
Add Rule to Auth interface
2020-05-20 11:59:01 +01:00
Ben Toogood
dc10f88c12
Replace auth account.Namespace with account.Scopes
2020-05-19 18:17:17 +01:00
Ben Toogood
5a8f19589b
Auth account.HasRole
2020-05-11 11:34:22 +01:00
Asim Aslam
8ccbf53dfc
secret cookie unused
2020-04-28 18:12:07 +01:00
Asim Aslam
f908110fb6
swap out context access for account ( #1589 )
2020-04-28 17:35:18 +01:00
Ben Toogood
e17825474f
Add context options to the runtime
2020-04-14 12:32:59 +01:00
Ben Toogood
d61d30ef66
Inject Namespace into Context
2020-04-14 09:14:07 +01:00
Ben Toogood
3df87510a1
Add namespace
2020-04-07 12:46:44 +01:00
Ben Toogood
4999f6dfd4
Namespace requests coming via api & web
2020-04-02 17:01:06 +01:00
Ben Toogood
df8c0bb5e1
Auth Generate, make secret optional
2020-04-01 17:20:02 +01:00
Ben Toogood
8e4d9e1702
Further Refactoring
2020-04-01 14:25:00 +01:00
Ben Toogood
82bc3cbf8d
Update interface to add provider and make secret optional
2020-03-31 19:01:43 +01:00
Ben Toogood
cffb0a1eae
Remove ContextWithToken
2020-03-31 18:34:31 +01:00
Ben Toogood
134bc1c68a
Implement new interface
2020-03-31 18:17:01 +01:00
Ben Toogood
8dbb5153f4
Tweak Auth Interface
2020-03-31 17:01:51 +01:00
ben-toogood
76ade7efd9
Auth - Swap Refresh to Token and change secrets to be strings, not tokens ( #1444 )
...
* Refresh => Token
* Secret is no longer a token
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-31 10:06:13 +01:00
ben-toogood
4db2f5e79d
Add Namespace to Auth ( #1438 )
...
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-30 09:51:37 +01:00
ben-toogood
378d03eb66
Tidying up auth ( #1410 )
...
* Don't clear auth rules if request fails
* Add jitter to auth service loading rules
* Remove unused error from ContextWithToken result
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-25 18:34:13 +00:00
ben-toogood
1057ef6acb
Add ContextWithToken ( #1407 )
...
* Add ContextWithToken
* Tidying up BearerScheme
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-25 11:20:53 +00:00
ben-toogood
e0e77f3983
Updated auth interface ( #1384 )
...
* Updated auth interface
* Add Rule
* Remove Rule
* Return token from Renew
* Renew => Refresh
* Implement Tokens & Default Auth Implementation
* Change default auth to noop
* Change default auth to noop
* Move token.Token to auth.Token
* Remove Token from Account
* Auth service implementation
* Decode JWT locally
* Cookie for secret
* Move string to bottom of interface definition
* Depricate auth_exclude
* Update auth wrappers
* Update go.sum
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-23 16:19:30 +00:00
ben-toogood
9a7a65f05e
Auth Provider ( #1309 )
...
* auth provider mock interface
* Auth Provider Options
* Implement API Server Auth Package
* Add weh utils
* Add Login URL
* Auth Provider Options
* Add auth provider scope and setting token in cookie
* Remove auth_login_url flag
Co-authored-by: Asim Aslam <asim@aslam.me>
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-07 11:06:57 +00:00
ben-toogood
6a9001bdb1
Set auth account in context ( #1293 )
2020-03-04 09:54:52 +00:00
Asim Aslam
6aaaf54275
add MICRO_AUTH_TOKEN, parse token in wrapper, preload config and othe… ( #1261 )
...
* add MICRO_AUTH_TOKEN, parse token in wrapper, preload config and other things
* fix wrapper panic
2020-02-25 22:15:44 +00:00
Asim Aslam
9696efde02
reorder auth interface ( #1204 )
2020-02-16 19:36:45 +00:00
Eric
cbe8b7dd09
Removed redundant spaces ( #1196 )
2020-02-14 10:32:02 +03:00
ben-toogood
4401c12e6c
Auth Wrapper ( #1174 )
...
* Auth Wrapper
* Tweak cmd flag
* auth_excludes => auth_exclude
* Make Auth.Excludes variadic
* Use metadata.Get (passes through http and http2 it will go through various case formats)
* fix auth wrapper auth.Auth interface initialisation
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-02-10 08:26:28 +00:00
ben-toogood
d621548120
Auth ( #1147 )
...
Implement the Auth interface, with JWT and service implementations.
* Update Auth Interface
* Define Auth Service Implementation
* Support Service Auth
* Add Auth Service Proto
* Remove erronious files
* Implement Auth Service Package
* Update Auth Interface
* Update Auth Interface. Add Validate, remove Add/Remove roles
* Make Revoke interface more explicit
* Refactor serializing and deserializing service accounts
* Fix srv name & update interface to be more explicit
* Require jwt public key for auth
* Rename Variables (Resource.ID => Resource.Name & ServiceAccount => Account)
* Implement JWT Auth Package
* Remove parent, add ID
* Update auth imports to v2. Add String() to auth interface
2020-02-03 08:16:02 +00:00
Asim Aslam
7c21a1b92a
go fmt
2019-12-18 15:06:02 +00:00
Asim Aslam
ebae497a72
use service rather than resource
2019-12-17 21:37:20 +00:00
Asim Aslam
515014fbeb
update with resource
2019-12-17 21:27:05 +00:00
Asim Aslam
7013e7467f
Undefined time
2019-11-25 09:33:30 +00:00
Asim Aslam
dbc537007d
First interface for auth
2019-11-25 09:30:26 +00:00