LogoLogo
StackState.comDownloadSupportExplore playground
StackState v5.1
StackState v5.1
  • Welcome to the StackState docs!
  • StackState self-hosted v5.1 docs
  • Getting Started
  • 🚀Setup
    • Install StackState
      • Requirements
      • Kubernetes / OpenShift
        • Kubernetes install
        • OpenShift install
        • Required Permissions
        • Non-high availability setup
        • Override default configuration
        • Configure storage
        • Configure Ingress
        • Install from custom image registry
        • Migrate from Linux install
      • Linux
        • Before you install
        • Download
        • Install StackState
        • Install with production configuration
        • Install with development configuration
        • Install with POC configuration
        • Set up a reverse proxy
        • Set up TLS without reverse proxy
      • Initial run guide
      • Troubleshooting
    • Upgrade StackState
      • Steps to upgrade
      • Version specific upgrade instructions
      • StackPack versions
      • StackState release notes
    • StackState Agent
      • About StackState Agent V3
      • Docker
      • Kubernetes / OpenShift
      • Linux
      • Windows
      • Advanced Agent configuration
      • Use an HTTP/HTTPS proxy
      • Agent V1 (legacy)
      • Migrate Agent V1 to Agent V2
        • Linux
        • Docker
    • StackState CLI
      • CLI: sts
      • CLI: stac (deprecated)
      • Comparison between CLIs
    • Data management
      • Backup and Restore
        • Kubernetes backup
        • Linux backup
        • Configuration backup
      • Data retention
      • Clear stored data
  • 👤Use
    • Concepts
      • The 4T data model
      • Components
      • Relations
      • Health state
      • Layers, Domains and Environments
      • Perspectives
      • Anomaly detection
      • StackState architecture
    • StackState UI
      • Explore mode
      • Filters
      • Views
        • About views
        • Configure the view health
        • Create and edit views
        • Visualization settings
      • Perspectives
        • Topology Perspective
        • Events Perspective
        • Traces Perspective
        • Metrics Perspective
      • Timeline and time travel
      • Analytics
      • Keyboard shortcuts
    • Checks and monitors
      • Checks
      • Add a health check
      • Anomaly health checks
      • Monitors
      • Manage monitors
    • Problem analysis
      • About problems
      • Problem lifecycle
      • Investigate a problem
      • Problem notifications
    • Metrics
      • Telemetry streams
      • Golden signals
      • Top metrics
      • Add a telemetry stream
      • Browse telemetry
      • Set telemetry stream priority
    • Events
      • About events
      • Event notifications
      • Manage event handlers
    • Glossary
  • 🧩StackPacks
    • About StackPacks
    • Add-ons
      • Autonomous Anomaly Detector
      • Health Forecast
    • Integrations
      • About integrations
      • 💠StackState Agent V2
      • 💠AWS
        • AWS
        • AWS ECS
        • AWS X-ray
        • StackState/Agent IAM role: EC2
        • StackState/Agent IAM role: EKS
        • Policies for AWS
        • AWS (legacy)
        • Migrate AWS (legacy) to AWS
      • 💠Dynatrace
      • 💠Kubernetes
      • 💠OpenShift
      • 💠OpenTelemetry
        • About instrumentations
        • AWS NodeJS Instrumentation
        • Manual Instrumentation
          • Prerequisites
          • Tracer and span mappings
          • Relations between components
          • Span health state
          • Merging components
          • Code examples
      • 💠ServiceNow
      • 💠Slack
      • 💠Splunk
        • Splunk
        • Splunk Events
        • Splunk Health
        • Splunk Metrics
        • Splunk Topology
      • 💠VMWare vSphere
      • Apache Tomcat
      • Azure
      • Cloudera
      • Custom Synchronization
      • DotNet APM
      • Elasticsearch
      • Humio
      • Java APM
      • JMX
      • Logz.io
      • MySQL
      • Nagios
      • OpenMetrics
      • PostgreSQL
      • Prometheus
      • SAP
      • SCOM
      • SolarWinds
      • Static Health
      • Static Topology
      • Traefik
      • WMI
      • Zabbix
    • Develop your own StackPacks
  • 🔧Configure
    • Topology
      • Component actions
      • Identifiers
      • Topology naming guide
      • Topology sources
      • Create a topology manually
      • Configure topology synchronizations
      • Enable email event notifications
      • Send topology data over HTTP
      • Set the topology filtering limit
      • Use a proxy for event handlers
      • Use tags
      • Tune topology synchronization
      • Debug topology synchronization
    • Telemetry
      • Add telemetry during topology synchronization
      • Data sources
        • Elasticsearch
        • Prometheus mirror
      • Send events over HTTP
      • Send metrics data over HTTP
      • Set the default telemetry interval
      • Debug telemetry synchronization
    • Traces
      • Set up traces
      • Advanced configuration for traces
    • Health
      • Health synchronization
      • Send health data over HTTP
        • Send health data
        • Repeat Snapshots JSON
        • Repeat States JSON
        • Transactional Increments JSON
      • Debug health synchronization
    • Anomaly Detection
      • Export anomaly feedback
      • Scale the AAD up and down
      • The AAD status UI
    • Security
      • Authentication
        • Authentication options
        • File based
        • LDAP
        • Open ID Connect (OIDC)
        • KeyCloak
        • Service tokens
      • RBAC
        • Role-based Access Control
        • Permissions
        • Roles
        • Scopes
        • Subjects
      • Secrets management
      • Self-signed certificates
      • Set up a security backend for Linux
      • Set up a security backend for Windows
    • Logging
      • Kubernetes logs
      • Linux logs
      • Enable logging for functions
  • 📖Develop
    • Developer guides
      • Agent checks
        • About Agent checks
        • Agent check API
        • Agent check state
        • How to develop Agent checks
        • Connect an Agent check to StackState
      • Custom functions and scripts
        • StackState functions
        • Check functions
        • Component actions
        • Event handler functions
        • ID extractor functions
        • Mapping functions
        • Monitor functions
        • Propagation functions
        • Template functions
        • View health state configuration functions
      • Custom Synchronization StackPack
        • About the Custom Synchronization StackPack
        • How to customize elements created by the Custom Synchronization StackPack
        • How to configure a custom synchronization
      • Integrate external services
      • Mirroring Telemetry
      • Monitors
        • Create monitors
        • Monitor STJ file format
      • StackPack development
        • How to create a StackPack
        • Packaging
        • How to get a template file
        • How to make a multi-instance StackPack
        • Prepare a multi-instance provisioning script
        • Upload a StackPack file
        • Prepare a shared template
        • Customize a StackPack
        • Prepare instance template files
        • Prepare a StackPack provisioning script
        • Resources in a StackPack
        • StackState Common Layer
      • Synchronizations and templated files
    • Reference
      • StackState OpenAPI docs
      • StackState Template JSON (STJ)
        • Using STJ
        • Template functions
      • StackState Markup Language (STML)
        • Using STML
        • STML Tags
      • StackState Query Language (STQL)
      • StackState Scripting Language (STSL)
        • Scripting in StackState
        • Script result: Async
        • Script result: Streaming
        • Time in scripts
        • Script APIs
          • Async - script API
          • Component - script API
          • HTTP - script API
          • Prediction - script API
          • StackPack - script API
          • Telemetry - script API
          • Time - script API
          • Topology - script API
          • UI - script API
          • View - script API
    • Tutorials
      • Create a simple StackPack
      • Push data to StackState from an external system
      • Send events to StackState from an external system
      • Set up a mirror to pull telemetry data from an external system
