Enables applications to validate SOVD tokens and to provide authorization and token URLs.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 49d1f84283f8ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables applications to validate SOVD tokens and to provide authorization and token URLs.
The class ara::diag::SovdAuthorization serves applications for implementing SOVD authorization interfaces toward the Diagnostic Server ([SWS_DM_01490]). It provides methods for determining redirect URLs for authorization and token endpoints as well as for checking access tokens ([SWS_DM_01483]). Message reception must be explicitly enabled with Offer() after instantiation, and the passed authentication object must no longer be used after the validation result has been provided.
Context
The class ara::diag::SovdAuthorization provides the adaptive application interface to provide authorization and authentication mechanisms for Service-Oriented Vehicle Diagnostics (SOVD) ([SWS_DM_01490]). Within the diagnostics architecture, it mediates between the Diagnostic Server of Diagnostic Management (DM) and the individual authorization logic of the vehicle application (SWS Diagnostics §7.3.3.2 “SOVD Request Validation and Verification”). When an external SOVD client queries endpoints for client verification or for retrieving tokens, the Diagnostic Server forwards these requests to the application to determine the destination URLs ([SWS_DM_01471], [SWS_DM_01472]). For incoming diagnostic requests with an HTTP authorization header, the class checks the validity of the token and defines assigned access roles ([SWS_DM_01470]). The actual validation against an authorization server (such as OAuth 2.0) is likely to occur as an application-specific interpretation via external network protocols, since AUTOSAR standardizes the local application handoff point here. Question Q-6ce702103e4966c7 (open)
The instantiation of ara::diag::SovdAuthorization occurs explicitly via the constructor specifying an ara::core::InstanceSpecifier as well as the concurrency mode ConcurrencyType ([SWS_DM_01489]). In the manifest, the InstanceSpecifier must reference a valid PortPrototype of an DiagnosticSovdAuthorizationInterface. Via the ConcurrencyType (kConcurrent or kNotConcurrent), it is determined whether the implemented callback methods of the application must be designed to be thread-safe ([SWS_DM_01483], [SWS_DM_01484], [SWS_DM_01485]).
After construction, the Diagnostic Server does not forward requests until the application has successfully called the method Offer() ([SWS_DM_01487]). Interpretation: Requests arriving before the Offer() are presumably discarded by the server or rejected with an error. Question Q-84330742a61f91a7 (open) To stop the forwarding of requests, the application calls StopOffer() ([SWS_DM_01486]). Finally, the object is released via the virtual destructor ([SWS_DM_01488]). The administrative calls SovdAuthorization, Offer, StopOffer and the destructor are not thread-safe.
Usage Path
During ongoing operation, two main interaction paths occur: the provisioning of redirect URLs and the validation of active session tokens. If an SOVD client sends a query for client verification or for requesting a token, the DM calls GetAuthorizationUrl() ([SWS_DM_01485]) or GetTokenUrl() ([SWS_DM_01484]), respectively. The application evaluates the passed queryParameters as well as the metaInfo and returns the destination URL asynchronously as ara::core::Future<ara::core::String>, whereupon the DM responds with an HTTP 307 (Temporary Redirect) ([SWS_DM_01471], [SWS_DM_01472]).
If a subsequent SOVD request contains a new or modified HTTP Authorization header, the Diagnostic Server calls ValidateAuthorization() ([SWS_DM_01470], [SWS_DM_01483]). The application validates the passed token, assigns the corresponding authorization roles to the referenced object ara::diag::ClientAuthentication ([SWS_DM_01469]), and returns a ValidateAuthorizationOutput via the Future. Important precondition: As soon as the Future is available, the application must no longer use the referenced ClientAuthentication object ([SWS_DM_01483]). The DM uses the return values (validity duration validUntil and identity) to map subsequent requests of the same client without re-validation ([SWS_DM_01781], [SWS_DM_01782]), which is required in particular for SOVD resource locks ([SWS_DM_01783]).
Errors are mapped via ara::core::Result or within the returned ara::core::Future:
Initialization and modeling errors: If instantiation fails, violations are reported, such as InstanceSpecifierMappingIntegrityViolation (invalid model element), PortInterfaceMappingViolation (incorrect interface type), ProcessMappingViolation (missing process reference), or InstanceSpecifierAlreadyInUseViolation ([SWS_DM_01489]).
Offer release errors: In the event of an error, Offer() returns DiagOfferErrc::kAlreadyOffered if the service is already active, or DiagOfferErrc::kConfigurationMismatch if the configuration does not match the DEXT data ([SWS_DM_01487]).
Errors during token validation: If a token cannot be verified, ValidateAuthorization() returns DiagSovdErrc::kInvalidAccessToken (invalid token) or DiagSovdErrc::kTemporarilyNotAvailable (e.g., if the authentication server is not reachable for online verification) via the future ([SWS_DM_01483]).
URL determination: No standardized error codes are defined for GetAuthorizationUrl() and GetTokenUrl() ([SWS_DM_01484], [SWS_DM_01485]).
This guide is based exclusively on the specifications of AUTOSAR Release R25-11.
Get the URL that the SOVD client shall use for authorization. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s authorize endpoint.
Get the URL that the SOVD client shall use to request a token. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s token endpoint.
This function validates the authorization token sent by the SOVD client. The application shall validate the authorization token according to the authorization protocol used in the system and then according to the outcome set the respective roles as authorized in the clientAuthentication that is passed as parameter. If OAuth 2.0 is used, this would implement the validation that is supposed to happen in the Resource Server.
Get the URL that the SOVD client shall use for authorization. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s authorize endpoint.
Get the URL that the SOVD client shall use to request a token. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s token endpoint.
This Offer will enable the DM to forward request messages to this handler.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0834519262c7Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The synchronous member function Offer of class ara::diag::SovdAuthorization enables the forwarding of request messages by Diagnostic Management (DM) to the associated handler instance [SWS_DM_01487]. It accepts no parameters and returns a ara::core::Result<void>, which confirms the successful call or reports an error that occurred [SWS_DM_01487].
Regarding error handling, [SWS_DM_01487] specifies two concrete error codes from DiagOfferErrc with rollback semantics:
DiagOfferErrc::kAlreadyOffered: Occurs when the service is already offered for this instance [SWS_DM_01487].
DiagOfferErrc::kConfigurationMismatch: Reports that the configuration does not match the DEXT description data [SWS_DM_01487].
Regarding execution properties, the call is declared as exception safe (exception safe), but is considered not thread-safe (not thread-safe) [SWS_DM_01487]. The function must therefore not be called concurrently for the same instance.
In interaction with the DM, the function complies with the general offering pattern of the AUTOSAR Adaptive diagnostic interfaces, as also used for generic routines or DoIP services (for example [SWS_DM_00557], [SWS_DM_00725], or [SWS_DM_00809]). As long as a handler has not been registered via Offer, the DM does not forward requests to the application or serves them with predefined replacement values [SWS_DM_01487], [SWS_DM_01525], [SWS_DM_01527].
This text was created by an AI. All statements are based exclusively on the provided specification excerpt.
InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is referenced by a pingViolation DiagnosticSovdAuthorizationPortMapping needs to be typed by a DiagnosticSovdAuthorizationInterface. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.
Parameter (in)
Parameter
Beschreibung
instanceSpecifier
InstanceSpecifier to a PortPrototype of a DiagnosticSovdAuthorizationInterface service instance in the manifest.
concurrencyType
Specifies if the interface is implemented as thread safe ( kConcurrent) or non-thread safe (kNotConcurrent).
Request a governed re-review of this record. The record is not changed immediately.
This StopOffer will disable the forwarding of request messages from DM.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c318a30e32adProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
Method StopOffer of class ara::diag::SovdAuthorization (header ara/diag/sovd_authorization.h) is used to prevent the forwarding of incoming diagnostic requests from Diagnostic Management (DM) to the authorization service [SWS_DM_01486]. The function has the signature void StopOffer() noexcept. It accepts no parameters and returns no return value to the caller [SWS_DM_01486].
Error Handling and Concurrency
The function is specified as exception safe (exception safe) and throws no exceptions [SWS_DM_01486]. Specific error codes as well as error reports to DET or DEM are not provided for this call. Regarding concurrency, the method is classified as not thread-safe (not thread-safe) [SWS_DM_01486]. If multiple threads use the same instance context, access must be synchronized by the calling application. Interpretation: A call is likely to occur primarily during an orderly shutdown of the application or when authorization readiness is temporarily revoked. Question Q-6c81f2dc7ee903ca (open)
Interaction
The concept follows the general design pattern for interfaces in AUTOSAR Adaptive diagnostics: The designation StopOffer was chosen based on the service interfaces of ara::com, but represents an independent implementation within ara::diagAUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”. The same disabling semantics can be found module-wide in many other port interfaces, for example in GenericRoutine[SWS_DM_00558], Authentication[SWS_DM_01131], CommunicationControl[SWS_DM_00810], and Monitor[SWS_DM_01089].
This usage note was generated automatically based on the specification AUTOSAR AP R25-11.
This function validates the authorization token sent by the SOVD client. The application shall validate the authorization token according to the authorization protocol used in the system and then according to the outcome set the respective roles as authorized in the clientAuthentication that is passed as parameter. If OAuth 2.0 is used, this would implement the validation that is supposed to happen in the Resource Server.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 78d8310937f8Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The pure virtual method ValidateAuthorization is called by the diagnostic server when a request from an SOVD client contains an Authorization HTTP header and its token is not yet validly validated [SWS_DM_01470]. The application verifies the transmitted authorization token according to the protocol configured in the system (for example OAuth 2.0 in the context of a Resource Server) and assigns the corresponding roles to the client [SWS_DM_01483].
token (ara::core::StringView): The access token transmitted from the HTTP header [SWS_DM_01483].
metaInfo (const MetaInfo&): Meta-information of the diagnostic service port [SWS_DM_01483].
clientAuthentication (ClientAuthentication&): Object via which the application sets the authenticated roles of the SOVD client [SWS_DM_01483]. After providing the returned Future, the application must no longer use this reference [SWS_DM_01483].
Return value: A ara::core::Future<ValidateAuthorizationOutput>[SWS_DM_01483]. Upon successful validation, the structure ValidateAuthorizationOutput[SWS_DM_01927] contains the validity timestamp validUntil[SWS_DM_01820] as well as the client identifier identity[SWS_DM_01819].
The Diagnostic Server considers assigned roles for requests with an identical token as authenticated until reaching validUntil[SWS_DM_01469] and recognizes the SOVD client again based on the token or identity [SWS_DM_01781][SWS_DM_01782]. This recognition is required, among other things, for temporary operations and SOVD locks, since unauthenticated clients are denied lock access with HTTP 401 [SWS_DM_01783].
In the event of an error, the Future is resolved with DiagSovdErrc::kInvalidAccessToken (invalid token) or DiagSovdErrc::kTemporarilyNotAvailable (e.g. authentication server temporarily unreachable) [SWS_DM_01483]. The function is specified as noexcept and exception safe; whether the implementation must be thread-safe is controlled via the ConcurrencyType passed in the constructor [SWS_DM_01483].
This usage note was generated by an AI; only the AUTOSAR specification is binding.
conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor
Parameter (in)
Parameter
Beschreibung
token
The authorization token sent by the SOVD client in the HTTP Authorization header.
metaInfo
The meta information of a diagnostic service port.
clientAuthentication
Object used by the application to report the authenticated state of the SOVD client. After the returned Future is ready, the referenced object shall not be used any more by the application.
rollback_semantics The request currently can’t be served, e.g. in case the access token currently can’t be verified (e.g. because online verification is needed and the authentication server can’t be reached).
Request a governed re-review of this record. The record is not changed immediately.
gemini-3.8-flash-low· 2026-10-13 · German original