ben-toogood
a5e9dc21ca
util/wrapper: allow enforcing a specific namespace when verifying requests ( #1832 )
...
* auth/jwt: add debugging
* auth: more debugging
* auth: more debugging
* util/wrapper: don't use request context
* util/wrapper: AuthHandlerNamespace
* remove debugging
2020-07-14 10:27:15 +01:00
ben-toogood
fde1aa9d6a
Move auth account creation to config/cmd ( #1676 )
2020-06-12 10:42:52 +01:00
Ben Toogood
2729569f66
Add Debug.Cache method
2020-05-24 18:45:57 +01:00
Ben Toogood
7d7f4046e8
Client Cache
2020-05-22 16:52:24 +01:00
Ben Toogood
6b451a2197
Refactor auth setup to util/auth
2020-05-14 16:10:14 +01:00
Ben Toogood
c220686c29
Fix token bug
2020-05-14 13:30:21 +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
ca791d7e8d
Disable Clients
2020-05-13 18:47:53 +01:00
Ben Toogood
410fec8ee4
Fix auth bug
2020-05-13 16:49:17 +01:00
Ben Toogood
47c1cb433e
Store account credentials
2020-05-13 13:48:25 +01:00
Ben Toogood
3fac7d79ab
Remove service type role
2020-05-13 13:42:56 +01:00
Ben Toogood
25c937fd0e
Naming changes
2020-05-13 13:38:13 +01:00
Ben Toogood
54951740bf
Authenticate on service start
2020-05-13 13:13:11 +01:00
Ben Toogood
937ecc8d2f
Disable auth service client
2020-05-11 20:38:05 +01:00
Ben Toogood
efb64b7dbb
Pass client to more of the runtime
2020-05-11 17:57:39 +01:00
Ben Toogood
f892b41299
Add runtime to service.Options()
2020-05-11 17:09:28 +01:00
Asim Aslam
38cdb9cc2f
Set table name in store
2020-05-01 18:24:35 +01:00
Asim Aslam
b3915b6020
Add store to options ( #1600 )
2020-05-01 18:05:09 +01:00
Ben Toogood
f48dec1fb0
Use Server ID in account name
2020-04-29 15:27:18 +01:00
Ben Toogood
99f8be5b3d
Auth Client Wrapper
2020-04-29 15:11:06 +01:00
Janos Dobronszki
075d7d4fef
Renaming ShutdownSignals -> Shutdown ( #1553 )
2020-04-21 14:14:20 +02:00
Janos Dobronszki
e5c215556e
Add SIGKILL to shutdown signals ( #1552 )
...
* Add SIGKILL to shutdown signals
* go mod tidy
* Add missing file
2020-04-21 14:00:12 +02:00
Jake Sanders
71538adfdc
Explicitly set the table name during service init ( #1497 )
2020-04-07 13:00:05 +01:00
Jake Sanders
3324d140c0
Rename store Namespace / Prefix options to Database and Table ( #1492 )
...
* Rename Namespace to DB, Rename Prefix to table, Remove Suffix Option
* Rename options
* Rename options
* Add store_table option
* Table per service, not Database per service
2020-04-06 16:45:55 +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
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
Asim Aslam
d8cfa7a295
add config to cmd ( #1337 )
...
* add config to cmd
* fix build
2020-03-12 18:47:40 +00:00
Jake Sanders
1b4e881d74
Rewrite the store interface ( #1335 )
...
* WIP store rewrite
* Fix memory store tests
* Store hard expiry times rather than duration!
* Clarify memory test
* Add limit to store interface
* Implement suffix option
* Don't return nils from noop store
* Fix syncmap
* Start fixing store service
* wip service and cache
* Use _ for special characters in cockroachdb namespace
* Improve cockroach namespace comment
* Use service name as default store namespace
* Fixes
* Implement Store Scope
* Start fixing etcd
* implement read and write with expiry and prefix
* Fix etcd tests
* Fix cockroach store
* Fix cloudflare interface
* Fix certmagic / cloudflare store
* comment lint
* cache isn't implemented yet
* Only prepare DB staements once
Co-authored-by: Ben Toogood <ben@micro.mu>
Co-authored-by: ben-toogood <bentoogood@gmail.com>
2020-03-12 13:41:30 +00:00
7b385bf163
minimize allocations in logger and tunnel code ( #1323 )
...
* logs alloc
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* tunnel allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* try to fix tunnel
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* cache cipher for send
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-11 17:55:39 +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
Di Wu
603d37b135
Set option and cli args to the service profile ( #1259 )
2020-02-25 16:42:42 +00:00
117f56ebf7
prune util/log and user logger ( #1237 )
...
* prune util/log and user logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* plaintext logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* add newline
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 13:45:20 +00: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
Asim Aslam
a9d371e727
fatal on command error
2020-02-02 19:49:59 +00:00
f23638c036
fix import paths for v2 release
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
dc257f5066
update to fix tracer
2020-01-29 22:43:40 +00:00
Asim Aslam
1be8258721
fix initialisation
2020-01-29 22:39:31 +00:00
Micro
a09eea8d4d
Update the Debug Handler to use the servers tracer
2020-01-29 16:05:58 +00:00
Micro
62c067adcd
Refactor debug/trace ready for Jaeger
2020-01-29 15:45:11 +00:00
Asim Aslam
1d00f2f771
add trace handler
2020-01-24 22:02:35 +00:00
Asim Aslam
11b104677a
Shift embedded nats to the default
2020-01-19 00:55:01 +00:00
Asim Aslam
488dc31743
log when starting the service
2019-12-31 12:07:52 +00:00
Asim Aslam
d52a111735
add requests/errors to stats
2019-12-18 18:36:42 +00:00
Asim Aslam
e2b2a30668
add net/http/pprof profiler
2019-12-08 20:31:16 +00:00
Asim Aslam
c445aed6b1
Cleanup and speedup network convergence along with direct messaging for connect and solicit
2019-12-07 19:54:29 +00:00
Asim Aslam
24efbe6a41
Move debug handler to service dir
2019-12-04 12:27:30 +00:00
Asim Aslam
91e9c0cb62
ultra hacks to make debug handler work in proxy
2019-12-02 14:55:35 +00:00
Milos Gajdos
13d2a9ec7a
Register proto handler properly
2019-12-01 13:16:44 +00:00
Asim Aslam
eeed493766
move test data
2019-11-16 18:52:27 +00:00
Asim Aslam
90d7a87914
Move wrapper internally since its not top level relevant
2019-11-16 18:48:24 +00:00
Erik Hollensbe
a1c6cdf193
Now specify HandleSignal as an option to toggle signal handling. ( #948 )
...
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2019-11-16 11:13:34 +00:00
8227206208
use service id in profile file name ( #925 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-11-08 09:11:55 +00:00
Asim Aslam
ce080d76c6
add debug/profile package ( #920 )
...
* add debug/profile package
* set service+version for profile
2019-11-06 19:36:04 +00:00
Asim Aslam
b594547408
Add service Name
2019-10-07 08:32:28 +01:00
Asim Aslam
a5ce3e32da
Support plugin loading on service.Init
2019-09-09 20:17:36 -07:00
Asim Aslam
3adce58eb2
Add monitor/debug packages
2019-08-06 17:53:14 +01:00
Asim Aslam
c350e19552
Move cmd => config/cmd
2019-06-21 13:36:11 +01:00
Asim Aslam
539b8c1a3b
Move RegisterInterval into the server
2019-01-24 13:22:17 +00:00
Asim Aslam
56735b4427
add flags for register ttl and interval
2018-04-06 14:03:39 +01:00
Shulhan
a54dee31de
[lint] service.Init: ignore error by assigning it to blank identifier
2018-03-13 17:51:33 +07:00
Shulhan
1bd541b69e
service.Run: replace signal SIGKILL with SIGQUIT
...
According to "os/signal" documentation [1] and libc manual [2], SIGKILL
may not be caught by a program.
[1] https://godoc.org/os/signal
[2] https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html
2018-03-13 17:45:34 +07:00
Shulhan
e769802939
service.Run: simplify return statement
2018-03-13 17:40:13 +07:00
Asim Aslam
ada9ef48cf
Remove whitespace
2017-11-09 13:51:40 +00:00
weisd
6385bf743c
add log when register err
2017-10-25 14:23:58 +08:00
Uffy
f6165f35c0
import sorting
2017-10-09 20:55:03 +08:00
Uffy
ae3f59a2f5
use sync.Once instead of chan
...
sync.Once is more clear and faster than chan.
2017-10-09 15:47:28 +08:00
Asim Aslam
33b1cea29d
Don't create new options
2017-04-17 14:57:43 +01:00
Asim Aslam
d7dc4e618b
process opts on multiple init calls
2017-03-30 19:44:01 +01:00
Asim Aslam
b43985401a
on service.Init only process options once
2017-03-30 17:15:59 +01:00
Asim Aslam
942985ce51
add service test and shutdown based on context
2017-01-07 14:52:23 +00:00
Asim
8b76e277bc
Make it possible to call service.Init multiple times
2016-05-06 12:21:41 +01:00
Asim
9ae0956cea
Move context to metadata
2016-01-28 17:55:28 +00:00
Asim
013d1de2c4
Prefer RegisterTTL set through Init
2016-01-27 12:23:18 +00:00
Asim
7183601d3b
Strip the classic aslam comments
2016-01-27 00:26:29 +00:00
Asim
5ec9d561a6
meh
2016-01-26 23:32:27 +00:00
Asim
3df078ce4e
So much to configure, this is an ugly hack
2016-01-02 22:52:59 +00:00
Asim
7a02bda06b
Set package to micro
2016-01-02 19:14:56 +00:00
Asim
3b56a62589
Update the way flags are used
2016-01-02 19:12:17 +00:00
Asim
1f1bc27421
Make command internal
2016-01-02 00:38:57 +00:00
Asim
59a667130c
Update help printer
2016-01-01 02:45:15 +00:00
Asim
0d50b2eb32
Update top level init
2016-01-01 01:16:21 +00:00
Asim
651e9f8836
rename wrap
2015-12-23 00:02:42 +00:00
Asim
0072b6e8f2
actually wait on the signal
2015-12-21 01:41:36 +00:00
Asim
2c983ef021
Experimental top level init
2015-12-20 23:50:16 +00:00