Skip to content

Commit f73cf0e

Browse files
committed
feat: add docker compose to test soteria with emqx
1 parent 3613afa commit f73cf0e

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

docker-compose.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
services:
2+
soteria:
3+
build:
4+
dockerfile: ./build/package/Dockerfile
5+
context: .
6+
command: serve
7+
emqx:
8+
image: emqx/emqx
9+
environment:
10+
EMQX_DASHBOARD__DEFAULT_PASSWORD: public
11+
EMQX_DASHBOARD__DEFAULT_USERNAME: admin
12+
EMQX_AUTHENTICATION__1__MECHANISM: "password_based"
13+
EMQX_AUTHENTICATION__1__BACKEND: "http"
14+
EMQX_AUTHENTICATION__1__ENABLE: "true"
15+
EMQX_AUTHENTICATION__1__METHOD: "post"
16+
EMQX_AUTHENTICATION__1__URL: "http://soteria:9999/v2/auth"
17+
EMQX_AUTHENTICATION__1__BODY: '{"username" = "$${username}", "password" = "$${password}", "token" = "$${username}"}'
18+
EMQX_AUTHORIZATION__NO_MATCH: deny
19+
EMQX_AUTHORIZATION__DENY_ACTION: disconnect
20+
EMQX_AUTHORIZATION__SOURCES__1__TYPE: http
21+
EMQX_AUTHORIZATION__SOURCES__1__METHOD: post
22+
EMQX_AUTHORIZATION__SOURCES__1__URL: "http://soteria:9999/v2/acl"
23+
EMQX_AUTHORIZATION__SOURCES__1__BODY: '{"username" = "$${username}", "password" = "$${password}", "token" = "$${username}"}'
24+
EMQX_LISTENERS__TCP__DEFAULT__ENABLE_AUTHN: "quick_deny_anonymous"
25+
EMQX_LISTENERS__TCP__INTERNAL__ENABLE: "true"
26+
EMQX_LISTENERS__TCP__INTERNAL__BIND: 11883
27+
EMQX_LISTENERS__TCP__INTERNAL__ENABLE_AUTHN: "false"
28+
ports:
29+
- 1883:1883
30+
- 18083:18083

internal/config/default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func Default() Config {
2424
SnappVendor(),
2525
},
2626
Logger: logger.Config{
27-
Level: "warn",
27+
Level: "debug",
2828
},
2929
HTTPPort: DefaultHTTPPort,
3030
Tracer: tracing.Config{

0 commit comments

Comments
 (0)