Powered by GitBook
LogoLogo

Legal notices

  • Privacy
  • Cookies
  • Responsible disclosure
  • SOC 2/SOC 3
On this page
  • Overview
  • Predefined roles
  • Custom roles
  • Custom names for predefined roles
  • Create custom roles and groups
  • File-based authentication
  1. Configure
  2. Security
  3. RBAC

Roles

StackState Self-hosted v5.1.x

PreviousPermissionsNextScopes

Last updated 2 years ago

Overview

Every user in StackState needs to have a subject and a set of assigned; this combination is called a role. A role describes a group of users that can access a specific data set. StackState ships with four predefined roles and you can also create custom names and groups to match your needs.

Predefined roles

There are four roles predefined in StackState:

  • Administrator - has full access to all views and has all permissions, except for platform management.

  • Platform Administrator - has platform management permissions and access to all views.

  • Power User - typically granted to a user that needs to configure StackState for a team(s), but won't manage the entire StackState installation.

  • Guest - has read-only access to StackState.

The permissions assigned to each predefined StackState role can be found below. For details of the different permissions and how to manage them using the stac CLI, see

The Administrator role (stackstate-admin): has all permissions assigned, except for access-admin-api, which is assigned only to the Platform Administrator predefined role.

Permissions assigned to the predefined Administrator role (stackstate-admin) are listed below, these were retrieved using the sts CLI. For details of the different permissions and how to manage them using the sts CLI, see .

