DEENESPTFRRUARHIKOZHNL

class ara::diag::ClientAuthentication

[SWS_DM_01132] Upstream: RS_Diag_04251

class ClientAuthentication final {...};

Interface for the application to inform the Diagnostic Server instance about the authentication states and the user roles that are currently authenticated.

Header-Datei#include "ara/diag/client_authentication.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

User GuideAI-GENERATED

Serves the application to report authentication states and active user roles to the Diagnostic Server.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 426d68eb26e1 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves the application to report authentication states and active user roles to the Diagnostic Server.

The interface allows the application to inform the Diagnostic Server about the authentication status as well as active user roles of a diagnostic client [SWS_DM_01132]. Via calls such as Authenticate or OverrideDefaultRoles, state transitions are controlled and handles for managing dynamic access lists are provided [SWS_DM_01206]. State changes as a result of timeouts can be monitored asynchronously via a notifier. Since the class is not thread-safe and does not allow copies, access within the application must be synchronized.

Context

The class ara::diag::ClientAuthentication serves as a central interface for the application to notify the Diagnostic Server instance about authentication states and the currently authenticated user roles [SWS_DM_01132], SWS Diagnostics, p. 129. Three key parties are involved in this interaction:

  • Application: Performs authentication checks—either using interfaces of the Diagnostic Server or via application-specific mechanisms—and transmits user roles to the Diagnostic Server [SWS_DM_01142].
  • Diagnostic Server / Diagnostic Manager: Manages diagnostic sessions and enforces access rights to diagnostic resources based on roles and authentication status [SWS_DM_01206].
  • Diagnostic Client: An external tester or SOVD client that directs diagnostic requests to the ECU [SWS_DM_01210], [SWS_DM_01470].

The number of instances of ClientAuthentication is determined by the model element DiagnosticExternalAuthenticationIdentification SWS Diagnostics, p. 129. This element allows configuring authentication for a client with a fixed source address or via an address range if the final source address is not yet known at compile time SWS Diagnostics, p. 129. Interpretation: Mapping of diagnostic clients to concrete instances of ClientAuthentication takes place at runtime based on these source address ranges. Question Q-6cc7e791e678def2 (open) In the case of SOVD clients, the Diagnostic Server passes a ClientAuthentication object directly to the application during authorization token validation via ara::diag::SovdAuthorization::ValidateAuthorization [SWS_DM_01470].

Application Application ClientAuthentication ClientAuthentication Application->ClientAuthentication Get / Authenticate DiagnosticServer DiagnosticServer ClientAuthentication->DiagnosticServer Zustandsmeldung DiagnosticClient DiagnosticClient DiagnosticClient->DiagnosticServer Diagnoseanfrage

Context diagram: Interaction partners of the authentication interface. Sources: [SWS_DM_01132], [SWS_DM_01202], [SWS_DM_01470], SWS Diagnostics, p. 129

Lifecycle

The application receives an instance of ClientAuthentication via overloaded methods of ara::diag::ExternalAuthentication::Get [SWS_DM_01202] or in the context of SOVD token validation [SWS_DM_01470]. The class features strict ownership semantics: copy constructor [SWS_DM_01139] and copy assignment operator [SWS_DM_01140] are deleted (=delete). Move operations (move constructor [SWS_DM_01137] and move assignment operator [SWS_DM_01138]) are predefined as default and declared as noexcept. The destructor is likewise noexcept [SWS_DM_01136]. All member functions as well as the destructor are not thread-safe (not thread-safe) [SWS_DM_01136], [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143], [SWS_DM_01144].

The authentication status is represented via the enumeration type DiagnosticAuthState [SWS_DM_01133]:

  • kDeAuthenticated (0x00): No diagnostic client is authenticated. At system startup, the client is in this state by default [SWS_DM_01205]. Here, those roles (DiagnosticAuthRole) whose attribute isDefault is configured to TRUE are considered default roles [SWS_DM_01204], [SWS_DM_01134]. Via OverrideDefaultRoles, these default roles can be temporarily overridden for a defined timeout [SWS_DM_01141], [SWS_DM_01209].
  • kAuthenticated (0x01): A diagnostic client is authenticated. This state is reached by calling Authenticate, thereby activating the passed user roles in the Diagnostic Server [SWS_DM_01142], [SWS_DM_01206].

