DEENESPTFRRUARHIKOZHNL

struct ara::diag::SovdAuthorization::ValidateAuthorizationOutput

[SWS_DM_01927] Upstream: RS_Diag_04268

struct ValidateAuthorizationOutput {...};

Return type for ValidateAuthorization().

Header-Datei#include "ara/diag/sovd_authorization.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::SovdAuthorization

User GuideKI-GENERIERT

Bündelt das Ergebnis einer SOVD-Autorisierungsprüfung mit Client-Identität und Caching-Gültigkeitsdauer.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 6613e74c168c Herkunft Offene Fragen (2)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Bündelt das Ergebnis einer SOVD-Autorisierungsprüfung mit Client-Identität und Caching-Gültigkeitsdauer.

Die Struktur ara::diag::SovdAuthorization::ValidateAuthorizationOutput dient als Rückgabetyp der Autorisierungsprüfung ValidateAuthorization() im Modul diag [SWS_DM_01927]. Sie übermittelt die optionale Client-Identität zur Wiedererkennung und Aufrechterhaltung des Zugriffs auf temporäre Ressourcen wie Routinen oder Sperren [SWS_DM_01819] sowie den Gültigkeitszeitpunkt für das Zwischenspeichern der Validierung [SWS_DM_01820]. Bleibt das Identitätsfeld unbesetzt, erlischt der Zugriff auf geschützte Ressourcen, sobald das übermittelte Token abläuft oder ungültig wird [SWS_DM_01819].

Kontext

Die Struktur ara::diag::SovdAuthorization::ValidateAuthorizationOutput fungiert als standardisierter Rückgabetyp für die Operation ValidateAuthorization() im Modul diag der AUTOSAR Adaptive Platform [SWS_DM_01927] AUTOSAR_AP_SWS_Diagnostics §8.52.2 „Struct: ValidateAuthorizationOutput“. Sie dient als Schnittstellenelement zwischen der anwendungsseitigen Autorisierungslogik und dem Diagnostic Management bei serviceorientierten Diagnosezugriffen (SOVD). Sobald ein externer Diagnose-Client per SOVD-Token auf Fahrzeugressourcen zugreifen möchte, fordert das Diagnostic Management eine Validierung an. Die Struktur übermittelt zwei zentrale Ergebnisse dieser Prüfung: ein optionales Identifikationsmerkmal des Clients (identity) [SWS_DM_01819] sowie den Gültigkeitszeitpunkt für die Zwischenspeicherung der Autorisierung (validUntil) [SWS_DM_01820].

Lebenszyklus

Als Datenstruktur (Plain Struct) besitzt ValidateAuthorizationOutput einen transienten Lebenszyklus [SWS_DM_01927]. Sie wird von der anwendungsspezifischen Implementierung der Autorisierungsprüfung instanziiert, mit den Validierungsergebnissen befüllt und per Wert (Return-by-Value bzw. Move-Semantik) an das aufrufende Diagnostic Management übergeben. Die Struktur hält ihre Datenfelder identity vom Typ ara::core::Optional<ara::core::String> [SWS_DM_01819] und validUntil vom Typ std::chrono::system_clock::time_point [SWS_DM_01820] als direkte Membervariablen. Das Objekt selbst besitzt keine internen Zustände oder Zustandsübergänge, bestimmt jedoch über das Feld validUntil unmittelbar die Lebensdauer des im Diagnostic Management vorgehaltenen Autorisierungszustands (Caching) [SWS_DM_01820]. Hinsichtlich der Nebenläufigkeit dürfte die Instanz thread-lokal innerhalb des Validierungsaufrufs erzeugt werden; ein nebenläufiger schreibender Zugriff auf dieselbe Struktur ist nicht spezifiziert (Interpretation: Schutz vor Datenrennen obliegt der aufrufenden Umgebung). Frage Q-0579316b13023b31 (offen) Nach der Auswertung durch das Framework endet der Lebenszyklus der Strukturinstanz regulär beim Verlassen des Gültigkeitsbereichs.

Nutzungspfad

Der typische Ablauf zur Verwendung von ValidateAuthorizationOutput gliedert sich in folgende Schritte:

  • Anfrage empfangen: Ein externer Client sendet eine SOVD-Diagnoseanfrage mit einem Sicherheits-Token an das Diagnostic Management.
  • Validierung anfordern: Das Diagnostic Management leitet das Token über ValidateAuthorization() an die anwendungsspezifische Autorisierungsinstanz weiter.
  • Rückgabewert erstellen: Die Anwendung prüft das Token, instanziiert ValidateAuthorizationOutput und setzt validUntil auf den Zeitpunkt, bis zu dem diese Autorisierung wiederverwendet werden darf [SWS_DM_01820] AUTOSAR_AP_SWS_Diagnostics §8.52.2.1.2 „validUntil“.
  • Identität zuweisen: Sieht das Sicherheitskonzept eine Wiedererkennung vor, setzt die Anwendung das optionale Feld identity (z. B. client_id, sub oder eine Kombination) [SWS_DM_01819] AUTOSAR_AP_SWS_Diagnostics §8.52.2.1.1 „identity“.
  • Ergebnis auswerten: Das Diagnostic Management übernimmt das Struct, puffert das Validierungsergebnis bis validUntil und ordnet temporäre Ressourcen (wie laufende Diagnoseroutinen oder Sperren) der übergebenen Identität zu [SWS_DM_01819] [SWS_DM_01820].