$ ./sts rbac describe-permissions --subject stackstate-admin
PERMISSION                  | RESOURCE
access-view                 | everything
delete-view                 | everything
save-view                   | everything
access-analytics            | system
access-cli                  | system
access-explore              | system
access-log-data             | system
access-synchronization-data | system
access-topic-data           | system
create-views                | system
execute-component-actions   | system
execute-component-templates | system
execute-node-sync           | system
execute-restricted-scripts  | system
execute-scripts             | system
export-settings             | system
import-settings             | system
manage-annotations          | system
manage-event-handlers       | system
manage-monitors             | system
manage-service-tokens       | system
manage-stackpacks           | system
manage-star-view            | system
manage-telemetry-streams    | system
manage-topology-elements    | system
perform-custom-query        | system
read-permissions            | system
read-settings               | system
read-stackpacks             | system
run-monitors                | system
update-permissions          | system
update-settings             | system
update-visualization        | system
upload-stackpacks           | system

Platform Administrator (stackstate-platform-admin) is the only predefined role assigned the permission access-admin-api.

❯ ./sts rbac describe-permissions --subject stackstate-platform-admin
PERMISSION       | RESOURCE
access-view      | everything
access-admin-api | system
access-cli       | system
access-log-data  | system
manage-star-view | system

The Power User role (stackstate-power-user) has all Administrator permissions, except for:

  • execute-restricted-scripts

  • update-permissions

  • upload-stackpacks

❯ ./sts rbac describe-permissions --subject stackstate-power-user
PERMISSION                  | RESOURCE
access-view                 | everything
delete-view                 | everything
save-view                   | everything
access-analytics            | system
access-cli                  | system
access-explore              | system
access-log-data             | system
access-synchronization-data | system
access-topic-data           | system
create-views                | system
execute-component-actions   | system
execute-component-templates | system
execute-node-sync           | system
execute-scripts             | system
export-settings             | system
import-settings             | system
manage-annotations          | system
manage-event-handlers       | system
manage-monitors             | system
manage-stackpacks           | system
manage-star-view            | system
manage-telemetry-streams    | system
manage-topology-elements    | system
perform-custom-query        | system
read-permissions            | system
read-settings               | system
read-stackpacks             | system
run-monitors                | system
update-settings             | system
update-visualization        | system

The Guest role (stackstate-guest) has read-only access to StackState.

❯ ./sts rbac describe-permissions --subject stackstate-guest
PERMISSION                | RESOURCE
access-view               | everything
access-cli                | system
access-explore            | system
execute-component-actions | system
manage-star-view          | system
perform-custom-query      | system
read-permissions          | system
read-telemetry-streams    | everything
update-visualization      | system

Custom roles

Custom names for predefined roles

In addition to the default predefined role names (stackstate-admin, stackstate-platform-admin, stackstate-power-user, stackstate-guest), which are always available, custom role names can be added that have the same permissions. Below is an example of how to do this for both Kubernetes and Linux installations.

Include this YAML snippet in an authentication.yaml when customizing the authentication configuration to extend the default role names with these custom role names.

stackstate:
  authentication:
    roles:
      guest: ["custom-guest-role"]
      powerUser: ["custom-power-user-role"]
      admin: ["custom-admin-role"]
      platformAdmin: ["custom-platform-admin-role"]

To use it in for your StackState installation (or already running instance, note that it will restart the API):

helm upgrade \
  --install \
  --namespace stackstate \
  --values values.yaml \
  --values authentication.yaml \
stackstate \
stackstate/stackstate

