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 GuideKI-GENERIERT

Dient der Anwendung zur Meldung von Authentifizierungszuständen und aktiven Benutzerrollen an den Diagnostic Server.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 426d68eb26e1 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Dient der Anwendung zur Meldung von Authentifizierungszuständen und aktiven Benutzerrollen an den Diagnostic Server.

Die Schnittstelle ermöglicht es der Anwendung, den Diagnostic Server über den Authentifizierungsstatus sowie aktive Benutzerrollen eines Diagnose-Clients zu informieren [SWS_DM_01132]. Über Aufrufe wie Authenticate oder OverrideDefaultRoles werden Zustandswechsel gesteuert und Handles zur Verwaltung dynamischer Zugriffslisten bereitgestellt [SWS_DM_01206]. Zustandsänderungen infolge von Timeouts lassen sich über einen Notifier asynchron überwachen. Da die Klasse nicht threadsicher ist und keine Kopien erlaubt, muss der Zugriff innerhalb der Anwendung synchronisiert erfolgen.

Kontext

Die Klasse ara::diag::ClientAuthentication dient als zentrale Schnittstelle für die Anwendung, um die Instanz des Diagnostic Server über Authentifizierungszustände und die aktuell authentifizierten Benutzerrollen zu unterrichten [SWS_DM_01132], SWS Diagnostics, S. 129. An diesem Zusammenspiel sind drei wesentliche Parteien beteiligt:

  • Anwendung (Application): Führt Authentifizierungsprüfungen durch – entweder unter Nutzung von Schnittstellen des Diagnostic Server oder über anwendungseigene Mechanismen – und übermittelt Benutzerrollen an den Diagnostic Server [SWS_DM_01142].
  • Diagnostic Server / Diagnostic Manager: Verwaltet die Diagnosesitzungen und setzt Zugriffsrechte auf diagnostische Ressourcen basierend auf den Rollen und dem Authentifizierungsstatus durch [SWS_DM_01206].
  • Diagnose-Client: Ein externer Tester oder SOVD-Client, der Diagnoseanfragen an das Steuergerät richtet [SWS_DM_01210], [SWS_DM_01470].

Die Anzahl der Instanzen von ClientAuthentication wird durch das Modellelement DiagnosticExternalAuthenticationIdentification festgelegt SWS Diagnostics, S. 129. Dieses Element erlaubt es, eine Authentifizierung für einen Client mit einer festen Quelladresse oder über einen Adressbereich zu konfigurieren, falls die finale Quelladresse zur Compile-Zeit noch nicht bekannt ist SWS Diagnostics, S. 129. Interpretation: Die Zuordnung von Diagnose-Clients zu konkreten Instanzen von ClientAuthentication erfolgt zur Laufzeit anhand dieser Quelladressbereiche. Frage Q-6cc7e791e678def2 (offen) Im Fall von SOVD-Clients übergibt der Diagnostic Server bei der Validierung des Autorisierungs-Tokens über ara::diag::SovdAuthorization::ValidateAuthorization direkt ein ClientAuthentication-Objekt an die Anwendung [SWS_DM_01470].

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

Kontextdiagramm: Interaktionspartner der Authentifizierungsschnittstelle. Quellen: [SWS_DM_01132], [SWS_DM_01202], [SWS_DM_01470], SWS Diagnostics, S. 129

Lebenszyklus

Die Anwendung erhält eine Instanz von ClientAuthentication über überladene Methoden von ara::diag::ExternalAuthentication::Get [SWS_DM_01202] oder im Kontext der SOVD-Tokenprüfung [SWS_DM_01470]. Die Klasse besitzt strikte Eigentumssemantiken: Kopierkonstruktor [SWS_DM_01139] und Kopierzuweisungsoperator [SWS_DM_01140] sind gelöscht (=delete). Verschiebeoperationen (Move-Konstruktor [SWS_DM_01137] und Move-Zuweisungsoperator [SWS_DM_01138]) sind als Standard vordefiniert und als noexcept deklariert. Der Destruktor ist ebenfalls noexcept [SWS_DM_01136]. Sämtliche Elementfunktionen sowie der Destruktor sind nicht threadsicher (not thread-safe) [SWS_DM_01136], [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143], [SWS_DM_01144].

Der Authentifizierungsstatus wird über den Aufzählungstyp DiagnosticAuthState abgebildet [SWS_DM_01133]:

  • kDeAuthenticated (0x00): Kein Diagnose-Client ist authentifiziert. Beim Systemstart befindet sich der Client standardmäßig in diesem Zustand [SWS_DM_01205]. Hierbei gelten diejenigen Rollen (DiagnosticAuthRole) als Standardrollen, deren Attribut isDefault auf TRUE konfiguriert ist [SWS_DM_01204], [SWS_DM_01134]. Über OverrideDefaultRoles können diese Standardrollen temporär für einen festgelegten Timeout überschrieben werden [SWS_DM_01141], [SWS_DM_01209].
  • kAuthenticated (0x01): Ein Diagnose-Client ist authentifiziert. Dieser Zustand wird durch Aufruf von Authenticate erreicht, wodurch die übergebenen Benutzerrollen im Diagnostic Server aktiviert werden [SWS_DM_01142], [SWS_DM_01206].

