Heimdall RBAC User Guide
Overview
Heimdall implements Role-Based Access Control (RBAC) to manage user permissions and resource access. This guide explains how to use the RBAC system as a user, operator, or administrator.
Table of Contents
Roles and Permissions
Heimdall uses three roles with hierarchical permissions:
đ¤ USER
Basic access for viewing and using assigned resources.
What you can do:
- View constellations shared with you
- Start localization sessions on assigned constellations
- Configure frequency and session parameters
- View session history for assigned constellations
- View system status
What you cannot do:
- Create constellations, sources, or models
- Edit or delete any resources
- Share resources with other users
- Access system settings or admin functions
Typical Use Case: Field operators or stakeholders who need to monitor specific constellations and start localization sessions.
đ ď¸ OPERATOR
Advanced access for creating and managing resources.
What you can do:
- Everything a USER can do, plus:
- Create new constellations (you become the owner)
- Edit constellations you own or have been shared with âeditâ permission
- Delete constellations you own
- Add/remove WebSDR stations to/from your constellations
- Share your constellations with other users
- Create and manage sources (transmitters/beacons)
- Create and manage ML models
- Start RF acquisitions
- Start training sessions
- Generate synthetic samples
What you cannot do:
- Access resources owned by others unless shared
- View or edit system settings
- Manage user accounts
Typical Use Case: RF engineers, data scientists, or team leads who need to create and manage constellations and resources for their projects.
đ ADMIN
Full system access with no restrictions.
What you can do:
- Everything an OPERATOR can do, plus:
- View and edit ALL constellations, sources, and models (bypasses ownership)
- Delete any resource
- Manage user accounts and assignments
- Modify system settings
- Access all admin functions
Typical Use Case: System administrators responsible for maintaining the platform and managing users.
Constellations
What is a Constellation?
A Constellation is a logical grouping of WebSDR stations used for radio source localization. Constellations allow you to:
- Organize WebSDR stations by geography, frequency band, or project
- Control Access to specific stations for different users
- Collaborate by sharing constellations with read or edit permissions
- Isolate resources for different teams or use cases
Example Constellations:
- âNorthern Italy Coverageâ - Stations covering northern Italy
- âVHF Monitoring Networkâ - Stations optimized for VHF frequencies
- âTeam Alpha Resourcesâ - Stations assigned to Team Alpha
Creating a Constellation (OPERATOR+)
- Navigate to Constellations page
- Click Create Constellation button
- Fill in the form:
- Name: Short, descriptive name (e.g., âNorthern Italy Coverageâ)
- Description: Optional detailed description
- Click Create
Result: You are now the owner of this constellation and can add WebSDR stations to it.
Adding WebSDR Stations to a Constellation (OPERATOR+)
- Open the constellation details page
- Click Add WebSDR button
- Select one or more WebSDR stations from the list
- Click Add Selected
Note: All WebSDR stations are globally visible to authenticated users. Youâre assigning them to your constellation for localization purposes.
Editing a Constellation
Requirements: Owner OR shared with âeditâ permission OR admin
- Open the constellation details page
- Click Edit button
- Modify name or description
- Click Save Changes
Deleting a Constellation
Requirements: Owner OR admin only
- Open the constellation details page
- Click Delete button (red)
- Confirm deletion in the dialog
Warning: Deleting a constellation also removes:
- All WebSDR station assignments
- All shares with other users
- This action cannot be undone
Sharing Resources
Owners can share their constellations, sources, and models with other users.
Permission Levels
- Read: User can view the resource and use it (e.g., start sessions on a constellation)
- Edit: User can view AND modify the resource (e.g., add/remove WebSDRs, change name/description)
Owner Privileges (beyond âeditâ):
- Delete the resource
- Share the resource with other users
- Modify or revoke sharing permissions
Sharing a Constellation
Requirements: Owner OR admin only
- Open the constellation details page
- Click Share button
- In the Share modal:
- Search for users by email or username (type at least 3 characters)
- Select a user from the dropdown
- Choose permission level: Read or Edit
- Click Add Share
- The user now has access to your constellation
Managing Shares
View existing shares:
- Open the constellation details page
- Click Share button
- The modal shows all current shares with user avatars and permissions
Update permission:
- In the Share modal, find the user
- Click the permission dropdown next to their name
- Select new permission level (Read or Edit)
Remove share:
- In the Share modal, find the user
- Click the Remove (trash icon) button next to their name
- Confirm removal
Viewing Shared Resources
As a USER or OPERATOR:
- Resources shared with you appear in the respective list pages
- Each card shows:
- Owner badge if you own it
- Permission badge (Read/Edit) if shared with you
- Available actions based on your permission level
Example: A constellation shared with âReadâ permission shows a Read badge and no edit/delete buttons.
Common Workflows
Workflow 1: Starting a Localization Session (USER+)
- Navigate to Localization page
- Select a constellation from the dropdown (shows only assigned constellations)
- Configure session parameters:
- Frequency (MHz)
- Bandwidth
- Duration
- Click Start Session
- Monitor real-time localization results on the map
Workflow 2: Creating and Sharing a Constellation (OPERATOR+)
Scenario: You want to create a constellation for your team and share it with team members.
- Create Constellation:
- Go to Constellations page
- Click Create Constellation
- Name: âTeam Alpha VHF Networkâ
- Description: âVHF monitoring stations for Team Alphaâ
- Click Create
- Add WebSDR Stations:
- Open the new constellation
- Click Add WebSDR
- Select stations: âRome-ITâ, âMilan-ITâ, âBologna-ITâ
- Click Add Selected
- Share with Team Members:
- Click Share button
- Search for team member: âalice@example.comâ
- Permission: Edit (allow Alice to manage stations)
- Click Add Share
- Repeat for other team members with Read permission
- Result: Team members can now:
- View the constellation (all members)
- Start localization sessions (all members)
- Add/remove WebSDR stations (Alice only)
Workflow 3: Managing Sources as an Operator (OPERATOR+)
Scenario: You want to track known transmitters in your area.
- Create a Source:
- Go to Sources page
- Click Create Source
- Fill in details:
- Name: âBeacon-Milano-VHFâ
- Frequency: 145.850 MHz
- Location: Latitude 45.4642, Longitude 9.1900
- Type: Beacon
- Description: âVHF beacon in Milanoâ
- Click Create
- Share the Source (optional):
- Open source details
- Click Share
- Add team members with Read or Edit permissions
- Use in Training:
- The source is now available when generating synthetic training data
- Can be used as ground truth for model evaluation
Workflow 4: Admin Managing All Resources (ADMIN)
Scenario: As admin, you need to audit all constellations and fix a misconfigured one.
- View All Constellations:
- Go to Constellations page
- You see ALL constellations (not just yours)
- Each shows the ownerâs name
- Edit Any Constellation:
- Open any constellation (regardless of owner)
- Click Edit (available even if you donât own it)
- Make changes and save
- Delete Problematic Constellation:
- Open the constellation
- Click Delete
- Confirm deletion
Note: Admins bypass all ownership and sharing checks. Use this power responsibly!
Troubleshooting
âAccess Deniedâ or 403 Forbidden Error
Possible Causes:
- Insufficient Role:
- Youâre trying to access a resource that requires a higher role
- Solution: Contact your admin to upgrade your role
- Not Owner/Not Shared:
- Youâre trying to edit/delete a resource you donât own or that hasnât been shared with you
- Solution: Contact the owner to request âeditâ permission or ask an admin
- Wrong Permission Level:
- You have âreadâ permission but are trying to edit
- Solution: Ask the owner to upgrade your permission to âeditâ
- Session Expired:
- Your JWT token has expired
- Solution: Refresh the page to re-authenticate
Cannot See a Constellation
Possible Causes:
- Not Shared with You:
- The constellation exists but hasnât been shared with you
- Solution: Ask the owner to share it with you
- Role Restriction:
- As a USER, you can only see constellations shared with you
- Solution: This is expected behavior. Request access from the owner
- Deleted Constellation:
- The constellation was deleted by the owner or admin
- Solution: No recovery possible. Create a new one
Cannot Add WebSDR to Constellation
Possible Causes:
- No Edit Permission:
- You need âeditâ permission or ownership to add WebSDRs
- Solution: Ask owner for âeditâ permission
- WebSDR Already in Constellation:
- The WebSDR is already a member of this constellation
- Solution: This is expected. Each WebSDR can only be added once
- WebSDR Offline:
- The WebSDR station is currently offline (shouldnât prevent adding, but check status)
- Solution: Verify WebSDR status on WebSDRs page
Possible Causes:
- Not Owner:
- Only owners can share resources
- Solution: You cannot share resources you donât own
- Insufficient Role:
- Only OPERATOR+ can create and therefore own resources
- Solution: Request role upgrade from admin
API Reference
Authentication
All API requests require a valid JWT token from Keycloak:
Authorization: Bearer <JWT_TOKEN>
Constellation Endpoints
List Constellations
GET /api/v1/constellations
Query Parameters:
skip (optional): Pagination offset (default: 0)
limit (optional): Number of results (default: 100, max: 1000)
Response:
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Northern Italy Coverage",
"description": "Stations covering northern Italy",
"owner_id": "user-123",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"member_count": 5,
"permission": "edit" // or "read" or null (if owner)
}
]
Filtering:
- USER: Returns only constellations shared with you
- OPERATOR: Returns constellations you own or have been shared with you
- ADMIN: Returns ALL constellations
Create Constellation
POST /api/v1/constellations
Requirements: OPERATOR or ADMIN role
Request Body:
{
"name": "Northern Italy Coverage",
"description": "Stations covering northern Italy"
}
Response: 201 Created
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Northern Italy Coverage",
"description": "Stations covering northern Italy",
"owner_id": "user-123",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}
Get Constellation Details
GET /api/v1/constellations/{constellation_id}
Requirements: Owner, shared user, or admin
Response: 200 OK
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Northern Italy Coverage",
"description": "Stations covering northern Italy",
"owner_id": "user-123",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"members": [
{
"id": "websdr-001",
"name": "Rome-IT",
"location": "Rome, Italy",
"added_at": "2025-01-15T10:35:00Z"
}
]
}
Error Responses:
403 Forbidden: No permission to view this constellation
404 Not Found: Constellation does not exist
Update Constellation
PUT /api/v1/constellations/{constellation_id}
Requirements: Owner, shared with âeditâ permission, or admin
Request Body:
{
"name": "Updated Name",
"description": "Updated description"
}
Response: 200 OK (updated constellation object)
Error Responses:
403 Forbidden: No edit permission
404 Not Found: Constellation does not exist
Delete Constellation
DELETE /api/v1/constellations/{constellation_id}
Requirements: Owner or admin only
Response: 204 No Content
Error Responses:
403 Forbidden: Not owner or admin
404 Not Found: Constellation does not exist
Add WebSDR to Constellation
POST /api/v1/constellations/{constellation_id}/members
Requirements: Owner, shared with âeditâ permission, or admin
Request Body:
{
"websdr_station_id": "websdr-001"
}
Response: 201 Created
{
"id": "member-001",
"constellation_id": "550e8400-e29b-41d4-a716-446655440000",
"websdr_station_id": "websdr-001",
"added_at": "2025-01-15T11:00:00Z",
"added_by": "user-123"
}
Error Responses:
403 Forbidden: No edit permission
404 Not Found: Constellation or WebSDR does not exist
409 Conflict: WebSDR already in constellation
Remove WebSDR from Constellation
DELETE /api/v1/constellations/{constellation_id}/members/{websdr_station_id}
Requirements: Owner, shared with âeditâ permission, or admin
Response: 204 No Content
Error Responses:
403 Forbidden: No edit permission
404 Not Found: Constellation, WebSDR, or membership does not exist
Sharing Endpoints
List Shares for a Constellation
GET /api/v1/constellations/{constellation_id}/shares
Requirements: Owner or admin only
Response: 200 OK
[
{
"id": "share-001",
"constellation_id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user-456",
"permission": "edit",
"shared_by": "user-123",
"shared_at": "2025-01-15T12:00:00Z",
"user_info": {
"email": "alice@example.com",
"username": "alice"
}
}
]
Error Responses:
403 Forbidden: Not owner or admin
404 Not Found: Constellation does not exist
Create Share
POST /api/v1/constellations/{constellation_id}/shares
Requirements: Owner or admin only
Request Body:
{
"user_id": "user-456",
"permission": "edit" // or "read"
}
Response: 201 Created
{
"id": "share-001",
"constellation_id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user-456",
"permission": "edit",
"shared_by": "user-123",
"shared_at": "2025-01-15T12:00:00Z"
}
Error Responses:
403 Forbidden: Not owner or admin
404 Not Found: Constellation does not exist
409 Conflict: Share already exists for this user
422 Unprocessable Entity: Invalid permission level
Update Share Permission
PUT /api/v1/constellations/{constellation_id}/shares/{user_id}
Requirements: Owner or admin only
Request Body:
Response: 200 OK (updated share object)
Error Responses:
403 Forbidden: Not owner or admin
404 Not Found: Constellation or share does not exist
422 Unprocessable Entity: Invalid permission level
Delete Share
DELETE /api/v1/constellations/{constellation_id}/shares/{user_id}
Requirements: Owner or admin only
Response: 204 No Content
Error Responses:
403 Forbidden: Not owner or admin
404 Not Found: Constellation or share does not exist
Best Practices
For Operators
- Descriptive Names: Use clear, descriptive names for constellations
- â
âNorthern Italy VHF Coverageâ
- â âMy Constellation 1â
- Share Appropriately:
- Use âReadâ for most users (prevents accidental changes)
- Use âEditâ only for trusted collaborators who need to manage stations
- Document Your Resources:
- Use description fields to explain purpose and usage
- Include contact info or team name
- Regular Cleanup:
- Delete unused constellations to keep the system organized
- Remove outdated sources and models
For Admins
- Monitor Ownership: Regularly review resource ownership
- Backup Before Deletion: Verify impact before deleting resources
- User Training: Ensure users understand the RBAC system
- Access Audits: Periodically review shares and permissions
For Users
- Request Access: Donât hesitate to request access to constellations you need
- Report Issues: If permissions seem incorrect, contact your admin
- Respect Ownership: Donât try to work around access restrictions
FAQ
Q: Can I transfer ownership of a constellation?
A: Currently, no. Only admins can delete and recreate resources to change ownership.
Q: Can a constellation have multiple owners?
A: No. Each constellation has one owner. However, you can share with âeditâ permission to grant similar privileges.
Q: What happens if a constellation owner leaves the organization?
A: Admins should reassign resources by recreating them or manually updating the database.
Q: Can I see who shared a constellation with me?
A: Yes. The constellation details show the owner, and shares show shared_by field in API responses.
Q: Can I share a constellation that was shared with me?
A: No. Only the owner can share resources.
Q: Are WebSDR stations owned by anyone?
A: No. WebSDR stations are globally visible to all authenticated users. Only constellation assignments are controlled.
Q: Can I use multiple constellations in a single localization session?
A: No. Each session is tied to one constellation. Create a constellation with all needed stations.
Q: Whatâs the difference between deleting a constellation and removing all its WebSDRs?
A: Removing WebSDRs keeps the constellation (you can re-add stations later). Deleting removes the constellation entirely.
Support
If you encounter issues or have questions:
- Check this guide and FAQ
- Check the Troubleshooting section
- Contact your system administrator
- Report bugs at:
https://github.com/fulgidus/heimdall/issues
Last Updated: 2025-11-08
Document Version: 1.0
Contact: alessio.corsi@gmail.com