An automatic state transition from kAuthenticated back to kDeAuthenticated is triggered if a client in the default session sends no further requests after the last transmission confirmation (TransmitConfirmation) and the inactivity time expires [SWS_DM_01210], or if an S3 timeout occurs [SWS_DM_01144], [SWS_DM_02077].

kDeAuthenticated kDeAuthenticated kDeAuthenticated->kDeAuthenticated OverrideDefaultRoles() kAuthenticated kAuthenticated kDeAuthenticated->kAuthenticated Authenticate() kAuthenticated->kDeAuthenticated Inaktivitaet / S3-Timeout

State diagram: Lifecycle and state transitions of client authentication. Sources: [SWS_DM_01133], [SWS_DM_01204], [SWS_DM_01205], [SWS_DM_01206], [SWS_DM_01209], [SWS_DM_01210]

Usage Path

The regular sequence for managing client authentication comprises the following steps:

  1. Register notifier: The application registers a callback function of type ClientAuthenticationSetNotifier (std::function<void(DiagnosticAuthState)>) with SetNotifier [SWS_DM_01144], [SWS_DM_02077]. This informs it when status changes occur—such as the transition to kDeAuthenticated due to inactivity or an S3 timeout [SWS_DM_01144]. A renewed call overwrites the previously set notifier [SWS_DM_01144].
  2. Query state: Via the method GetState(), the application can synchronously query the current authentication state of the client [SWS_DM_01143].
  3. Report authentication: As soon as authentication has been successfully completed, the application calls Authenticate with the user roles to be activated (ara::core::Vector<DiagnosticAuthRole>) [SWS_DM_01142], [SWS_DM_01134]. The Diagnostic Server sets the state to kAuthenticated and returns a ClientAuthenticationHandle [SWS_DM_01206].
  4. Manage access rights: Via the obtained ClientAuthenticationHandle, the application can configure the dynamic access list (DynamicAccessList) for the client [SWS_DM_01213], SWS Diagnostics, p. 132. At the same time, using this handle refreshes the client's inactivity time window SWS Diagnostics, p. 133.

If the client is in state kDeAuthenticated, the application can instead call OverrideDefaultRoles(defaultRoles, timeout) to temporarily activate alternative default roles; on success, this call also returns a ClientAuthenticationHandle [SWS_DM_01141], [SWS_DM_01209].

Authentication sequence and rights managementApplicationClientAuthenticationDiagnosticServerSetNotifier(notifier)Result<void>Authenticate(userRoles)Set status kAuthenticated and rolesBestaetigung & HandleResult<ClientAuthenticationHandle>optClient-Inaktivitaet in Standard-Session / S3-TimeoutWechsel zu kDeAuthenticatednotifier(kDeAuthenticated)

Sequence diagram: Call and notification flow during authentication. Sources: [SWS_DM_01142], [SWS_DM_01144], [SWS_DM_01206], [SWS_DM_01210]

Error Scenarios

The methods Authenticate, OverrideDefaultRoles, and GetState return their return values encapsulated in ara::core::Result and are specified as exception-safe (exception safe) and noexcept [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143]. In the event of an error, the following standardized error code is reported:

No standardized error codes are defined for SetNotifier [SWS_DM_01144]. As an essential precondition, OverrideDefaultRoles requires that the client is in state kDeAuthenticated at the time of the call [SWS_DM_01209].

This guide is based on the AUTOSAR Adaptive R25-11 specification (module diag) and was created for autodocs.

Member map

Class diagram

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

G nara__diag__ClientAuthentication678 ClientAuthentication + ClientAuthentication() + ~ClientAuthentication() + Authenticate() + GetState() + OverrideDefaultRoles() + SetNotifier() + operator=()