Validierung von SOVD-ZugriffstokensSOVD-ClientDiagnostic ManagementSovdAuthorization-HandlerDiagnoseanfrage mit TokenValidateAuthorization(token)Erzeuge ValidateAuthorizationOutputValidateAuthorizationOutput(identity, validUntil)Cache Token bis validUntilVerknüpfe Ressourcen mit identityDiagnoseantwort

Sequenzdiagramm: Validierungsablauf und Rückgabe von ValidateAuthorizationOutput zur Autorisierungsprüfung und Pufferung. Quellen: [SWS_DM_01819], [SWS_DM_01820], [SWS_DM_01927].

Fehlerszenarien

Obwohl ValidateAuthorizationOutput als einfacher Datentyp keine eigenen Fehlercodes oder Exceptions wirft, führen fehlerhafte oder unvollständige Belegungen zu betrieblichen Fehlern:

  • Fehlende Client-Identität bei Token-Erneuerung: Wird identity nicht belegt (leeres Optional), greift der Client ausschließlich so lange auf temporäre Ressourcen zu, wie dasselbe Token vorliegt und validUntil nicht abgelaufen ist [SWS_DM_01819]. Erneuert der Client ein abgelaufenes Token, kann das Diagnostic Management ihn ohne gesetzte Identität nicht wiedererkennen; der Zugriff auf aktive Routinen oder bestehende Sperren geht verloren [SWS_DM_01819].
  • Ungültiger oder verfallener Zeitstempel: Liegt der in validUntil übergebene Zeitpunkt bereits in der Vergangenheit, dürfte eine Zwischenspeicherung im Diagnostic Management unmittelbar unterbleiben (Interpretation: Jede nachfolgende Client-Anfrage erzwingt einen erneuten Validierungsaufruf). Frage Q-c715941f9302fd13 (offen)
  • Identitätskollision: Gibt die Autorisierungsanwendung versehentlich identische Identitätsstrings für unterschiedliche Clients zurück, stuft das Diagnostic Management diese als identisch ein [SWS_DM_01819], was zur unberechtigten Übernahme von Sperren und temporären Ressourcen führen kann.

Dieser Leitfaden wurde durch eine KI auf Basis der Spezifikation AUTOSAR Adaptive Platform R25-11 (Modul diag) kuratiert.

UML-Klassendiagramm

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__SovdAuthorization__ValidateAuthorizationOutput846 «struct» ValidateAuthorizationOutput + identity + validUntil

Konstanten

identity variable

Identity of the client. This identity string if present will be used to re-identify a client even if it uses a new token (e.g. because the old one expired) so that it has access to the temporary resources (e.g. running routines, locks, etc.). If the identity string is the same as one returned earlier, the client will be considered identical. Depending on the security concept it could be for example the ’client_id’, the ’sub’, or a combination of both. If the identity string is not provided, the client will only have access to the temporary resources as long as it provides the same access token and validUntil is not yet expired.

validUntil variable

Time until this validation may be reused. The point in time until which the authentication state may be reused if the same token is provided by the client (caching).

Dokumentation der Konstanten / Variablen

variable identity [SWS_DM_01819] Upstream: RS_Diag_04268

ara::core::Optional<ara::core::String> identity;

Identity of the client. This identity string if present will be used to re-identify a client even if it uses a new token (e.g. because the old one expired) so that it has access to the temporary resources (e.g. running routines, locks, etc.). If the identity string is the same as one returned earlier, the client will be considered identical. Depending on the security concept it could be for example the ’client_id’, the ’sub’, or a combination of both. If the identity string is not provided, the client will only have access to the temporary resources as long as it provides the same access token and validUntil is not yet expired.

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopestruct ara::diag::SovdAuthorization::ValidateAuthorizationOutput
Symbolidentity
Typara::core::Optional< ara::core::String >

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_01819
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01819@rel:R25-11#8dd34307
Content hash
8dd34307
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01819
Status: valid/unmigrated Version: rel:R25-11#4cf57b0a Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01819@rel:R25-11#4cf57b0a
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#8dd343072026-09-30
  • R23-11rel:R23-11#7d3b6a842026-10-14
  • R24-11rel:R24-11#4cf57b0a2026-10-14
  • R25-11rel:R25-11#4cf57b0a2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

variable validUntil [SWS_DM_01820] Upstream: RS_Diag_04268

std::chrono::system_clock::time_point validUntil;

Time until this validation may be reused. The point in time until which the authentication state may be reused if the same token is provided by the client (caching).

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopestruct ara::diag::SovdAuthorization::ValidateAuthorizationOutput
SymbolvalidUntil
Typstd::chrono::system_clock::time_point

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_01820
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01820@rel:R25-11#530250dc
Content hash
530250dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01820
Status: valid/unmigrated Version: rel:R25-11#bd4ad359 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01820@rel:R25-11#bd4ad359
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#530250dc2026-09-30
  • R23-11rel:R23-11#bd4ad3592026-10-14
  • R24-11rel:R24-11#bd4ad3592026-10-14
  • R25-11rel:R25-11#bd4ad3592026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill