全新克隆不含生成的密钥,需先准备 Atom 服务令牌,make run_latest 只自动生成证书和密钥;规则引擎、告警、审计日志属于企业版功能;服务环境变量需使用未限定范围的 Atom 访问令牌,不能用 scoped token
git clone https://github.com/absmach/magistrala.git
cd magistrala
make run_latestREADME 未说明硬件要求;部署方式为 Docker、Kubernetes 容器化,可运行在云、边缘或混合环境
开源 IoT 平台框架,统一管理设备接入、身份权限与消息流,避免拼凑多个组件
用 Go 编写的物联网平台框架,提供设备接入、边缘网关与云端管理能力,支持 CoAP、LoRa 等协议,适合搭建分布式 IoT 系统。
核心能力
- 基于 FluxMQ 消息代理构建事件驱动中间件
- 原生支持 MQTT、HTTP、WebSocket、CoAP 接入
- 提供多租户工作区与 ABAC+RBAC 细粒度权限
- 用通道(Channel)分组并控制设备消息流向
- 集成 Prometheus 与 OpenTelemetry 做指标和链路追踪
容易踩的坑
- v1.0.0Release v1.0.0 LTS最新正式版2026-09-04 · 2026-09-04 17:53 UTC
What's Changed
- Bump the go-dependency group across 1 directory with 6 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3569
- Edge: Atom-direct architecture, device/gateway model, and per-publisher authorization by @ianmuchyri in https://github.com/absmach/magistrala/pull/3579
- Edge phase 2: message attribution and beyond by @ianmuchyri in https://github.com/absmach/magistrala/pull/3581
- Bump the go-dependency group with 4 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3587
- Reject gateway chaining: a device may not be both is_gateway and declare gateways of its own by @ianmuchyri in https://github.com/absmach/magistrala/pull/3591
- NOISSUE - Restore CLI with Atom GraphQL commands by @fbugarski in https://github.com/absmach/magistrala/pull/3578
- Rename clients to devices by @ianmuchyri in https://github.com/absmach/magistrala/pull/3592
- Seed default device types on domain creation by @ianmuchyri in https://github.com/absmach/magistrala/pull/3593
- NOISSUE - Rename domains to workspaces by @ianmuchyri in https://github.com/absmach/magistrala/pull/3594
- NOISSUE - Update readme to start with quick start by @ianmuchyri in https://github.com/absmach/magistrala/pull/3596
- Bump github.com/go-chi/chi/v5 from 5.3.1 to 5.3.2 in the go-dependency group across 1 directory by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3597
- Remove groups, workspaces, users, clients and channels from Go SDK by @ianmuchyri in https://github.com/absmach/magistrala/pull/3598
- NOISSUE - Add Bootstrap service by @arvindh123 in https://github.com/absmach/magistrala/pull/3555
- NOISSUE - Replace stale OpenAPI specs with GraphQL reference by @fbugarski in https://github.com/absmach/magistrala/pull/3577
- NOISSUE - Finish clients->devices and domains->workspaces rename by @ianmuchyri in https://github.com/absmach/magistrala/pull/3600
- NOISSUE - Provision a real workspace for the bootstrap API CI test by @ianmuchyri in https://github.com/absmach/magistrala/pull/3601
- feat: bootstrap Atom actions via YAML config, remove imperative bootstrap-actions by @arvindh123 in https://github.com/absmach/magistrala/pull/3561
- Add Atom self password change client by @ianmuchyri in https://github.com/absmach/magistrala/pull/3603
- Configure solution installer service URLs by @ianmuchyri in https://github.com/absmach/magistrala/pull/3604
- NOISSUE - Add JSON format timescale-writer addon by @felixgateru in https://github.com/absmach/magistrala/pull/3605
- NOISSUE - Align health commands and docs by @fbugarski in https://github.com/absmach/magistrala/pull/3602
- Bump the go-dependency group with 9 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3606
- Fix password reset and email verification redirect wiring by @ianmuchyri in https://github.com/absmach/magistrala/pull/3607
- Fix compose UI image to match the published ui-community name by @ianmuchyri in https://github.com/absmach/magistrala/pull/3608
- Fix bootstrap List/ListProfiles to check "read" instead of "list" by @ianmuchyri in https://github.com/absmach/magistrala/pull/3609
- Wrap unsupported bootstrap binding type as a typed error by @ianmuchyri in https://github.com/absmach/magistrala/pull/3610
- Bump golang from 1.27.0-alpine3.24 to 1.27.1-alpine3.24 in /docker in the docker-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3612
- Fix readers 500 on out-of-range from/to time bounds by @ianmuchyri in https://github.com/absmach/magistrala/pull/3613
- Fix CI FluxMQ alarms secret generation by @ianmuchyri in https://github.com/absmach/magistrala/pull/3614
Full Changelog: https://github.com/absmach/magistrala/compare/v0.51.0...v1.0.0
- v0.51.02026-08-05 · 2026-08-05 16:00 UTC
查看更新说明
What's Changed
- NOISSUE - Use internal principals for services communication by @dborovcanin in https://github.com/absmach/magistrala/pull/3564
- Bump the go-dependency group across 1 directory with 2 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3560
- NOISSUE - Mark Rules Engine, Alarms, and Audit Logs as Enterprise Edition in README by @fbugarski in https://github.com/absmach/magistrala/pull/3562
- NOISSUE - Preserve message origin by @dborovcanin in https://github.com/absmach/magistrala/pull/3565
Full Changelog: https://github.com/absmach/magistrala/compare/v0.50.0...v0.51.0
- v0.50.02026-08-01 · 2026-08-01 13:12 UTC
查看更新说明
What's Changed
- NOISSUE - Add messaging hooks endpoints by @arvindh123 in https://github.com/absmach/magistrala/pull/3541
- NOISSUE - Fix Alarms roles by @arvindh123 in https://github.com/absmach/magistrala/pull/3544
- Bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 in /.github/workflows in the gh-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3542
- Bump the go-dependency group across 1 directory with 4 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3545
- NOISSUE - Fix Alarms roles by @arvindh123 in https://github.com/absmach/magistrala/pull/3546
- NOISSUE - Limit pdf-generator memory by @dborovcanin in https://github.com/absmach/magistrala/pull/3547
- NOISSUE - Remove unwanted alarms operations by @arvindh123 in https://github.com/absmach/magistrala/pull/3548
- NOISSUE - Add multi-publisher filter to readers PageMetadata by @fbugarski in https://github.com/absmach/magistrala/pull/3550
- Bump the go-dependency group across 1 directory with 5 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3551
- Bump actions/setup-go from 6 to 7 in /.github/workflows in the gh-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3553
- NOISSUE - Reject empty username/password in gRPC early by @rodneyosodo in https://github.com/absmach/magistrala/pull/3554
- Bump the go-dependency group with 3 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3558
- Move rules engine, alarms, reports, journal and notifications to EE by @dborovcanin in https://github.com/absmach/magistrala/pull/3552
- MG-3486 - RE Loop Prevention by @dborovcanin in https://github.com/absmach/magistrala/pull/3559
Full Changelog: https://github.com/absmach/magistrala/compare/v0.40.0...v0.50.0
- v0.40.02026-07-01 · 2026-07-01 19:54 UTC
查看更新说明
What's Changed
- Bump github.com/slack-go/slack from 0.25.0 to 0.26.0 in the go-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3529
- Bump actions/checkout from 6 to 7 in /.github/workflows in the gh-dependency group across 1 directory by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3530
- Bump the go-dependency group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3531
- Bump the go-dependency group across 1 directory with 4 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3534
- Bump github.com/opencontainers/runc from 1.2.8 to 1.3.6 by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3535
- MG-3537 - Migrate Magistrala to ATOM for identity & authorization by @arvindh123 in https://github.com/absmach/magistrala/pull/3532
- Bump the go-dependency group with 3 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3538
- NOISSUE - Fix client keys by @arvindh123 in https://github.com/absmach/magistrala/pull/3539
- NOISSUE - Use Atom access tokens by @dborovcanin in https://github.com/absmach/magistrala/pull/3540
Full Changelog: https://github.com/absmach/magistrala/compare/v0.30.0...v0.40.0
- v0.30.02026-06-12 · 2026-06-12 11:44 UTC
查看更新说明
What's Changed
- Bump github.com/jackc/pgx/v5 from 5.9.1 to 5.9.2 in the go-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3479
- Bump the go-dependency group with 3 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3506
- NOISSUE - Update ui env variables and remove unused and repeated variables by @ianmuchyri in https://github.com/absmach/magistrala/pull/3507
- NOISSUE - Add migration scripts for Rules, Alarms and Reports by @arvindh123 in https://github.com/absmach/magistrala/pull/3482
- Bump the go-dependency group with 7 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3508
- NOISSUE - Update bootstrap and provision service by @nyagamunene in https://github.com/absmach/magistrala/pull/3476
- Bump golang from 1.26.2-alpine3.22 to 1.26.3-alpine3.22 in /docker in the docker-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3511
- MG-3512 - Add
rendered contextfield to update endpoint by @nyagamunene in https://github.com/absmach/magistrala/pull/3513 - Bump the go-dependency group across 1 directory with 7 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3516
- NOISSUE - Update bootstrap content format, update profile method and add profile search by @nyagamunene in https://github.com/absmach/magistrala/pull/3515
- NOISSUE - Add a fast Certbot startup by @dborovcanin in https://github.com/absmach/magistrala/pull/3517
- Bump the go-dependency group with 5 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3521
- MG-3509 - Add FluxMQ m stream queue to fix messages not appearing in web UI by @nyagamunene in https://github.com/absmach/magistrala/pull/3518
- Bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 in /.github/workflows in the gh-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3520
- NOISSUE - Fix queue subscriptions by @dborovcanin in https://github.com/absmach/magistrala/pull/3522
- NOISSUE - Sign server certificate with SANs for container hostnames by @rodneyosodo in https://github.com/absmach/magistrala/pull/3524
- Bump the go-dependency group across 1 directory with 12 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3526
- Bump codecov/codecov-action from 6 to 7 in /.github/workflows in the gh-dependency group across 1 directory by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3525
- Bump golang from 1.26.3-alpine3.22 to 1.26.4-alpine3.22 in /docker in the docker-dependency group by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3527
- Bump the go-dependency group with 4 updates by @dependabot[bot] in https://github.com/absmach/magistrala/pull/3528
Full Changelog: https://github.com/absmach/magistrala/compare/v0.20.0...v0.30.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Magistrala
A Modern IoT Platform Framework for Scalable IoT
Made with ❤ by Abstract Machines
💡 Get Started • 🌐 Website • 📚 Documentation • 🤝 Contributing • 💬 Chat
🚀 Quick Start
Get Magistrala running locally in a few commands:
git clone https://github.com/absmach/magistrala.git
cd magistrala
make run_latest
This brings up the full stack — messaging, identity, and all core services — via Docker Compose. See Installation for what each step does, how certificates and secrets are generated, and how to point the stack at a different deployment.
💡 Getting Started
Once the stack is up, head to the documentation to learn how to:
- Create a workspace and invite users
- Provision devices and connect them over MQTT, HTTP, CoAP, or WebSocket
- Create channels and start publishing and subscribing to messages
- Define access policies and roles for fine-grained control
- Build automations with the rules engine and alarms (Enterprise Edition)
🌍 Introduction
Magistrala is an open-source IoT platform built for engineers who need full control over their messaging, device management, and data pipelines.
It is built on top of FluxMQ, a modern message broker designed for both messaging and event streams. Magistrala provides everything around it: identity, access control, device provisioning, data processing, and observability.
IoT systems usually involve brokers, databases, rule engines, and custom services. Magistrala does not pretend those pieces disappear. It provides a coherent framework for integrating them into a single system with a consistent model for identity, access control, messaging, and observability.
What it is:
- An event-driven IoT middleware platform
- A unified control plane for devices, users, and data
- A foundation for building scalable IoT systems
What it is not:
- Not just an MQTT broker
- Not a black-box SaaS
- Not tied to a single cloud or vendor
🚀 Key Benefits
-
A Coherent System, Not a Mess of Integrations Build IoT systems from multiple components without ending up with fragmented security, messaging, and operations.
-
Event-Driven at the Core Everything is built around events — enabling real-time processing, streaming, and scalable data flows.
-
Protocol-Native, Not Forced Abstractions MQTT, HTTP, WebSocket, and CoAP are treated as first-class citizens, each with their own semantics.
-
Security Built Into the Model Identity, authentication, and authorization are part of the system design — not bolted on later.
-
Flexible by Design Start simple or build complex systems — without changing platforms or rewriting your architecture.
-
Runs Where You Need It Cloud, edge, or hybrid — no vendor lock-in, no hidden dependencies.
✨ Features
Magistrala provides a complete set of building blocks for IoT systems — from device connectivity to data processing and observability — without forcing a rigid architecture.
🔐 Identity & Access
- Multi-tenant workspaces for isolating environments
- Users, roles, and organizational hierarchies
- Fine-grained access control (ABAC + RBAC)
- Mutual TLS (X.509) and JWT-based authentication
- Personal Access Tokens (PATs) with scoping and revocation
🔌 Connectivity
- Native support for MQTT, HTTP, WebSocket, and CoAP
- Consistent authentication and authorization across protocols
- Designed for both cloud services and constrained devices
📦 Device & Application Model
- Device provisioning and lifecycle management
- Channels for grouping and controlling message flow
- Application-level grouping and sharing of devices
- Simple but flexible communication model
⚙️ Processing & Automation
- Rules engine for message processing and routing (Enterprise Edition)
- Alarms and triggers for reacting to events (Enterprise Edition)
- Scheduled actions for time-based workflows
- Event-driven architecture as the foundation
📊 Observability
- Audit logs for tracking system activity (Enterprise Edition)
- Metrics and tracing via Prometheus and OpenTelemetry
- Built-in visibility into system behavior and data flows
🚀 Deployment & Operations
- Container-native (Docker, Kubernetes)
- Designed for cloud, edge, and hybrid deployments
- Works with external storage and processing systems
- Scales from small setups to production environments
🧑💻 Developer Experience
- CLI and SDKs for fast integration
- Straightforward APIs and concepts
- Documentation focused on getting you running quickly
Installation
A fresh clone carries no generated secrets. Two sets have to exist before the
stack can start — certificates and keys the internal services authenticate
with, and the Atom service tokens each service presents to Atom. make run_latest produces the first set itself but expects the second to be there
already, which is why the token step comes first in Quick Start.
Certificates, broker secret and trace key
Generated by make run_latest, or on demand:
make check_certs
This creates whatever is missing and leaves anything already present alone:
| Path | What it is |
|---|---|
docker/ssl/certs/fluxmq-service-server.{crt,key} | Server certificate for FluxMQ's mTLS service listener |
docker/ssl/certs/re-fluxmq-client.{crt,key} | Client certificate whose URI SAN identifies the Rules Engine |
docker/ssl/certs/timescale-writer-fluxmq-client.{crt,key} | Client certificate whose URI SAN identifies the Timescale writer |
docker/ssl/certs/postgres-writer-fluxmq-client.{crt,key} | Client certificate whose URI SAN identifies the Postgres writer |
docker/ssl/certs/fluxmq-auth-fluxmq-client.{crt,key} | Client certificate whose URI SAN identifies the publish proxy |
docker/fluxmq/secrets/re-current | Rules Engine principal secret, from MG_RE_BROKER_SECRET |
docker/fluxmq/secrets/timescale-writer-current | Timescale writer secret, from MG_TIMESCALE_WRITER_BROKER_SECRET |
docker/fluxmq/secrets/postgres-writer-current | Postgres writer secret, from MG_POSTGRES_WRITER_BROKER_SECRET |
docker/fluxmq/secrets/fluxmq-auth-current | Publish proxy secret, from MG_FLUXMQ_BROKER_SECRET |
docker/re/secrets/trace.key | HMAC key the Rules Engine signs its loop-detection traces with |
Internal services reach the broker as local principals rather than as ordinary
clients: each presents a client certificate whose URI SAN names it, plus a SASL
secret, and the broker grants it only what it needs — the Rules Engine consumes
m, republishes under it, and feeds the writers and alarms streams; the
writers only subscribe to writers; the publish proxy that serves the UI's
HTTP publish endpoint only publishes under m.. The principals are declared in
docker/fluxmq/node{1,2,3}.yaml, and adding a service means adding an entry
there alongside its certificate and secret.
Being a local principal is also what preserves a message's origin. The broker
stamps its own transport protocol and identity on anything published over a
connection it does not trust, so a message relayed to the writers over the plain
AMQP listener would be stored as protocol: amqp with the relaying service as
its publisher. A service-role principal on the mTLS listener may state the
origin instead, and the protocol the device actually published with survives to
the database.
The certificates are issued by the development CA committed at
docker/ssl/certs/ca.crt, so no extra setup is needed for a local run. The
generated material is gitignored.
The server certificate is issued for fluxmq and fluxmq-node{1,2,3}, which
covers both this Compose stack and a single-node deployment. Point any
MG_*_BROKER_URL at a host outside that set and the service fails its TLS
verification with certificate is valid for ...; add the name to
FLUXMQ_SERVICE_SERVER_CERT_CONFIG in docker/ssl/Makefile and reissue:
rm -f docker/ssl/certs/fluxmq-service-server.* \
docker/ssl/certs/re-fluxmq-client.* \
docker/ssl/certs/timescale-writer-fluxmq-client.* \
docker/ssl/certs/postgres-writer-fluxmq-client.*
make -C docker/ssl fluxmq_service_certs
make check_certs skips certificates that already exist, so stale certificates
have to be removed rather than merely re-running the target.
Each local-principal secret must stay equal to the corresponding value in
docker/.env; a mismatch fails that service's broker authentication. After
changing one, re-run its target:
| Variable | Target |
|---|---|
MG_RE_BROKER_SECRET | fluxmq_service_secret |
MG_TIMESCALE_WRITER_BROKER_SECRET | timescale_writer_fluxmq_service_secret |
MG_POSTGRES_WRITER_BROKER_SECRET | postgres_writer_fluxmq_service_secret |
MG_FLUXMQ_BROKER_SECRET | fluxmq_auth_fluxmq_service_secret |
trace.key is created once and preserved on later runs — replacing it while
messages are in flight would invalidate the rule traces they already carry, so
delete it only deliberately. Every Rules Engine replica must read the same key.
Start the stack through make run_latest rather than calling docker compose up directly. Compose creates a missing bind-mount source as an empty
directory, so bringing up re or fluxmq before these files exist leaves the
containers failing against a directory where they expect a key.
Atom service tokens
Generated on demand: make run_latest runs scripts/generate-atom-secrets.sh
through the docker/.env.tokens prerequisite, so the first run mints them for
you. To do it explicitly:
make atom-secrets
The script writes two gitignored files from the same random material:
docker/atom-bootstrap.yaml, bind-mounted into the Atom container so Atom
hashes the credentials at first boot, and docker/.env.tokens, which supplies
one MG_ATOM_TOKEN_* per consumer — MG_ATOM_TOKEN_FLUXMQ_AUTH,
MG_ATOM_TOKEN_FLUXMQ_NODE{1,2,3}, MG_ATOM_TOKEN_JOURNAL,
MG_ATOM_TOKEN_NOTIFICATIONS, MG_ATOM_TOKEN_RE, MG_ATOM_TOKEN_ALARMS,
MG_ATOM_TOKEN_REPORTS, MG_ATOM_TOKEN_TIMESCALE_READER,
MG_ATOM_TOKEN_POSTGRES_READER, and MG_ATOM_TOKEN_BOOTSTRAP. No init
container is involved: services come up already holding credentials Atom has
accepted.
Rotate with make atom-secrets-rotate, which regenerates both files, restarts
Atom, and reminds you to restart the downstream services. Anything that resets
Atom's database also needs a rotation — the old tokens do not survive it.
Usage
make cli
./build/cli login admin 12345678
./build/cli --token "$ATOM_ADMIN_TOKEN" workspaces list
The CLI reads the same ATOM_URL and ATOM_SERVICE_TOKEN/ATOM_ADMIN_TOKEN
variables the services use, so a shell that has sourced docker/.env needs no
extra endpoint or token flags. CLI requests use a separate
MG_CLI_ATOM_TIMEOUT setting and default to a 90s interactive timeout.
See cli/README.md for the Atom GraphQL-backed command reference.
🧩 IoT Platform Framework
We call Magistrala a framework, not just a platform.
It is extremely flexible and lets you build systems the way you want — from simple prototypes to complex, large-scale deployments — without forcing you into rigid patterns.
At the same time, it avoids the typical complexity of many IoT platforms, where you need to learn an entirely new set of concepts before you can even get started.
Magistrala is built around a small number of main concepts:
- users
- devices
- channels
- messages
- policies
Most engineers are already familiar with these ideas, so you can start building immediately.
You can keep things simple:
- connect devices
- send messages
- store data
Or you can go deeper:
- define complex access control policies
- build event-driven pipelines
- integrate custom processing and automation
Magistrala scales with your needs — simple when you want it, powerful when you need it.
Atom Integration Model
Magistrala uses Atom as the backend for identity, authorization, and the catalog.
Atom is the source of truth for:
- workspaces
- users
- devices
- channels
- groups
- roles
- access policies
Magistrala services such as rules, alarms, and reports remain Magistrala services, but they use Atom for identity and authorization.
Current Docker deployments use the Atom image configured by ATOM_IMAGE in docker/.env. For compatibility with the current Magistrala integration, the generated MG_ATOM_TOKEN_* service credentials are unscoped Atom access tokens. Scoped Atom access tokens should not be used for these service env vars until Magistrala stops using owner-wide Atom listing APIs such as authorizedObjectIds in service policy paths.
Core Entity Mapping
| Magistrala concept | Atom concept | Meaning |
|---|---|---|
| Workspace | Tenant | Isolation boundary for one organization, project, or environment |
| User | Entity with kind human | A person who logs in and uses the UI/API |
| Device | Entity with kind device | A device or application that sends/receives data |
| Channel | Resource with kind channel | A messaging/data path that devices can publish or subscribe to |
| Group | Group | A collection of users, devices, channels, or other grouped objects |
In simple terms:
MG Workspace = Atom Tenant
MG User = Atom Human Entity
MG Device = Atom Device Entity
MG Channel = Atom Channel Resource
MG Group = Atom Group
Actions, Permission Blocks, Roles, and Assignments
Atom access control has these basic parts:
| Atom word | Simple meaning | Example |
|---|---|---|
| Action | One permission verb | read, write, delete, role.manage, policy.manage |
| Permission Block | Where actions apply | all channels in workspace d1 can read, publish |
| Role | A bundle of permission blocks | tenant-admin bundles workspace, role, and member access |
| Role Assignment | Who gets a role | give user1 the tenant-admin role |
Read an assignment like this:
Give <who> this <role>.
The role contains permission blocks that say where and what.
Example:
Give user1 the tenant-admin role on workspace d1.
That means:
user1 can use the tenant-admin permissions inside workspace d1.
How MG Roles Work With Atom
MG UI shows actions such as:
- read
- update
- delete
- manage roles
- add/remove members
- publish
- subscribe
These are mapped to Atom actions:
| MG action | Atom action |
|---|---|
| view/read | read |
| create/update/edit/connect | write |
| delete/remove | delete |
| manage roles | role.manage |
| add/remove members or access | policy.manage |
| channel publish | publish |
| channel subscribe | subscribe |
So when MG UI checks:
Can user1 manage roles for client1?
Atom checks:
Does user1 have role.manage on device1, or on the workspace that contains device1?
When MG UI checks:
Can user1 add a member to channel1?
Atom checks:
Does user1 have policy.manage on channel1, or on the workspace that contains channel1?
Practical Rule
If a user is workspace admin, they usually receive a tenant-scoped role in Atom.
That tenant-scoped role can allow them to manage objects inside the workspace:
- devices
- channels
- groups
- rules
- alarms
- reports
For narrower access, create object-scoped roles. For example:
Give user2 a reader role only on channel1.
Then user2 can read only that channel, not the whole workspace.
License
Apache-2.0