Detail view

Select an entry in the outline.

Constructors and destructor

Move constructor of ClientAuthentication.

Overloads ClientAuthentication 2
ClientAuthentication (ClientAuthentication &&other) noexcept=default; SWS_DM_01137
ClientAuthentication (ClientAuthentication const &other)=delete; SWS_DM_01139

Destructor of ClientAuthentication.

~ClientAuthentication () noexcept;

Methods

Authenticate function

This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.

GetState function

This function is used by the application to query the current authentication state of the diagnostic client.

ara::core::Result< DiagnosticAuthState > GetState () const noexcept;

This method is used by the application to temporarily change the default AuthenticationRole for a Diagnostic Server Instance. The diagnostic services allowed in the passed defaultRoles are now accessible to the tester for a time period defined in the parameter timeout.

SetNotifier function

This function is used by the application to set a Notifier function that shall be called by the Diagnostic Server instance when an Authentication Status Change occurs. This may be used, e.g, to notify the application when a transition to kDeAuthenticated state occurred due to an S3 timeout. A consecutive call of this method will overwrite the previous registered notifier.

ara::core::Result< void > SetNotifier (ClientAuthenticationSetNotifier notifier) noexcept;

Operators

operator= function 2

Move assignment operator of ClientAuthentication.

Overloads = 2
auto operator= (ClientAuthentication &&other) & noexcept -> Client Authentication & =default; SWS_DM_01138
auto operator= (ClientAuthentication const &other) -> Client Authentication &=delete; SWS_DM_01140

Type aliases

Notifier Function that is called by the Diagnostic Server instance when an Authentication Status Change Occurs. This may be used, for e.g, to notify the application when a transition to kDeAuthenticated State occurred due to an S3 timeout.

using ClientAuthenticationSetNotifier = std::function<void(Diagnostic AuthState)>;

The supported values for the Diagnostic Authentication roles are specified in the Diagnostic Extract.

using DiagnosticAuthRole = ara::core::String;

Enumerations

Possible values of the Authentication State of the client.

enum class DiagnosticAuthState : std::uint8_t {...};

Method documentation

function Authenticate [SWS_DM_01142] Upstream: RS_Diag_04251

ara::core::Result< ClientAuthenticationHandle > Authenticate (ara::core::Vector< DiagnosticAuthRole > userRoles) noexcept;

This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 06f87d723d7c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Invocation

The function ara::diag::ClientAuthentication::Authenticate is called by an application to notify the Diagnostic Server instance of the successful authentication of a diagnostic client [SWS_DM_01142]. This can occur after authentication via the interfaces of the Diagnostic Server or via application-own mechanisms [SWS_DM_01142].

As an input parameter, the function accepts userRoles (of type ara::core::Vector<DiagnosticAuthRole>). Upon a successful call, the instance's authentication status transitions to kAuthenticated, and the passed user roles are firmly adopted [SWS_DM_01206]. As a return value, it provides a ara::core::Result<ClientAuthenticationHandle> [SWS_DM_01142]. Since a result object is provided immediately, the processing is likely to take place synchronously in the calling context. Question Q-dae22c82694f2103 (open)

Error Handling and Concurrency

The method is declared as noexcept and is considered exception safe (exception safe) [SWS_DM_01142]. If an error occurs because fundamental functionalities of the Diagnostic Manager are not available at invocation time, the operation fails with rollback semantics and returns DiagErrc::kServiceNotAvailable in the result object [SWS_DM_01142].

Regarding concurrency, the method is explicitly specified as not thread-safe [SWS_DM_01142]. Parallel calls on the same ClientAuthentication object are therefore not permitted and must be synchronized by the application.

Interaction and Lifecycle

