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 GuideAI-GENERATED

Bundles the result of a SOVD authorization check with client identity and caching validity period.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6613e74c168c Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Bundles the result of a SOVD authorization check with client identity and caching validity period.

The struct ara::diag::SovdAuthorization::ValidateAuthorizationOutput serves as the return type of the authorization check ValidateAuthorization() in module diag [SWS_DM_01927]. It conveys the optional client identity for recognizing the client and maintaining access to temporary resources such as routines or locks [SWS_DM_01819] as well as the validity timestamp for caching the validation [SWS_DM_01820]. If the identity field remains unpopulated, access to protected resources expires as soon as the transmitted token expires or becomes invalid [SWS_DM_01819].

Context

The struct ara::diag::SovdAuthorization::ValidateAuthorizationOutput functions as a standardized return type for the operation ValidateAuthorization() in module diag of the AUTOSAR Adaptive Platform [SWS_DM_01927] AUTOSAR_AP_SWS_Diagnostics §8.52.2 “Struct: ValidateAuthorizationOutput”. It serves as an interface element between the application-side authorization logic and Diagnostic Management during service-oriented diagnostic accesses (SOVD). As soon as an external diagnostic client wishes to access vehicle resources via a SOVD token, Diagnostic Management requests a validation. The struct transmits two central results of this check: an optional identifier of the client (identity) [SWS_DM_01819] as well as the validity timestamp for caching the authorization (validUntil) [SWS_DM_01820].

Lifecycle

As a data structure (plain struct), ValidateAuthorizationOutput has a transient lifecycle [SWS_DM_01927]. It is instantiated by the application-specific implementation of the authorization check, populated with the validation results, and passed by value (return-by-value or move semantics) to the calling Diagnostic Management. The structure holds its data fields identity of type ara::core::Optional<ara::core::String> [SWS_DM_01819] and validUntil of type std::chrono::system_clock::time_point [SWS_DM_01820] as direct member variables. The object itself has no internal states or state transitions, but via the field validUntil it directly determines the lifetime of the authorization state maintained (cached) in Diagnostic Management [SWS_DM_01820]. Regarding concurrency, the instance is likely created thread-locally within the validation call; concurrent write access to the same structure is not specified (interpretation: protection against data races is the responsibility of the calling environment). Question Q-0579316b13023b31 (open) After evaluation by the framework, the lifecycle of the structure instance regularly ends upon leaving the scope.

Usage Path

The typical sequence for using ValidateAuthorizationOutput is divided into the following steps:

  • Receive request: An external client sends an SOVD diagnostic request with a security token to Diagnostic Management.
  • Request validation: Diagnostic Management forwards the token to the application-specific authorization instance via ValidateAuthorization().
  • Create return value: The application validates the token, instantiates ValidateAuthorizationOutput, and sets validUntil to the point in time up to which this authorization may be reused [SWS_DM_01820] AUTOSAR_AP_SWS_Diagnostics §8.52.2.1.2 “validUntil”.
  • Assign identity: If the security concept provides for recognition, the application sets the optional field identity (e.g., client_id, sub, or a combination) [SWS_DM_01819] AUTOSAR_AP_SWS_Diagnostics §8.52.2.1.1 “identity”.
  • Evaluate result: Diagnostic Management takes over the struct, buffers the validation result until validUntil, and associates temporary resources (such as running diagnostic routines or locks) with the passed identity [SWS_DM_01819] [SWS_DM_01820].
Validierung von SOVD-ZugriffstokensSOVD-ClientDiagnostic ManagementSovdAuthorization-HandlerDiagnostic request with tokenValidateAuthorization(token)Erzeuge ValidateAuthorizationOutputValidateAuthorizationOutput(identity, validUntil)Cache Token bis validUntilLink resources with identityDiagnoseantwort

Sequence diagram: Validation sequence and return of ValidateAuthorizationOutput for authorization checking and buffering. Sources: [SWS_DM_01819], [SWS_DM_01820], [SWS_DM_01927].

Error Scenarios

Although ValidateAuthorizationOutput as a simple data type does not throw its own exceptions or return error codes, incorrect or incomplete assignments lead to operational errors:

  • Missing client identity upon token renewal: If identity is not set (empty optional), the client accesses temporary resources only as long as the same token is present and validUntil has not expired [SWS_DM_01819]. If the client renews an expired token, Diagnostic Management cannot recognize it without a set identity; access to active routines or existing locks is lost [SWS_DM_01819].
  • Invalid or expired timestamp: If the point in time passed in validUntil is already in the past, caching in Diagnostic Management is likely omitted immediately (interpretation: each subsequent client request forces a new validation call). Question Q-c715941f9302fd13 (open)
  • Identity collision: If the authorization application inadvertently returns identical identity strings for different clients, Diagnostic Management classifies them as identical [SWS_DM_01819], which can lead to unauthorized takeover of locks and temporary resources.

This guide was curated by an AI based on the AUTOSAR Adaptive Platform R25-11 specification (module diag).

UML class diagram

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

G nara__diag__SovdAuthorization__ValidateAuthorizationOutput846 «struct» ValidateAuthorizationOutput + identity + validUntil

Constants

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).

Documentation of constants / variables

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