Benutzen sie die linke oder die rechte Maustaste, um zur jeweils vorherigen bzw. nachfolgenden Änderung zu gelangen.
erste | letzte ![]() |
| Änderungen von: | |
| bis: | |
| Typ: | |
erste | letzte ![]() |
Externe Clients (Kiosk-Terminals External clients (kiosk terminals, mobile Appsapps, Integrationenintegrations) sprechen Webdesk über die REST-Schnittstelle an (Pfad talk to Webdesk through its REST interface (path /rest/... unterhalb des Webdesk-Kontextpfads). Diese Seite beschreibt, wie sich ein solcher Client authentifiziert, wie ein API-Key angelegt und verwaltet wird und wie über Zugriffsrechte und Zugriffsrecht-Sets festgelegt wird, welche REST-Aufrufe er ausführen darf. Sie richtet sich an Systemadministratoren und Berater. Die Zugriffsrechte für REST-Endpunkte sind unabhängig von den Aktionsberechtigungen der Berechtigungssteuerung (siehe Berechtigungstypen): Diese steuern, wer eine Aktion in der Oberfläche aufrufen darf, die hier beschriebenen Zugriffsrechte steuern, welche REST-URLs mit welcher HTTP-Methode aufgerufen werden dürfen.
Merkmal
Anmeldung mit Benutzer (Session)
API-Key
Typischer Einsatz
Integrationen und Apps, die im Namen eines Webdesk-Benutzers arbeiten
Geräte und Systeme ohne Benutzeranmeldung, z. B. Kiosk-Terminals
Ablauf
below the Webdesk context path). This page describes how such a client authenticates, how an API key is created and managed, and how access rights and access right sets define which REST calls it may make. It is intended for system administrators and consultants. The access rights for REST endpoints are independent of the action permissions of the authorization control (see permission types): those control who may open an action in the user interface, whereas the access rights described here control which REST URLs may be called with which HTTP method.
|
Aspect |
Login with a user (session) |
API key |
|---|---|---|
|
Typical use |
Integrations and apps that act on behalf of a Webdesk user |
Devices and systems without a user login, e.g. kiosk terminals |
|
Flow |
|
Every call carries the HTTP header |
|
Berechtigung |
Zugriffsrechte der Rollen des Benutzers (Rollen-Reiter "Zugriffsrechte") |
Zugriffsrechte des API-Keys (direkt am Key und über zugeordnete Zugriffsrecht-Sets) |
|
No prior login is needed. |
||
|
Authorization |
Access rights of the user's roles (role tab "Access Rights") |
Access rights of the API key (directly on the key and via assigned access right sets) |
If the X-Auth-Token gesetzt, wird der Aufruf als API-Key-Aufruf behandelt, andernfalls als Session-Aufruf. (Nur im Betriebsmodus dev oder test wird zusätzlich Basic Authentication über den Header Authorization akzeptiert; sie ist für Tests gedacht.) Der Aufruf header is set, the call is handled as an API key call, otherwise as a session call. (Only in running mode dev or test is Basic Authentication via the Authorization header accepted as well; it is intended for tests.)
The /rest/auth/login sowie einige weitere öffentliche Endpunkte (z. B. Passwort-Rücksetzung, Systemzeit) werden von der REST-Authentifizierung nicht geprüft. Für Browser-Anmeldungen ist der normale Weg weiterhin die Webdesk-Login-Seite call and a few other public endpoints (e.g. password reset, system time) are not checked by the REST authentication. For browser logins the normal way remains the Webdesk login page; /rest/auth/login ist für externe Clients vorgesehen.
Externe Clients mit Benutzeranmeldung benötigen rollenbasierte Zugriffsrechte. Es zählen alle Zugriffsrechte und Zugriffsrecht-Sets aller Rollen, die der angemeldete Benutzer innehat. Ist für URL und HTTP-Methode weder ein erlaubendes noch ein verbietendes Recht vorhanden, wird der Aufruf mit 403 abgewiesen. Einige Endpunkte, die für jeden angemeldeten Benutzer gedacht sind (z. B. unter is meant for external clients.
External clients that log in with a user need role-based access rights. All access rights and access right sets of all roles held by the logged-in user count. If neither a granting nor a denying right exists for the URL and HTTP method, the call is rejected with 403. A few endpoints intended for every logged-in user (e.g. under /rest/po/systeminfo/, /rest/po/users/, /rest/po/actionpermissions/) , sind von der Rechteprüfung ausgenommen; für sie genügt die Anmeldung. Ruft die Oberfläche selbst REST-Endpunkte auf (Erkennung über den Referer), gelten stattdessen die in der jeweiligen Aktion hinterlegten Zugriffsrechte (siehe unten).
Ein API-Key kann zusätzlich im Namen eines Webdesk-Benutzers handeln, z. B. wenn ein Kiosk-Terminal nach dem Scannen einer NFC-Karte Daten dieser Person abruft. Dazu sendet der Client einen der beiden Header:
Header
Erklärung
are exempt from the rights check; being logged in is sufficient for them. When the user interface itself calls REST endpoints (detected through the Referer), the access rights stored in the respective action apply instead (see below).
An API key can additionally act on behalf of a Webdesk user, e.g. when a kiosk terminal fetches the data of a person after scanning an NFC card. For this, the client sends one of the two headers:
|
Header |
Description |
|---|---|
|
|
ID der of the NFC -Karte; der Benutzer ist die Person, der die Karte zugewiesen istcard; the user is the person to whom the card is assigned. |
|
|
UID der Person. |
Einschränkungen:
Die Zugriffsrechte des Keys bleiben auch bei Impersonation maßgeblich; die Rechte der identifizierten Person erweitern sie nicht.
|
of the person. |
Restrictions:
The access rights of the key remain decisive even with impersonation; the rights of the identified person do not extend them.
The screens are located in the admin menu under "System" (in the folder "Security"): "API Keys" (Listelist) und and "Zugriffsrecht SammlungAccessright Sets" (Zugriffsrecht-Sets). Je nach Menüaufbau des Systems kann der Eintrag "Zugriffsrecht Sammlung" auch direkt unter "System" stehen.
Die Liste zeigt alle Keys mit den Spalten access right sets). Depending on the menu layout of the system, the entry "Accessright Sets" may also appear directly under "System".
The list shows all keys with the columns "API Key" (der Schlüsselwert selbstthe key value itself), "API Consumer", "Gültig vonValid from" und and "Gültig bis"; auch ungültig gemachte Keys bleiben sichtbar. Über das Symbol in der ersten Spalte wird ein Key geöffnet, über die Schaltfläche Valid till"; keys that have been invalidated remain visible. The icon in the first column opens a key, the button "Generate New API Key" ein neuer angelegt.
creates a new one.
Achtung: Ein neuer Key ohne Zugriffsrecht-Set und ohne eigene Rechte ist zwar gültig, darf aber keinen einzigen Endpunkt aufrufen (Antwort 403).
Achtung: Der Schlüsselwert ist das Geheimnis, mit dem sich der Client ausweist, und wird in der Liste und in der Maske im Klartext angezeigt. Der Zugriff auf diese Masken sollte entsprechend eingeschränkt sein; Keys gehören in keine Dokumentation, kein Ticket und keine URL. Webdesk bietet für BilderWarning: A new key without an access right set and without its own rights is valid, but may not call a single endpoint (response 403).
Warning: The key value is the secret with which the client identifies itself, and it is displayed in clear text in the list and in the screen. Access to these screens should be restricted accordingly; keys do not belong in documentation, tickets or URLs. For images (/image/...) zwar zusätzlich den Parameter apiKey an, der Header Webdesk additionally accepts the parameter apiKey, but the header X-Auth-Token ist aber vorzuziehen.
is preferable.
Gehört der (gültige) Key zu einem Kiosk, weist die Rückfrage darauf hin, dass dieser Kiosk danach nicht mehr funktioniert. Das Ungültigmachen oder Löschen löst die Verbindung zwischen Kiosk und Key; einen neuen Key erzeugt man in der Kiosk-Maske (siehe unten).
Für Kiosks (Menü "Karten u. Kiosk" > "Kiosks") verwaltet Webdesk den Key selbst:
API Consumer = Kioskname) und diesem das Standard-Zugriffsrecht-Set des Kiosk-Typs zugeordnet (siehe unten).
Eigenschaft
Erklärung
mögliche Wert(e)
"Selektor"
/rest/..., z. B
If the (valid) key belongs to a kiosk, the confirmation points out that this kiosk will no longer work afterwards. Invalidating or deleting breaks the link between kiosk and key; a new key is generated in the kiosk screen (see below).
For kiosks (menu "Cards and Kiosks" > "Kiosks") Webdesk manages the key itself:
API Consumer = kiosk name) and the default access right set of the kiosk type is assigned to it (see below).
|
Property |
Description |
Possible value(s) |
|
|---|---|---|---|
|
"Selector" |
Path of the REST endpoint, without context path and without query parameters, starting with |
Text, Pflichtfeldrequired |
|
|
"Privileg" | Erlaubte Art des Zugriffs. Zuordnung zur HTTP-Methode siehe unten
Privilege" |
Permitted kind of access. For the mapping to the HTTP method see below. |
READ, CREATE, UPDATE, DELETE, FULL |
|
"Ablehnen" |
Bei gesetztem Haken verbietet das Recht den Zugriff, statt ihn zu erlauben. |
Ja/Nein (Standard: Nein, das Recht erlaubt) |
|
|
HTTP-Methode |
benötigtes Privileg |
||
|
Deny" |
If checked, the right forbids the access instead of allowing it. |
Yes/No (default: No, the right allows) |
|
HTTP method |
required privilege |
|---|---|
|
GET |
READ |
|
POST |
CREATE |
|
PUT, PATCH |
UPDATE |
|
DELETE |
DELETE |
FULL entspricht corresponds to READ, CREATE, UPDATE und and DELETE zusammentogether. Andere Other HTTP -Methoden methods (ze. Bg. HEAD) können nicht zugeordnet werden und führen zu einer Fehlerantwort 401.
Ort
Wirkung
API-Key (Abschnitte "Api Key Zugriffsrecht-Sets" und "Api Key-Spezifische Zugriffsrechte")
Für Aufrufe mit X-Auth-Token. Es gilt die Summe aus den eigenen Rechten des Keys und den Rechten aller zugeordneten Sets.
Rolle (Reiter "Zugriffsrechte" in der Rollenmaske, Abschnitte "Rollenspezifische Zugriffsrecht-Sets" und "Rollenspezifische Zugriffsrechte"; siehe Rollen)
Für Session-Aufrufe aller Rolleninhaber. Der Reiter ist nur für Systemadministratoren und nicht bei abgeleiteten Mandanten-Rollen sichtbar.
cannot be mapped and result in an error response 401.
|
Place |
Effect |
||
|---|---|---|---|
|
API key (sections "Api Key Access Right Sets" and "Api Key Specific Access Rights") |
For calls with |
||
|
Role (tab "Access Rights" in the role screen, sections "Role Access Right Sets" and "Role Specific Access Rights"; see Roles) |
For session calls of all role holders. The tab is only visible to system administrators and not for derived client roles. |
||
|
Action (file |
Für REST-Aufrufe, die die Oberfläche aus dieser Aktion heraus tätigt. Nicht über die Oberfläche änderbar: Die Aktion zeigt sie im Reiter "Zugriffsrechte" nur an, Änderungen dort werden nicht gespeichert. |
Zugriffsrecht-Set |
Wiederverwendbare Sammlung von Rechten, die beliebig vielen Keys und Rollen zugeordnet werden kannFor REST calls that the user interface makes from this action. Cannot be changed in the user interface: the action only displays them in the tab "Access Rights", changes made there are not saved. |
|
Access right set |
Reusable collection of rights that can be assigned to any number of keys and roles. |
In act-descr.xml werden Rechte als rights are declared as <accessrights><accessright selector="/rest/po/audit/label/*" privilege="GET"/></accessrights> deklariert. Das Attribut privilege nimmt eine oder mehrere (durch Komma getrennte) HTTP-Methoden entgegen, z. BThe attribute privilege takes one or more HTTP methods separated by commas, e.g. GET,POST. Solche Rechte erlauben immer; ein Ablehnen ist nicht möglich.
Such rights always allow; denying is not possible.
Achtung: Änderungen an einem Set wirken auf alle Keys und Rollen, denen es zugeordnet ist.
Für Kiosk-Keys legt Webdesk beim ersten Bedarf ein Set mit dem Namen Default <Typ> Kiosk Access Right Set an (Typ = PTM, TA oder PTM_TA) und ordnet es dem neuen Key zu. Die Sets enthalten (alle erlaubend):
Selektor
Privileg
in Set
Warning: Changes to a set affect all keys and roles to which it is assigned.
For kiosk keys, Webdesk creates a set named Default <type> Kiosk Access Right Set on first demand (type = PTM, TA or PTM_TA) and assigns it to the new key. The sets contain (all granting):
|
Selector |
Privilege |
in set |
|---|---|---|
|
|
FULL |
PTM, TA |
|
|
FULL |
PTM, TA |
|
|
FULL |
PTM, TA |
|
|
READ |
PTM, TA |
|
|
FULL |
nur TA only |
"Default PTM_TA Kiosk Access Right Set" vereinigt die Rechte beider Sets. Ein einmal angelegtes Set wird über seinen Namen wiedergefunden; spätere Änderungen an der Standardkonfiguration verändern ein bestehendes Set nicht. Man kann ein Set jedoch in der "Zugriffsrecht Sammlung" bearbeiten, dann ändern sich die Rechte aller Kiosks dieses Typs.
Für einen API-Key-Aufruf werden die Rechte des Keys und aller seiner Sets zusammengeführt und gegen Pfad und HTTP-Methode des Aufrufs geprüft:
Der Pfad des Aufrufs (ohne Kontextpfad, z. Bcombines the rights of both sets. A set that has been created once is found again by its name; later changes to the default configuration do not change an existing set. However, a set can be edited in "Accessright Sets", which changes the rights of all kiosks of that type.
For an API key call, the rights of the key and of all its sets are merged and checked against the path and HTTP method of the call:
/rest/po/kiosks/4711) wird mit den Selektoren verglichen. Methode und benötigtes Privileg ergeben sich aus der obigen Tabelle.
FULL wirkt wie READ, CREATE, UPDATE und DELETE. Erlaubt ein Selektor UPDATE oder CREATE, ist READ für diesen Selektor mit erlaubt (sofern READ dort nicht abgelehnt ist).
Für Session-Aufrufe werden dieselben Regeln auf die Rechte der Rollen des Benutzers angewendet. Auch hier gilt: kein passendes Recht bedeutet 403.
FULL acts like READ, CREATE, UPDATE and DELETE. If a selector allows UPDATE or CREATE, READ is also allowed for that selector (unless READ is denied there).
For session calls, the same rules are applied to the rights of the user's roles. Here too, no matching right means 403.
An external terminal is to retrieve person data but change nothing. (The paths are examples; the Swagger UI shows the actual paths of an endpoint.)
Terminal nur lesen. Zeile hinzufügenread only.
/rest/po/persons/*, "PrivilegPrivilege" = READ, "AblehnenDeny" nicht gesetztnot checked. SpeichernSave.Terminal Eingang Wien; im Abschnitt "Api Key Zugriffsrecht-Sets" das Set "Terminal nur lesen" hinzufügen; speichern. Den angezeigten Schlüssel im Terminal als Header Main Entrance; add the set "Terminal read only" in the section "Api Key Access Right Sets"; save.
X-Auth-Token eintragen.
Ergebnis Result: GET /rest/po/persons/... wird beantwortet is answered. POST, PUT oder DELETE auf denselben Pfad sowie jeder Aufruf eines anderen Pfads liefern 403. Wird später der Zugriff entzogen, genügt es, das Set zu ändern oder den Key über "ungültig machen" zu sperren (401). Hinweis: Der Terminal-Key aus diesem Beispiel ist keinem Kiosk zugeordnet und kann daher keine Benutzer-Identifikation or DELETE on the same path, and every call to another path, return 403. If access is to be withdrawn later, it is enough to change the set or to block the key with "Invalidate" (401).
Note: The terminal key in this example is not assigned to a kiosk and therefore cannot use user identification (User-Identification-...) verwenden. Keys für Kiosks entstehen über die Kiosk-Verwaltung.
Antwort
mögliche Ursachen und Prüfung
401 (nicht authentifiziert)
X-Auth-Token fehlt oder ist leer und es gibt keine Session.
for kiosks are created through the kiosk administration.
|
Response |
Possible causes and what to check |
|
|---|---|---|
|
401 (not authenticated) |
|
|
|
403 (nicht berechtigt) | Der Key ist gültig, aber kein Recht passt auf Pfad und Methode, oder ein "Ablehnen"-Recht greift. Im API-Key die Sets und Rechte prüfen: stimmt der Selektor (beginnt mit
not authorized) |
|
|
In addition, the service logs a line of the form "Check if api key ... has permission to make a GET call over /rest/..." . Sie nennt Methode und Pfad des Aufrufs (Logger at debug level for every check. It names the method and path of the call (logger at.workflow.webdesk.po.impl.PoAccessRightServiceImpl).
allowedOriginsForCORS der Bean SecurityHeadersOptions (Maske
For calls from browsers originating from a different address, Webdesk sets the CORS headers. The allowed origins are defined in the system parameter allowedOriginsForCORS of the bean SecurityHeadersOptions (screen "Systemparameter"). Eine Anfrage mit passendem Origin erhält A request with a matching Origin receives Access-Control-Allow-Origin mit diesem Wert und with that value and Access-Control-Allow-Credentials: true. Einträge dürfen Entries may contain * enthalten, ze. Bg. https://app.example.com oder or https://*.example.com. Erlaubte Request-Header sind u. a. Allowed request headers include X-Auth-Token, User-Identification-NfcCard und and User-Identification-Useruid. Native Apps und Terminals senden keinen Origin-Header und sind davon nicht betroffen.
Achtung: Im ausgelieferten Standard ist die Liste leer. In diesem Fall wird jeder gesendete Origin unverändert zurückgegeben, d. h. es wird jeder Ursprung erlaubt. Für Systeme, die aus dem Internet erreichbar sind, sollten die erlaubten Ursprünge eingetragen werden.
login_process. Das ist bei der Bewertung von Sicherheitsthemen und beim Hinzufügen neuer POST-Endpunkte zu beachten.
LoginTokenUtils, z. B. für serverseitige Report-Downloads mit Benutzerwechsel) und der temporäre Zugriff über security-key liegen im Cache des jeweiligen Knotens. Im Cluster können Aufrufe, die auf einem anderen Knoten landen, deshalb scheitern, wenn die Requests nicht auf einen Knoten fixiert werden.
apps and terminals do not send an Origin header and are not affected.
Warning: In the delivered default the list is empty. In that case every Origin that is sent is returned unchanged, i.e. every origin is allowed. For systems reachable from the internet, the allowed origins should be entered.
login_process. Keep this in mind when assessing security topics and when adding new POST endpoints.
LoginTokenUtils, e.g. for server-side report downloads with user switching) and temporary access via security-key reside in the cache of the respective node. In a cluster, calls that land on another node can therefore fail unless requests are pinned to one node.
rest/swagger-ui/index.html mit den REST-Endpunkten von Webdesk, ihren Pfaden, Methoden und Parametern. Aufrufe aus der Swagger UI laufen mit der Sitzung des angemeldeten Benutzers. Zulässig sind sie für Systemadministratoren und für Benutzer, die über irgendeine ihrer Aktionen Zugriffsrechte auf den Endpunkt haben. Die Swagger UI eignet sich, um Pfade für Selektoren nachzuschlagen. Postman-Collection: Im Repository liegt in a new window, showing the REST endpoints of Webdesk with their paths, methods and parameters. Calls from the Swagger UI run with the session of the logged-in user. They are permitted for system administrators and for users who have access rights for the endpoint through any of their actions. The Swagger UI is useful for looking up paths for selectors.
postman/Webdesk - Public API.postman_collection.json. Sie enthält den Aufruf It contains the call "Login" (POST {{restURL}}/auth/login) sowie Beispielaufrufe zur Zeitwirtschaft (Abwesenheitsgründe, eigene Buchungen, aktueller Status, Buchung auslösen). Die Variable restURL ist in der Collection nicht vorbelegt und muss auf die REST-Basisadresse des Systems (Webdesk-Adresse mit Zusatz /rest) gesetzt werden. Die Collection verwendet die Anmeldung per Session, keine API-Keysand sample calls for time and attendance (absence reasons, own bookings, current state, performing a booking). The variable restURL is not preset in the collection and has to be set to the REST base address of the system (Webdesk address plus /rest). The collection uses the session login, not API keys.| Mime Type | text/xml | ![]() | text/xml |
| Datei-name | ![]() | ||
| Größe (in Bytes) | 23103 | ![]() | 21373 |
|
Version 1 von Gabriel Gruber
am 17.10.26 18:50:50 Name: REST-Zugriff: API-Keys und Zugriffsrechte Variante: main - en Status: Entwurf | ![]() |
Version 2 von Gabriel Gruber
am 17.10.26 18:51:28 Name: REST access: API keys and access rights Variante: main - en Status: Veröffentlichung |