The received ClientAuthenticationHandle allows the application to define or extend a DynamicAccessList for the authenticated client [SWS_DM_01142]. In addition, the call starts or references the inactivity monitoring of the client: if no further UDS request occurs after successful authentication in the default session state for the duration of authenticationTimeout, the Diagnostic Server instance automatically resets the client to kDeAuthenticated [SWS_DM_01210]. To prevent this timeout, the application can update the timer via method Refresh of the handle [SWS_DM_01155].

This text was generated by an AI based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
userRolesThe user roles to set on the diagnostic client

Rückgabewert

TypBeschreibung
ara::core::Result< ClientAuthenticationHandle >A handler of the Authentication State, which can be used by the application to set or extend the DynamicAccessList

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01142
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01142@rel:R25-11#ffd39a4b
Content hash
ffd39a4b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01142
Status: valid/unmigrated Version: rel:R25-11#17cf8f55 Versionshistorie & Revisions (1 transition, 6 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_01142@rel:R25-11#17cf8f55
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ffd39a4b2026-09-30
  • R21-11rel:R21-11#6f17bd9a2026-10-14
  • R22-11rel:R22-11#1579f1692026-10-14
  • R23-11rel:R23-11#3b67657b2026-10-14
  • R24-11rel:R24-11#575f1e5f2026-10-14
  • R25-11rel:R25-11#17cf8f552026-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

function ClientAuthentication [SWS_DM_01137] Upstream: RS_Diag_04251

ClientAuthentication (ClientAuthentication &&other) noexcept=default;

Move constructor of ClientAuthentication.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherObject to move-construct from

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

Record
AUTOSAR/AP/record/SWS_DM_01137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01137@rel:R25-11#58196117
Content hash
58196117
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01137
Status: valid/unmigrated Version: rel:R25-11#3462794e Versionshistorie & Revisions (1 transition, 6 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_01137@rel:R25-11#3462794e
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#581961172026-09-30
  • R21-11rel:R21-11#f373d3152026-10-14
  • R22-11rel:R22-11#afdb12682026-10-14
  • R23-11rel:R23-11#5682468c2026-10-14
  • R24-11rel:R24-11#d6bf1b932026-10-14
  • R25-11rel:R25-11#3462794e2026-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

function ClientAuthentication [SWS_DM_01139] Upstream: RS_Diag_04251

ClientAuthentication (ClientAuthentication const &other)=delete;

Copy constructor of ClientAuthentication cannot be used.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication

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

Record
AUTOSAR/AP/record/SWS_DM_01139
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01139@rel:R25-11#ab176882
Content hash
ab176882
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01139
Status: valid/unmigrated Version: rel:R25-11#8625245a Versionshistorie & Revisions (1 transition, 6 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_01139@rel:R25-11#8625245a
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ab1768822026-09-30
  • R21-11rel:R21-11#1fb6defa2026-10-14
  • R22-11rel:R22-11#74808a772026-10-14
  • R23-11rel:R23-11#1b61e7822026-10-14
  • R24-11rel:R24-11#8625245a2026-10-14
  • R25-11rel:R25-11#8625245a2026-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

function GetState [SWS_DM_01143] Upstream: RS_Diag_04251

ara::core::Result< DiagnosticAuthState > GetState () const noexcept;

This function is used by the application to query the current authentication state of the diagnostic client.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<DiagnosticAuthState >The Authentication State of the Diagnostic Client or error.

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01143
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01143@rel:R25-11#84da2c3e
Content hash
84da2c3e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01143
Status: valid/unmigrated Version: rel:R25-11#608570f4 Versionshistorie & Revisions (1 transition, 6 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_01143@rel:R25-11#608570f4
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#84da2c3e2026-09-30
  • R21-11rel:R21-11#d78810992026-10-14
  • R22-11rel:R22-11#fed2aecc2026-10-14
  • R23-11rel:R23-11#275163122026-10-14
  • R24-11rel:R24-11#23ca48ab2026-10-14
  • R25-11rel:R25-11#608570f42026-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

function OverrideDefaultRoles [SWS_DM_01141] Upstream: RS_Diag_04251