Ein automatischer Zustandsübergang von kAuthenticated zurück zu kDeAuthenticated wird ausgelöst, wenn ein Client in der Standard-Sitzung nach der letzten Übertragungsbestätigung (TransmitConfirmation) keine weiteren Anfragen sendet und die Inaktivitätszeit abläuft [SWS_DM_01210], oder wenn ein S3-Timeout auftritt [SWS_DM_01144], [SWS_DM_02077].

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

Zustandsdiagramm: Lebenszyklus und Zustandsübergänge der Client-Authentifizierung. Quellen: [SWS_DM_01133], [SWS_DM_01204], [SWS_DM_01205], [SWS_DM_01206], [SWS_DM_01209], [SWS_DM_01210]

Nutzungspfad

Der reguläre Ablauf zur Verwaltung der Client-Authentifizierung umfasst folgende Schritte:

  1. Notifier registrieren: Die Anwendung registriert mit SetNotifier eine Callback-Funktion vom Typ ClientAuthenticationSetNotifier (std::function<void(DiagnosticAuthState)>) [SWS_DM_01144], [SWS_DM_02077]. Dadurch wird sie informiert, wenn Statuswechsel – beispielsweise der Übergang zu kDeAuthenticated durch Inaktivität oder einen S3-Timeout – eintreten [SWS_DM_01144]. Ein erneuter Aufruf überschreibt den zuvor gesetzten Notifier [SWS_DM_01144].
  2. Zustand abfragen: Über die Methode GetState() kann die Anwendung den aktuellen Authentifizierungszustand des Clients synchron abfragen [SWS_DM_01143].
  3. Authentifizierung melden: Sobald die Authentifizierung erfolgreich abgeschlossen wurde, ruft die Anwendung Authenticate mit den zu aktivierenden Benutzerrollen (ara::core::Vector<DiagnosticAuthRole>) auf [SWS_DM_01142], [SWS_DM_01134]. Der Diagnostic Server setzt den Zustand auf kAuthenticated und liefert ein ClientAuthenticationHandle zurück [SWS_DM_01206].
  4. Zugriffsrechte verwalten: Über das erhaltene ClientAuthenticationHandle kann die Anwendung die dynamische Zugriffsliste (DynamicAccessList) für den Client konfigurieren [SWS_DM_01213], SWS Diagnostics, S. 132. Zugleich wird durch die Nutzung dieses Handles das Inaktivitätszeitfenster des Clients aufgefrischt SWS Diagnostics, S. 133.

Befindet sich der Client im Zustand kDeAuthenticated, kann die Anwendung stattdessen OverrideDefaultRoles(defaultRoles, timeout) aufrufen, um temporär alternative Standardrollen zu aktivieren; auch dieser Aufruf gibt bei Erfolg ein ClientAuthenticationHandle zurück [SWS_DM_01141], [SWS_DM_01209].

Authentifizierungsablauf und RechteverwaltungApplicationClientAuthenticationDiagnosticServerSetNotifier(notifier)Result<void>Authenticate(userRoles)Status kAuthenticated und Rollen setzenBestaetigung & HandleResult<ClientAuthenticationHandle>optClient-Inaktivitaet in Standard-Session / S3-TimeoutWechsel zu kDeAuthenticatednotifier(kDeAuthenticated)

Sequenzdiagramm: Aufruf- und Benachrichtigungsablauf bei der Authentifizierung. Quellen: [SWS_DM_01142], [SWS_DM_01144], [SWS_DM_01206], [SWS_DM_01210]

Fehlerszenarien

Die Methoden Authenticate, OverrideDefaultRoles und GetState liefern ihre Rückgabewerte gekapselt in ara::core::Result zurück und sind ausnahmesicher (exception safe) sowie noexcept spezifiziert [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143]. Im Fehlerfall wird folgender standardisierter Fehlercode gemeldet:

Für SetNotifier sind keine standardisierten Fehlercodes definiert [SWS_DM_01144]. Als wesentliche Vorbedingung verlangt OverrideDefaultRoles, dass sich der Client zum Zeitpunkt des Aufrufs im Zustand kDeAuthenticated befindet [SWS_DM_01209].

Dieser Leitfaden basiert auf der Spezifikation AUTOSAR Adaptive R25-11 (Modul diag) und wurde für autodocs erstellt.

Mitgliederkarte