To extend the default role names with custom role names:

  1. Edit the existing keys in the authorization section of the configuration file application_stackstate.conf.

  2. Add custom roles using the syntax xxxGroups = ${stackstate.authorization.xxxGroups} ["custom-role"] as shown in the example below.

    authorization {
     guestGroups = ${stackstate.authorization.guestGroups} ["custom-guest-role"]
     powerUserGroups = ${stackstate.authorization.powerUserGroups} ["custom-power-user-role"]
     adminGroups = ${stackstate.authorization.adminGroups} ["custom-admin-role"]
     platformAdminGroups = ${stackstate.authorization.platformAdminGroups} ["custom-platform-admin-role"]
    }
  3. Restart StackState for changes to take effect.

    The list of roles will be extended to include the new, custom roles. The default roles will remain available (stackstate-admin, stackstate-platform-admin, stackstate-guest and stackstate-power-user).

Create custom roles and groups

The instructions below will take you through the process of setting up a new group called StackStateManager

  1. Subjects need two pieces of information: a subject name and a subject scope. Create a new subject - set its name to stackstateManager and set the scope to 'label = "StackState" AND type = "Business Application”’ as in the following example:

    # `stac` CLI:
    stac subject save stackstateManager 'label = "StackState" AND type = "Business Application"'
    
    # new `sts` CLI:
    sts rbac create-subject --subject stackstateManager --scope 'label = "StackState" AND type = "Business Application"'

    Please note that when passing an STQL query in a stac or sts CLI command, all operators (like =, <,AND, and so on) need to be surrounded by spaces, as in the above example.

    Also, please note that the subject's name is case-sensitive.

  2. Configured subjects need permissions to access parts of the UI and to execute actions in it. StackState Manager role requires access to the specific view of business applications, and there is no need to grant any CRUD, or StackPack permissions - they won't be used in day-to-day work by any Manager. To grant permission to view the Business Applications view, follow the below example:

    # `stac` CLI:
    stac permission grant stackstateManager access-view "Business Applications"
    
    # new `sts` CLI:
    sts rbac grant --subject stackstateManager --resource "Business Applications" --permission access-view

    Please note that the subject's name, as well as permissions, are case-sensitive.

File-based authentication

If your StackState instance is configured with a file-based authentication, then you need to add newly created subjects to the config file and enable authentication.

  1. In the application_stackstate.conf file locate the authentication block and change enabled = false to enabled = true as in the below example:

       authentication {
         enabled  = true
         ...
       }
  2. Add new users and subjects to the logins table in the application_stackstate.conf as shown in the example below. Note that the default roles are always available (stackstate-admin, stackstate-platform-admin, stackstate-power-user and stackstate-guest)

     authentication {
       enabled  = true
    
       basicAuth = false
    
       # Amount of time to keep a session when a user doesn't log in
       sessionLifetime = 7d
    
       authServer {
         authServerType = "stackstateAuthServer"
    
         stackstateAuthServer {
           # echo -n "password" | md5sum
           # Open http://www.md5.net/md5-generator/
           # Enter your password and press submit, you will get an MD5 Hash
           # Set the MD5 Hash into `auth.password`
           logins = [
           { username = "admin", password: "5f4dcc3b3mn765d61d8327deb882cd78", roles = ["stackstate-admin"] }
           { username = "guest", password: "5f4dcc3b5aa765d61d8327deb882cf99", roles = ["stackstate-guest"] }
           { username = "manager", password: "3g4dcc3b5aa765d61g5537deb882cf99", roles = ["stackstateManager"] }
           ]
         }
       }
     }

Permissions assigned to the predefined Platform Administrator role (stackstate-platform-admin) are listed below, these were retrieved using the sts CLI. For details of the different permissions and how to manage them using the sts CLI, see .

Permissions assigned to the predefined Power User role (stackstate-power-user) are listed below, these were retrieved using the sts CLI. For details of the different permissions and how to manage them using the sts CLI, see .

Permissions assigned to the predefined Guest role are listed below, these were retrieved using the sts CLI. For details of the different permissions and how to manage them using the sts CLI, see .

🔧
permissions
RBAC permissions
RBAC permissions
RBAC permissions
RBAC permissions
RBAC permissions