Bundles the result of a SOVD authorization check with client identity and caching validity period.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6613e74c168cProvenanceOpen 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().
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].
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.
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.
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).
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.
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).
gemini-3.8-flash-low· 2026-10-13 · German original