ara::core::Result< ClientAuthenticationHandle > OverrideDefaultRoles (ara::core::Vector< DiagnosticAuthRole > defaultRoles, std::chrono::milliseconds timeout) noexcept;

This method is used by the application to temporarily change the default AuthenticationRole for a Diagnostic Server Instance. The diagnostic services allowed in the passed defaultRoles are now accessible to the tester for a time period defined in the parameter timeout.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4809043989e1 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

With the synchronous method OverrideDefaultRoles of class ara::diag::ClientAuthentication, an application can temporarily override the default authentication roles (defaultRoles) of a diagnostic client [SWS_DM_01141]. The diagnostic services enabled for the passed roles are available to the tester for the period of time defined in parameter timeout [SWS_DM_01141]. The prerequisite for this is that the client is in state kDeAuthenticated [SWS_DM_01209]. Interpretation: If the call is not made in state kDeAuthenticated, the role override is likely to be rejected or remain without effect, as the specification mandates the behavior exclusively for this initial state. Question Q-81189f2c2fe0f301 (open)

Upon successful execution, the method returns an instance of ClientAuthenticationHandle within a ara::core::Result to the application [SWS_DM_01141], [SWS_DM_01209]. If the call cannot be executed because essential functionality of the Diagnostic Manager is currently unavailable, error code DiagErrc::kServiceNotAvailable is returned [SWS_DM_01141]. The function is declared as noexcept and is exception safe [SWS_DM_01141].

For concurrency and interaction with further components, the following requirements apply:

This usage note was created automatically based on the AUTOSAR specifications.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
defaultRolesThe default roles requested by the application, to be set on the diagnostic client
timeoutThe timeout until which the override request is active

Rückgabewert

TypBeschreibung
ara::core::Result< ClientAuthenticationHandle >Operation result

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01141@rel:R25-11#852a402e
Content hash
852a402e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01141
Status: valid/unmigrated Version: rel:R25-11#21bca5df Versionshistorie & Revisions (1 transition, 6 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_01141@rel:R25-11#21bca5df
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#852a402e2026-09-30
  • R21-11rel:R21-11#135b2de82026-10-14
  • R22-11rel:R22-11#70389b8e2026-10-14
  • R23-11rel:R23-11#e73e64042026-10-14
  • R24-11rel:R24-11#94dc59742026-10-14
  • R25-11rel:R25-11#21bca5df2026-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

function SetNotifier [SWS_DM_01144] Upstream: RS_Diag_04251

ara::core::Result< void > SetNotifier (ClientAuthenticationSetNotifier notifier) noexcept;

This function is used by the application to set a Notifier function that shall be called by the Diagnostic Server instance when an Authentication Status Change occurs. This may be used, e.g, to notify the application when a transition to kDeAuthenticated state occurred due to an S3 timeout. A consecutive call of this method will overwrite the previous registered notifier.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 19ea8e6c95d7 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

Method [SWS_DM_01144] of class ara::diag::ClientAuthentication is used by the application to register a callback function of type ClientAuthenticationSetNotifier. This function is called by the Diagnostic Server instance as soon as the authentication status of a client changes [SWS_DM_01144]. This enables the application to respond immediately to state transitions, for example when an automatic transition to state kDeAuthenticated occurs after an S3 server timeout [SWS_DM_01211] or a timeout due to client inactivity occurs [SWS_DM_01210].

Error Handling and Return Value

The function returns a ara::core::Result<void> and is declared as noexcept as well as exception safe [SWS_DM_01144]. No standardized error codes are specified [SWS_DM_01144]; presumably the Result object always returns success (void) in regular operation. Question Q-0d7d43cc37d57944 (open)

Concurrency and Interaction

Regarding thread safety, the method is specified as "not thread-safe" [SWS_DM_01144]. Calls on the same instance must therefore not be made unprotected from concurrent threads. In addition, an overwrite behavior applies to the registration: a subsequent call to SetNotifier completely replaces the previously registered notifier [SWS_DM_01144]. This behavior complies with the unified registration pattern in Diagnostic Management, as defined analogously for [SWS_DM_00615] (CancellationHandler), [SWS_DM_00745] (Indicator), and [SWS_DM_00755] (OperationCycle).

