Enables applications to generate and verify proximity challenges for protected SOVD diagnostic operations.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7c7c088635a6ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables applications to generate and verify proximity challenges for protected SOVD diagnostic operations.
In the AUTOSAR Adaptive Platform, the interface class serves to implement proximity checks for SOVD operations in the diagnostic environment [SWS_DM_01481]. Applications derive from the class, activate forwarding by Diagnostic Management via Offer(), and provide the requested challenge as well as its subsequent validation asynchronously [SWS_DM_01478]. Concurrent calls to the validation methods follow the concurrency mode selected during construction, whereas registration and destruction are not thread-safe.
Context
In the AUTOSAR Adaptive Platform, the class ara::diag::SovdProximityChallenge[SWS_DM_01481] serves for the application-side implementation of the interface for proximity challenges in the Service-Oriented Vehicle Diagnostics (SOVD) environment. It forms the bridge between AUTOSAR Diagnostic Management (DM or Diagnostic Server) and the actual vehicle application, which provides the security logic for physical or cryptographic proximity checks AUTOSAR_AP_SWS_Diagnostics §8.56 “Providing the SOVD operation proximity_challenge”. If an SOVD operation is configured to require a proximity challenge (attribute proximityProofRequired is TRUE), Diagnostic Management requests a challenge from the application when processing a diagnostic request and has the response transmitted by the client verified [SWS_DM_01398]. Three main parties are involved in this association: the external SOVD client, the mediating Diagnostic Management, and the using application.
Instantiation of the handler class takes place via the constructor SovdProximityChallenge[SWS_DM_01480]. This binds the instance to an ara::core::InstanceSpecifier defined in the manifest and specifies via the parameter ConcurrencyType whether subsequent execution is concurrent (kConcurrent) or sequential (kNotConcurrent). The constructor itself is specified as thread-safe [SWS_DM_01480]. After object creation, the handler is initially in a passive state. Diagnostic Management is only authorized to forward requests to the application instance through the explicit call to Offer()[SWS_DM_01478].
Forwarding can be deactivated again at any time using StopOffer()[SWS_DM_01495]. Neither Offer(), StopOffer() nor the virtual destructor ~SovdProximityChallenge()[SWS_DM_01479] are thread-safe. Interpretation: Prior to destroying the object, it may be necessary to call StopOffer() to prevent forwarding to an object that is being torn down. Question Q-b4c66854163f433e (open) In addition, in practice, an application instance is typically held throughout the entire runtime of the diagnostic process to continuously secure SOVD operations. The thread safety of the actual query and validation methods GetChallenge()[SWS_DM_01494] and ValidateResponse()[SWS_DM_01493] is controlled by the ConcurrencyType passed in the constructor.
Usage Path
After successful initialization and service offering using Offer()[SWS_DM_01478], the class responds to requests from Diagnostic Management. If an SOVD client requests a protected operation, the DM calls the pure virtual method GetChallenge()[SWS_DM_01494]. The application generates the proximity token and returns it asynchronously together with the validity time (valid_until) via a ara::core::Future<SovdProximityChallengeType>[SWS_DM_01494]. By default, it is assumed that only a single challenge exists at any time that is valid for all clients and operations, with its lifetime typically being fixed (e.g., to two minutes) AUTOSAR_AP_SWS_Diagnostics §8.56 “Providing the SOVD operation proximity_challenge”. For more complex scenarios, the application can evaluate the passed ara::diag::MetaInfo object in order to perform client- or operation-specific checks AUTOSAR_AP_SWS_Diagnostics §8.56 “Providing the SOVD operation proximity_challenge”.
Diagnostic Management transmits the attribute proximity_challenge in the response body to the client [SWS_DM_01398]. If the client responds with a proximity challenge, the DM forwards this data via ValidateResponse()[SWS_DM_01493]. The passed memory area proximityResponse remains valid until the returned ara::core::Future<ProximityChallengeValidationResultType> is fulfilled or processing is canceled [SWS_DM_01493]. Before shutting down the process, the service is deregistered via StopOffer()[SWS_DM_01495].
Already during object creation via the constructor [SWS_DM_01480], the framework checks model consistency and can report the following violations: InstanceSpecifierMappingIntegrityViolation (the identifier cannot be resolved or does not point to a port prototype), PortInterfaceMappingViolation (the port prototype is not typed as DiagnosticSovdProximityChallengeInterface), ProcessMappingViolation (no matching modeled process found), or InstanceSpecifierAlreadyInUseViolation (the identifier is already used in the process) [SWS_DM_01480].
When calling Offer()[SWS_DM_01478], the resulting ara::core::Result<void> returns standardized error codes in case of an error: DiagOfferErrc::kAlreadyOffered if the service is already actively offered for this port, or DiagOfferErrc::kConfigurationMismatch if the monitor configuration does not match the DEXT. No standardized error codes are defined for GetChallenge()[SWS_DM_01494] and ValidateResponse()[SWS_DM_01493]. All member functions of the class are declared as noexcept and guarantee exception safety.
This guide is based on the specification AUTOSAR Adaptive Platform Release R25-11.
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: f009f89ccf76ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The synchronous method Offer of class ara::diag::SovdProximityChallenge (defined in #include "ara/diag/sovd_proximity_challenge.h") registers the handler with Diagnostic Management (DM) and enables it to forward incoming request messages to the handler instance [SWS_DM_01478]. The call is parameterless and specified with noexcept[SWS_DM_01478].
ara::core::Result<void> serves as the return value [SWS_DM_01478]. In case of error, the method returns a specific error code with rollback semantics [SWS_DM_01478]:
DiagOfferErrc::kAlreadyOffered: The service has already been offered via the instance [SWS_DM_01478].
DiagOfferErrc::kConfigurationMismatch: The configuration of the handler does not match the DEXT data [SWS_DM_01478].
Regarding execution safety, the method is declared as exception safe, but is explicitly considered not thread-safe[SWS_DM_01478]. Concurrent calls on the same instance must therefore be synchronized by the calling application. The offering pattern complies with the uniform activation principle of DM handlers, as used among others in ara::diag::GenericRoutine[SWS_DM_00557], ara::diag::GenericUDSService[SWS_DM_00619], and ara::diag::CommunicationControl[SWS_DM_00809]. Interpretation: As long as Offer has not been executed successfully, the DM presumably does not forward requests for the proximity challenge to the handler. Question Q-320a80aca81ef460 (open)
This usage note was generated automatically based on AUTOSAR R25-11.
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 DiagnosticSovdProximityChallengePortMapping needs to be typed by a DiagnosticSovdProximityChallengeInterface. 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 DiagnosticSovdProximityChallengeInterface 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: d973f1eccf91ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Method StopOffer of class ara::diag::SovdProximityChallenge disables the forwarding of request messages from Diagnostic Management (DM) to this service instance ([SWS_DM_01495]). The interface is provided via header ara/diag/sovd_proximity_challenge.h.
Usage and Execution Context
The function is called synchronously, accepts no input parameters, and has no return value ([SWS_DM_01495]). After execution, the DM no longer forwards any further requests for the proximity challenge to the application.
Error Handling and Exception Safety
The method is declared as noexcept and completely exception safe (exception safe) ([SWS_DM_01495]). Error states or specific error codes are not provided for this call.
Concurrency and Lifecycle
Regarding execution, StopOffer is explicitly specified as not thread-safe (not thread-safe) ([SWS_DM_01495]). Concurrent calls on the same instance must be synchronized on the caller side. Interpretation: The call is likely to occur typically during shutdown of the component or when proximity challenge verification is temporarily suspended. Question Q-7b8910a8d5f6dc05 (open)
This function validates the proximity response sent by the client.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0179eb4520d7ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The pure virtual method ara::diag::SovdProximityChallenge::ValidateResponse serves to validate a proximity response transmitted by the client [SWS_DM_01493]. The Diagnostic Server instance calls this method as soon as an SOVD request body contains the attribute proximity_response[SWS_DM_01395], such as in requests to terminate an operation execution [SWS_DM_01391]. Passed are the byte span proximityResponse and the context object metaInfo[SWS_DM_01493]. The latter allows the application to carry out client- or operation-specific checks if needed SWS Diagnostics p. 215. The validation result is provided asynchronously via a ara::core::Future<ProximityChallengeValidationResultType>[SWS_DM_01493].
The interface is declared as noexcept and exception safe (exception safe) [SWS_DM_01493]. No standardized error codes are specified [SWS_DM_01493]. Interpretation: A failure of the proximity validation is likely to be mapped via the return type ProximityChallengeValidationResultType or the error channel of the future. Question Q-1be6378537b59f2b (open)
Regarding concurrency, thread safety is conditional (conditional): whether the implementation must be thread-safe is controlled via the ConcurrencyType defined in the constructor [SWS_DM_01493]. The passed data in buffer proximityResponse remains valid until the associated promise is fulfilled or processing is canceled by a CancellationHandler [SWS_DM_01493].
The function interacts with the provision of the challenge via GetChallenge[SWS_DM_01398]. Only after successful validation of the proximity response does the server execute requested actions, such as terminating an operation via Terminate on the SovdOperationExecution[SWS_DM_02179].
This usage note was generated automatically based on the AUTOSAR Adaptive R25-11 specification.
gemini-3.8-flash-low· 2026-10-13 · German original