Klassendiagramm

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

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

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Konstruktoren und Destruktor

Move constructor of ClientAuthentication.

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

Destructor of ClientAuthentication.

~ClientAuthentication () noexcept;

Methoden

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;

Operatoren

operator= function 2

Move assignment operator of ClientAuthentication.

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

Typaliase

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;

Enumerationen

Possible values of the Authentication State of the client.

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

Dokumentation der Methoden

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.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 06f87d723d7c Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung und Aufruf

Die Funktion ara::diag::ClientAuthentication::Authenticate wird von einer Applikation aufgerufen, um der Diagnostic-Server-Instanz die erfolgreiche Authentisierung eines Diagnose-Clients mitzuteilen [SWS_DM_01142]. Dies kann nach einer Authentisierung über die Schnittstellen des Diagnostic Servers oder über anwendungseigene Mechanismen erfolgen [SWS_DM_01142].

Als Eingabeparameter nimmt die Funktion userRoles (vom Typ ara::core::Vector<DiagnosticAuthRole>) entgegen. Bei erfolgreichem Aufruf wechselt der Authentisierungsstatus der Instanz zu kAuthenticated und die übergebenen Benutzerrollen werden fest übernommen [SWS_DM_01206]. Als Rückgabewert liefert sie ein ara::core::Result<ClientAuthenticationHandle> [SWS_DM_01142]. Da unmittelbar ein Result-Objekt bereitgestellt wird, dürfte die Verarbeitung synchron im aufrufenden Kontext erfolgen. Frage Q-dae22c82694f2103 (offen)

Fehlerbehandlung und Nebenläufigkeit

Die Methode ist als noexcept deklariert und gilt als ausnahmesicher (exception safe) [SWS_DM_01142]. Tritt ein Fehler auf, weil fundamentale Funktionalitäten des Diagnostic Managers zur Aufrufzeit nicht zur Verfügung stehen, schlägt die Operation mit Rollback-Semantik fehl und liefert DiagErrc::kServiceNotAvailable im Result-Objekt zurück [SWS_DM_01142].

Hinsichtlich der Nebenläufigkeit ist die Methode ausdrücklich als not thread-safe spezifiziert [SWS_DM_01142]. Parallele Aufrufe auf demselben ClientAuthentication-Objekt sind daher unzulässig und müssen durch die Anwendung synchronisiert werden.

Zusammenspiel und Lebenszyklus

Das erhaltene ClientAuthenticationHandle ermöglicht es der Applikation, eine DynamicAccessList für den authentisierten Client zu definieren oder zu erweitern [SWS_DM_01142]. Zudem startet oder referenziert der Aufruf die Inaktivitätsüberwachung des Clients: Bleibt nach erfolgreicher Authentisierung im Standard-Sitzungszustand für die Dauer von authenticationTimeout eine weitere UDS-Anfrage aus, setzt die Diagnostic-Server-Instanz den Client automatisch wieder auf kDeAuthenticated zurück [SWS_DM_01210]. Um diesem Timeout vorzubeugen, kann die Anwendung den Timer über die Methode Refresh des Handles aktualisieren [SWS_DM_01155].

Dieser Text wurde von einer KI auf Basis der AUTOSAR-Spezifikation generiert.

Implementer's Guide folgt (Komplexität 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.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 4809043989e1 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Mit der synchronen Methode OverrideDefaultRoles der Klasse ara::diag::ClientAuthentication kann eine Anwendung die Standard-Authentifizierungsrollen (defaultRoles) eines Diagnose-Clients temporär überschreiben [SWS_DM_01141]. Die für die übergebenen Rollen freigegebenen Diagnosedienste stehen dem Tester für die im Parameter timeout definierte Zeitspanne zur Verfügung [SWS_DM_01141]. Voraussetzung hierfür ist, dass sich der Client im Zustand kDeAuthenticated befindet [SWS_DM_01209]. Interpretation: Erfolgt der Aufruf nicht im Zustand kDeAuthenticated, dürfte die Rollenüberschreibung abgewiesen werden oder wirkungslos bleiben, da die Spezifikation das Verhalten ausschließlich für diesen Ausgangszustand vorschreibt. Frage Q-81189f2c2fe0f301 (offen)

Bei erfolgreicher Ausführung liefert die Methode eine Instanz von ClientAuthenticationHandle innerhalb eines ara::core::Result an die Anwendung zurück [SWS_DM_01141], [SWS_DM_01209]. Kann der Aufruf nicht ausgeführt werden, weil essenzielle Funktionalität des Diagnostic Managers derzeit nicht verfügbar ist, wird der Fehlercode DiagErrc::kServiceNotAvailable zurückgegeben [SWS_DM_01141]. Die Funktion ist als noexcept deklariert und ausnahmesicher (exception safe) [SWS_DM_01141].

