Skip to content
Documentation

Authorization Configuration

This guide describes how to configure authorization for PowerTSM components. Authorization decides which permissions an authenticated identity holds on a given resource. The mechanism is selected from configuration at runtime: a constant decision for every request, a fixed permission set from the configuration, or rules loaded from the database. Authorization requires a configured identity — see Authentication Configuration.

HAKOM:Security:Authorization
Authorization
├─ DefaultAuthorizationService
└─ AuthorizationServices
└─ AuthorizationService
└─ {Name}
├─ Name (must repeat {Name})
├─ Type
└─ … (type-specific settings)

Name and Type are always required. Static additionally requires Permissions.

<HAKOM>
<Security>
<Authorization>
<DefaultAuthorizationService>FromRepository</DefaultAuthorizationService>
<AuthorizationServices>
<AuthorizationService Name="FromRepository">
<Type>Repository</Type>
</AuthorizationService>
<AuthorizationService Name="ReadOnly">
<Type>Static</Type>
<Permissions>Read</Permissions>
</AuthorizationService>
<AuthorizationService Name="Unrestricted">
<Type>AllowAll</Type>
</AuthorizationService>
</AuthorizationServices>
</Authorization>
</Security>
</HAKOM>

Path: HAKOM:Security:Authorization

Element Type Default Required Description
DefaultAuthorizationService string — Name of the authorization service to use. Required only if more than one service is configured. Example: FromRepository, AllowAll, DenyAll.
AuthorizationServices array — ✓ Collection of all configured authorization services (AuthorizationService entries).

Path: HAKOM:Security:Authorization:AuthorizationServices:AuthorizationService:{Name}

Element Type Default Required Description
Name string — ✓ Unique name for the authorization service. Must match the configuration key of the entry. Applies to all types. Example: FromRepository, ReadOnly.
Type enum — ✓ Service type. Matched case-insensitively. Applies to all types. Allowed values: AllowAll, DenyAll, Static, Repository.
Permissions string — ✓ The permission set granted to every identity on every resource. Applies to Static only. Allowed values: see Permissions. Example: Read, Read, Write, All.

Type-specific configuration details:

Grants every permission on every resource to every identity, without evaluating claims. Intended for development, integration tests, and installations where access control is handled elsewhere.

Structure:

AuthorizationService
└─ {Name}
└─ Type (AllowAll)

Denies every request, regardless of identity or resource. Every authorization check fails with UnauthorizedException (HTTP 403). This is the fallback when no authorization is configured at all.

Structure:

AuthorizationService
└─ {Name}
└─ Type (DenyAll)

Grants a fixed set of permissions, defined in the configuration, on every resource.

Structure:

AuthorizationService
└─ {Name}
├─ Type (Static)
└─ Permissions

Permissions is required and is read directly from the authorization service entry. See Permissions for the accepted values.

Loads authorization rules from the database of the repository that holds the resource being accessed. This is the only type that evaluates rules per identity and per resource type.

Structure:

AuthorizationService
└─ {Name}
└─ Type (Repository)

The service takes no configuration of its own. Rules are data, not configuration — see Rule Storage for the tables involved and how rules are evaluated. Because rules are read at request time, changes in the database take effect without restarting the service.

Permissions are a set of flags. A check succeeds only if the granted set contains every requested permission.

Value Description
None No permissions
Create Create new objects
Read Read objects and data
Write Modify existing objects and data
Delete Delete objects and data
All Shorthand for Create, Read, Write, and Delete

Several values are combined by separating them with commas; surrounding whitespace is ignored:

<Permissions>Read, Write</Permissions>

Every authorization check is made against a resource, which has a type and an optional identifier. Resources are nested: a time series lies within a repository, so a check against a time series resolves to the rules of its repository. The following resource types are used:

Resource Type Protects
Repository The repository itself; the root of every resource hierarchy
TimeSeries Time series definitions
TimeSeriesData Time series values
TimeSeriesAuditData Audit trail of time series values
TimeSeriesQuotationData Quotation data of time series
TimeSeriesDataConfiguration Storage configuration of time series data
Attribute Attributes
AttributeType Attribute type definitions
AttributeData Attribute values assigned to time series
Node Nodes and trees
Unit Units
ConstantUnitConversion Constant unit conversions
TimeDependentUnitConversion Time-dependent unit conversions

Only the Repository service distinguishes resource types; AllowAll, DenyAll, and Static return the same decision regardless of the resource.

This section applies to the Repository service only. Its rules are stored in the repository database rather than in the configuration, and are read at request time.

Rules live in FWS_REPOSITORY_AUTHORIZATION_4_9_0, with claims normalized across FWS_CLAIMTYPE, FWS_CLAIM, and FWS_CLAIMVALUE. Each rule consists of:

Rule element Meaning
Permission columns CREATE, READ, UPDATE, DELETE The permissions the rule grants. UPDATE corresponds to the Write permission.
Subject claim The claim an identity must hold for the rule to apply. If not set, the rule applies to every identity.
Owner claim An identity holding this claim receives all permissions and may change or invalidate the rule.
OBJECTTYPE The resource type the rule applies to. If not set, the rule applies to every resource type.

All rules of the resolved repository that match the resource type — plus those with no resource type — are evaluated, and the permissions of every matching rule are combined. A rule matches when the identity holds a claim with the same type and value as the rule’s subject claim; claim types and values are compared case-insensitively. If the identity holds the rule’s owner claim, all permissions are granted.

Because permissions accumulate, a rule can only widen access, never narrow it. There are no deny rules — access is restricted by not granting it.

Authorization has no dedicated diagnostic endpoint. The response status distinguishes the two failure modes:

Status Meaning
401 No valid identity — an authentication problem, not an authorization one
403 The identity is known but lacks the requested permission

For a 403, GET /identity shows the claims that rules are matched against. When the expected claim is missing or arrives under a different name, the cause lies in the authentication configuration rather than in the rules.

© 2026 Volue.Version v0.6.38017 November 2026