This usage note was generated automatically based on the AUTOSAR Adaptive R25-11 specification.

Implementer's Guide to follow (complexity I3)

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
notifierThe notifier to call on state transition

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns void.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_DM_01144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01144@rel:R25-11#bb5bb942
Content hash
bb5bb942
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01144
Status: valid/unmigrated Version: rel:R25-11#ddcf5d80 Versionshistorie & Revisions (1 transition, 6 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_01144@rel:R25-11#ddcf5d80
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#bb5bb9422026-09-30
  • R21-11rel:R21-11#fec80c112026-10-14
  • R22-11rel:R22-11#2ece489f2026-10-14
  • R23-11rel:R23-11#7f1d62332026-10-14
  • R24-11rel:R24-11#107e99362026-10-14
  • R25-11rel:R25-11#ddcf5d802026-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

function operator= [SWS_DM_01138] Upstream: RS_Diag_04251

auto operator= (ClientAuthentication &&other) & noexcept -> Client Authentication & =default;

Move assignment operator of ClientAuthentication.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherObject to move-assign from.

Rückgabewert

TypBeschreibung
ClientAuthenticationClientAuthentication& Reference to self.

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

Record
AUTOSAR/AP/record/SWS_DM_01138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01138@rel:R25-11#f0894f26
Content hash
f0894f26
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01138
Status: valid/unmigrated Version: rel:R25-11#76277668 Versionshistorie & Revisions (1 transition, 6 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_01138@rel:R25-11#76277668
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#f0894f262026-09-30
  • R21-11rel:R21-11#1107ed262026-10-14
  • R22-11rel:R22-11#9d8e860b2026-10-14
  • R23-11rel:R23-11#a3ca32ee2026-10-14
  • R24-11rel:R24-11#2d04d62d2026-10-14
  • R25-11rel:R25-11#762776682026-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

function operator= [SWS_DM_01140] Upstream: RS_Diag_04251

auto operator= (ClientAuthentication const &other) -> Client Authentication &=delete;

Copy assignment operator of ClientAuthentication cannot be used.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication

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

Record
AUTOSAR/AP/record/SWS_DM_01140
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01140@rel:R25-11#2a4783d5
Content hash
2a4783d5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01140
Status: valid/unmigrated Version: rel:R25-11#83c48e25 Versionshistorie & Revisions (1 transition, 6 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_01140@rel:R25-11#83c48e25
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#2a4783d52026-09-30
  • R21-11rel:R21-11#f986a5382026-10-14
  • R22-11rel:R22-11#666e2c0b2026-10-14
  • R23-11rel:R23-11#9111a09e2026-10-14
  • R24-11rel:R24-11#41a505672026-10-14
  • R25-11rel:R25-11#83c48e252026-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

function ~ClientAuthentication [SWS_DM_01136] Upstream: RS_Diag_04251

~ClientAuthentication () noexcept;

Destructor of ClientAuthentication.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9da38c214c58 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The destructor [SWS_DM_01136] of class ara::diag::ClientAuthentication serves for releasing and cleanly tearing down an instance for client authentication in Diagnostic Management. The function is defined in header file #include "ara/diag/client_authentication.h" and is called synchronously at the end of the object lifecycle (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 “Destructor”).

The following specifications apply to usage and execution properties:

  • Call and parameters: As a destructor, ~ClientAuthentication() has neither input parameters nor a return value.
  • Error and exception safety: The operation is specified as noexcept and exception safe [SWS_DM_01136]; no exceptions are guaranteed to be thrown when tearing down the object.
  • Concurrency: The call is explicitly classified as not thread-safe. Consequently, destroying the object must not occur concurrently with other method calls on the same instance.