Für die Nebenläufigkeit und das Zusammenspiel mit weiteren Komponenten gelten folgende Vorgaben:

  • Nebenläufigkeit: Die Methode ist als not thread-safe spezifiziert [SWS_DM_01141]. Parallele Aufrufe auf derselben Instanz müssen anwendungsseitig synchronisiert werden.
  • Handle-Verwaltung: Über die zurückgegebene Instanz von ClientAuthenticationHandle kann der laufende Timer mit Refresh() verlängert werden [SWS_DM_01155]. Zudem ermöglicht das Handle die Verwaltung der DynamicAccessList für zusätzliche Diagnoseressourcen AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 „ClientAuthenticationHandle“.

Dieser Nutzungshinweis wurde automatisiert anhand der AUTOSAR-Spezifikationen erstellt.

Implementer's Guide folgt (Komplexität 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.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 19ea8e6c95d7 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung

Die Methode [SWS_DM_01144] der Klasse ara::diag::ClientAuthentication dient der Anwendung dazu, eine Callback-Funktion vom Typ ClientAuthenticationSetNotifier zu registrieren. Diese wird von der Instanz des Diagnostic Servers aufgerufen, sobald sich der Authentifizierungsstatus eines Clients ändert [SWS_DM_01144]. Dies ermöglicht es der Anwendung, unmittelbar auf Zustandswechsel zu reagieren, beispielsweise wenn nach einem S3-Server-Timeout ein automatischer Übergang in den Status kDeAuthenticated erfolgt [SWS_DM_01211] oder ein Timeout durch Client-Inaktivität eintritt [SWS_DM_01210].

Fehlerbehandlung und Rückgabewert

Die Funktion gibt ein ara::core::Result<void> zurück und ist als noexcept sowie ausnahmesicher (exception safe) deklariert [SWS_DM_01144]. Es sind keine standardisierten Fehlercodes spezifiziert [SWS_DM_01144]; vermutlich liefert das Result-Objekt im regulären Betrieb stets Erfolg (void). Frage Q-0d7d43cc37d57944 (offen)

Nebenläufigkeit und Zusammenspiel

Hinsichtlich der Thread-Sicherheit ist die Methode als „not thread-safe“ spezifiziert [SWS_DM_01144]. Aufrufe an derselben Instanz dürfen daher nicht ungeschützt aus konkurrierenden Threads erfolgen. Zudem gilt für die Registrierung ein Überschreibverhalten: Ein erneuter Aufruf von SetNotifier ersetzt den zuvor registrierten Notifier vollständig [SWS_DM_01144]. Dieses Verhalten entspricht dem einheitlichen Registrierungsmuster im Diagnostic Management, wie es analog auch für [SWS_DM_00615] (CancellationHandler), [SWS_DM_00745] (Indicator) und [SWS_DM_00755] (OperationCycle) definiert ist.

Dieser Nutzungshinweis wurde automatisiert auf Basis der Spezifikation AUTOSAR Adaptive R25-11 erstellt.

Implementer's Guide folgt (Komplexität 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.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 9da38c214c58 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Der Destruktor [SWS_DM_01136] der Klasse ara::diag::ClientAuthentication dient der Freigabe und dem sauberen Abbau einer Instanz zur Client-Authentifizierung im Diagnose-Management. Die Funktion ist in der Header-Datei #include "ara/diag/client_authentication.h" definiert und wird synchron beim Ende der Objektlebensdauer aufgerufen (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 „Destructor“).

Für die Verwendung und Ausführungseigenschaften gelten die folgenden Festlegungen:

  • Aufruf und Parameter: Als Destruktor besitzt ~ClientAuthentication() weder Übergabeparameter noch einen Rückgabewert.
  • Fehler- und Ausnahmesicherheit: Die Operation ist als noexcept und exception safe spezifiziert [SWS_DM_01136]; beim Abbau des Objekts werden garantiert keine Exceptions ausgelöst.
  • Nebenläufigkeit: Der Aufruf ist ausdrücklich als not thread-safe eingestuft. Ein Zerstören des Objekts darf folglich nicht nebenläufig zu anderen Methodenaufrufen derselben Instanz erfolgen.

Das Element setzt die Upstream-Anforderung RS_Diag_04251 um (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 „Destructor“). Interpretation: Vor dem Zerstören der Instanz dürften aktive Authentifizierungs- oder Kommunikationsvorgänge der Anwendung geordnet beendet werden müssen, um undefiniertes Verhalten infolge der fehlenden Threadsicherheit zu vermeiden. Frage Q-cedd6f523eb2c1c3 (offen)

Dieser Text wurde von einer KI generiert und dient als redaktioneller Nutzungshinweis.

Implementer's Guide folgt (Komplexität 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

Dokumentation der Enumerationen

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

Dokumentation der Typaliase

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