Commit Graph

65 Commits

Author SHA1 Message Date
ben-toogood
174e44b846
Deprecate client/selector (#1767)
* client/{grpc,rpc}: depricate selector (wip)

* {client,cmd}: remove client/selector

* deprecate client/selector

* router/static: fix lookup

* config/cmd: add support for legacy static selector flag

* config/cmd: add support for legacy dns selector flag
2020-07-01 17:06:59 +01:00
ben-toogood
0f5c53b6e4
selector: use custom domain (#1760)
* util/wrapper: improve auth errors

* client: add network call option

* client/selector: add domain select option

* client/grpc: pass network option to selector
2020-06-30 10:07:52 +01:00
ben-toogood
687a5e2e58
util/wrapper: fix 401 error when requesting the default namespace (#1741) 2020-06-25 10:19:03 +01:00
ben-toogood
00cd07a3a6
util/wrapper: set auth credentials on streams (#1735) 2020-06-24 16:45:34 +01:00
ben-toogood
ece02a6d21
util/wrapper: fix noop auth nil account bug (#1721)
* util/wrapper: fix noop nil account

* util/wrapper: improve comments

* util/wrapper: update tests
2020-06-19 12:16:39 +01:00
ben-toogood
9d3365c4be
auth: rename auth.Namespace to auth.Issuer (#1710) 2020-06-17 12:26:27 +01:00
ben-toogood
8dfd93e915 util/wrapper: Add Static Client wrapper (#1685)
* util/wrapper: Add Static Client wrapper

* util/wrapper/static: pass address to stream too

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add static client wrapper tests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: fix error message spaces between words

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/{rpc,grpc}: replace log.Error with log.Errorf

* server/grpc: fix log typo

* server/rpc: fix log typo

Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-06-12 10:42:52 +01:00
mlboy
15d5142d9b
fix: misspell (#1667) 2020-05-29 17:49:22 +01:00
Ben Toogood
e2d662608c Fix tests 2020-05-27 09:14:16 +01:00
Ben Toogood
c3b404bab0 Fix server calling across namespace 2020-05-26 17:35:06 +01:00
Ben Toogood
5712cc9c62 Merge master 2020-05-26 15:52:21 +01:00
Ben Toogood
95703e4565 Fixes and improved test coverage 2020-05-24 20:26:37 +01:00
Ben Toogood
2729569f66 Add Debug.Cache method 2020-05-24 18:45:57 +01:00
Ben Toogood
67146ecdc2 Client Cache tests 2020-05-24 18:05:23 +01:00
Ben Toogood
496293afa1 Use hash/fnv, add tests, fix request bug 2020-05-23 11:34:44 +01:00
Ben Toogood
7d7f4046e8 Client Cache 2020-05-22 16:52:24 +01:00
Ben Toogood
fbb91c6cb7 Auth wrapper tests 2020-05-22 10:44:18 +01:00
Ben Toogood
1fce0f02b6 Verify Namespace 2020-05-21 18:11:35 +01:00
Ben Toogood
12061bd006 Add account issuers 2020-05-21 16:41:55 +01:00
Ben Toogood
287992cef3 Fix service => service namespace bug 2020-05-21 11:35:07 +01:00
Ben Toogood
5d14970a55 Fix nil account bug 2020-05-20 16:11:34 +01:00
Ben Toogood
dc10f88c12 Replace auth account.Namespace with account.Scopes 2020-05-19 18:17:17 +01:00
Ben Toogood
1b18730d54 Custom micro client 2020-05-14 11:25:19 +01:00
Ben Toogood
5764519f5b Refactor auth to load token outside wrappers 2020-05-14 11:06:22 +01:00
Ben Toogood
1ca1fd411a Auth: Fix recursive bug 2020-05-13 18:17:04 +01:00
Pieter Voorwinden
b14d63b4a1 Check if auth is nil to prevent nilpointer 2020-05-13 16:13:23 +02:00
Ben Toogood
47c1cb433e Store account credentials 2020-05-13 13:48:25 +01:00
Ben Toogood
54951740bf Authenticate on service start 2020-05-13 13:13:11 +01:00
Ben Toogood
346e034d0a Add mutli-tenancy support to the registry 2020-05-13 10:40:08 +01:00
Ben Toogood
bcddb98867 Fix Tests 2020-04-29 15:37:02 +01:00
Ben Toogood
f48dec1fb0 Use Server ID in account name 2020-04-29 15:27:18 +01:00
Ben Toogood
ef9f65c78b Improve Comments 2020-04-29 15:15:38 +01:00
Ben Toogood
99f8be5b3d Auth Client Wrapper 2020-04-29 15:11:06 +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
9f4286fc4e
Merge branch 'master' into namespace 2020-04-08 13:44:46 +01:00
1fbc056dd4
minimize allocations (#1472)
* server: minimize allocations on re-register

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: stop old instance before Init()

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* client/grpc: fix allocations in protobuf marshal

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* codec/json: fix allocations in protobuf marshal

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* remove stop from init

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* codec/grpc: expose MaxMessageSize

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* codec: use buffer pool

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* metadata: minimize reallocations

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* util/wrapper: use metadata helper

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* registry/cache: move logs to debug level

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: move logs to debug level

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: cache service only when Advertise is ip addr

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: use metadata.Copy

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-08 10:50:19 +01:00
Ben Toogood
4362a885eb Refactor Namespace Resolver 2020-04-07 16:24:51 +01:00
ben-toogood
9b546a7242
Change auth namespace log level (#1490)
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-04-06 13:51:28 +01:00
Ben Toogood
600b20fb81 Change namespace error log level 2020-04-06 12:50:04 +01:00
Ben Toogood
1374a9e528 Fix namespace bug in auth wrapper 2020-04-03 13:03:27 +01:00
Ben Toogood
dea2d7ab9f Fix go-micro auth wrapper init 2020-04-03 12:27:01 +01:00
Ben Toogood
ce23ab36cb Improve Err Handling 2020-04-02 18:41:06 +01:00
Ben Toogood
d659e435c6 Service => Service Auth 2020-03-31 12:44:34 +01:00
Asim Aslam
6efc5556e5
use requested service (#1413) 2020-03-25 20:59:37 +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
35e2a68a98
Fix auth bug restricting access to unauthorised endpoints (#1405)
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-25 10:31:33 +00:00
ben-toogood
0e56382107
Fix service level auth, add improved error descriptions to aid with debugging (#1403)
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-25 09:35:29 +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