The element implements the upstream requirement RS_Diag_04251 (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 “Destructor”). Interpretation: Before destroying the instance, active authentication or communication processes of the application are likely to need to be terminated in an orderly manner to avoid undefined behavior due to the lack of thread safety. Question Q-cedd6f523eb2c1c3 (open)

This text was generated by an AI and serves as an editorial usage note.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_01136
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01136@rel:R25-11#5066950d
Content hash
5066950d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01136
Status: valid/unmigrated Version: rel:R25-11#ebd2efb0 Versionshistorie & Revisions (1 transition, 6 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_01136@rel:R25-11#ebd2efb0
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#5066950d2026-09-30
  • R21-11rel:R21-11#aa8b145e2026-10-14
  • R22-11rel:R22-11#e03e0f452026-10-14
  • R23-11rel:R23-11#a62b91a92026-10-14
  • R24-11rel:R24-11#393bc96e2026-10-14
  • R25-11rel:R25-11#ebd2efb02026-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

Enumeration documentation

enumeration DiagnosticAuthState [SWS_DM_01133] Upstream: RS_Diag_04251

enum class DiagnosticAuthState :                std::uint8_t {...};

Possible values of the Authentication State of the client.

Header-Datei#include "ara/diag/client_authentication.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::ClientAuthentication
SymbolDiagnosticAuthState
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kDeAuthenticated= 0x00 No Diagnostic Clients are currently authenticated.
kAuthenticated= 0x01 A Diagnostic Client is currently authenticated.

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

Record
AUTOSAR/AP/record/SWS_DM_01133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01133@rel:R25-11#ecdc884c
Content hash
ecdc884c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01133
Status: valid/unmigrated Version: rel:R25-11#be2431b9 Versionshistorie & Revisions (1 transition, 6 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_01133@rel:R25-11#be2431b9
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ecdc884c2026-09-30
  • R21-11rel:R21-11#9ee5449e2026-10-14
  • R22-11rel:R22-11#9ee5449e2026-10-14
  • R23-11rel:R23-11#e21d94c52026-10-14
  • R24-11rel:R24-11#e21d94c52026-10-14
  • R25-11rel:R25-11#be2431b92026-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

Type alias documentation

type alias ClientAuthenticationSetNotifier [SWS_DM_02077] Upstream: RS_Diag_04251

using ClientAuthenticationSetNotifier = std::function<void(Diagnostic AuthState)>;

Notifier Function that is called by the Diagnostic Server instance when an Authentication Status Change Occurs. This may be used, for e.g, to notify the application when a transition to kDeAuthenticated State occurred due to an S3 timeout.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
SymbolClientAuthenticationSetNotifier
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_02077
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02077@rel:R25-11#00399c22
Content hash
00399c22
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02077
Status: valid/unmigrated Version: rel:R25-11#9f8e8d05 Versionshistorie & Revisions (1 transition, 3 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_02077@rel:R25-11#9f8e8d05
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#00399c222026-09-30
  • R24-11rel:R24-11#b4d6fb532026-10-14
  • R25-11rel:R25-11#9f8e8d052026-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

type alias DiagnosticAuthRole [SWS_DM_01134] Upstream: RS_Diag_04251

using DiagnosticAuthRole = ara::core::String;

The supported values for the Diagnostic Authentication roles are specified in the Diagnostic Extract.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
SymbolDiagnosticAuthRole

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

Record
AUTOSAR/AP/record/SWS_DM_01134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01134@rel:R25-11#ecb176b9
Content hash
ecb176b9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01134
Status: valid/unmigrated Version: rel:R25-11#10bed2cf Versionshistorie & Revisions (1 transition, 6 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_01134@rel:R25-11#10bed2cf
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ecb176b92026-09-30
  • R21-11rel:R21-11#d3a529062026-10-14
  • R22-11rel:R22-11#7d6be0912026-10-14
  • R23-11rel:R23-11#7e7656532026-10-14
  • R24-11rel:R24-11#eb0bd58b2026-10-14
  • R25-11rel:R25-11#10bed2cf2026-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