DEENESPTFRRUARHIKOZHNL

类 ara::diag::SovdAuthorization

[SWS_DM_01490] Upstream: RS_Diag_04268

class SovdAuthorization {...};

Class to implement the SOVD Authorization interfaces in the application.

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

用户指南人工智能生成

使应用程序能够验证 SOVD 令牌并提供授权和令牌 URL。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 49d1f84283f8 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使应用程序能够验证 SOVD 令牌并提供授权和令牌 URL。

类 ara::diag::SovdAuthorization 供应用程序向 Diagnostic Server 实现 SOVD 授权接口([SWS_DM_01490])。它提供了用于确定授权和令牌端点的重定向 URL 以及验证访问令牌的方法([SWS_DM_01483])。在实例化之后,必须使用 Offer() 显式激活消息接收,并且在提供验证结果后,不得再使用所传递的认证对象。

上下文

类 ara::diag::SovdAuthorization 提供了 Adaptive 应用程序接口,以针对 Service-Oriented Vehicle Diagnostics (SOVD) 提供授权和身份验证机制([SWS_DM_01490])。在诊断架构中,它在 Diagnostic Management (DM) 的 Diagnostic Server 与车辆应用程序的自定义授权逻辑之间充当中介(SWS Diagnostics §7.3.3.2 “SOVD Request Validation and Verification”)。当外部 SOVD 客户端查询用于客户端验证或获取令牌的端点时,Diagnostic Server 会将这些请求转发给应用程序以确定目标 URL([SWS_DM_01471]、[SWS_DM_01472])。对于带有 HTTP 授权标头的传入诊断请求,该类会检查令牌的有效性并定义传输的访问角色([SWS_DM_01470])。针对授权服务器(例如 OAuth 2.0)的实际验证可能是作为应用程序特定的解释通过外部网络协议完成的,因为 AUTOSAR 在此对本地应用程序交接点进行了标准化。 问题 Q-6ce702103e4966c7 (未决)

SovdAuthContext client SOVD-Client dm Diagnostic Server (DM) client->dm SOVD-Request dm->client HTTP 307 / SOVD-Response handler SovdAuthorization (Anwendung) dm->handler Get*Url() / ValidateAuthorization() authserver Autorisierungs-Server (extern/OAuth 2.0) handler->authserver Token-Validierung (Interpretation)

上下文图:SOVD 客户端、Diagnostic Server (DM)、SovdAuthorization 与外部授权服务之间的交互。来源:[SWS_DM_01470]、[SWS_DM_01471]、[SWS_DM_01472]、SWS Diagnostics §7.3.3.2.1 “SOVD – Authorization”

生命周期

ara::diag::SovdAuthorization 的实例化显式通过构造函数在指定 ara::core::InstanceSpecifier 以及并发模式 ConcurrencyType 的情况下进行([SWS_DM_01489])。InstanceSpecifier 必须在清单中引用 DiagnosticSovdAuthorizationInterface 的有效 PortPrototype。通过 ConcurrencyType(kConcurrent 或 kNotConcurrent)确定应用程序实现的各回调方法是否必须设计为线程安全([SWS_DM_01483]、[SWS_DM_01484]、[SWS_DM_01485])。

构造完成后,Diagnostic Server 仅在应用程序成功调用方法 Offer() 后才会转发请求([SWS_DM_01487])。解释:在 Offer() 之前到达的请求大概会被服务器丢弃或以错误拒绝。 问题 Q-84330742a61f91a7 (未决)为了终止请求转发,应用程序调用 StopOffer()([SWS_DM_01486])。最后,通过虚析构函数释放该对象([SWS_DM_01488])。管理调用 SovdAuthorization、Offer、StopOffer 以及析构函数是非线程安全的。

使用路径

在运行期间会出现两条主要交互路径:提供重定向 URL 和验证活动会话令牌。如果 SOVD 客户端发送用于客户端验证或请求令牌的查询,DM 将调用 GetAuthorizationUrl()([SWS_DM_01485])或 GetTokenUrl()([SWS_DM_01484])。应用程序评估传入的 queryParameters 以及 metaInfo,并将目标 URL 作为 ara::core::Future<ara::core::String> 异步返回,随后 DM 以 HTTP 307 (Temporary Redirect) 进行响应([SWS_DM_01471]、[SWS_DM_01472])。

如果后续的 SOVD 请求包含新的或修改过的 HTTP Authorization 标头,Diagnostic Server 将调用 ValidateAuthorization()([SWS_DM_01470]、[SWS_DM_01483])。应用程序验证传入的 token,为引用的对象 ara::diag::ClientAuthentication 分配相应的权限角色([SWS_DM_01469]),并通过 Future 返回 ValidateAuthorizationOutput。重要前提条件:一旦 Future 准备就绪,应用程序不得再使用所引用的 ClientAuthentication 对象([SWS_DM_01483])。DM 利用返回值(有效时长 validUntil 和 identity)在无需重新检查的情况下关联同一客户端的后续请求([SWS_DM_01781]、[SWS_DM_01782]),这对于 SOVD 资源锁定尤为必要([SWS_DM_01783])。

SOVD 令牌验证流程SOVD-ClientDiagnostic Server (DM)SovdAuthorizationClientAuthentication带有 Authorization 头的 SOVD 请求ValidateAuthorization(token, metaInfo, clientAuth)在内部或联机验证令牌Rollen als autorisiert setzenFuture ready: ValidateAuthorizationOutput重新识别客户端并接管角色HTTP 200 OK / 已授予资源访问权限

时序图:通过 ValidateAuthorization 进行令牌验证和角色分配的流程。来源:[SWS_DM_01469]、[SWS_DM_01470]、[SWS_DM_01483]、SWS Diagnostics §7.3.3.2.1 “SOVD – Authorization”

错误场景

错误通过 ara::core::Result 或在返回的 ara::core::Future 内映射:

  • 初始化和建模错误:如果实例化失败,将报告违规,例如 InstanceSpecifierMappingIntegrityViolation(无效的模型元素)、PortInterfaceMappingViolation(错误的接口类型)、ProcessMappingViolation(缺少进程引用)或 InstanceSpecifierAlreadyInUseViolation([SWS_DM_01489])。
  • Offer 时的发布错误:在发生错误时,如果服务已处于活动状态,Offer() 将返回 DiagOfferErrc::kAlreadyOffered;如果配置与 DEXT 数据不匹配,则返回 DiagOfferErrc::kConfigurationMismatch([SWS_DM_01487])。
  • 令牌验证错误:如果无法验证令牌,ValidateAuthorization() 将通过 Future 返回 DiagSovdErrc::kInvalidAccessToken(无效令牌)或 DiagSovdErrc::kTemporarilyNotAvailable(例如在用于在线验证的身份验证服务器不可达时)([SWS_DM_01483])。
  • URL 确定:未针对 GetAuthorizationUrl() 和 GetTokenUrl() 定义标准化错误代码([SWS_DM_01484]、[SWS_DM_01485])。

本指南完全基于 AUTOSAR Release R25-11 规范。

成员图

类图

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

G nara__diag__SovdAuthorization23 SovdAuthorization + ~SovdAuthorization() + SovdAuthorization() + GetAuthorizationUrl() + GetTokenUrl() + Offer() + StopOffer() + ValidateAuthorization()

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

Constructs the port for SOVD Authorization interface.

explicit SovdAuthorization (ara::core::InstanceSpecifier instance Specifier, ConcurrencyType concurrencyType) noexcept;

Destructor of SovdAuthorization.

virtual ~SovdAuthorization () noexcept;

方法

Get the URL that the SOVD client shall use for authorization. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s authorize endpoint.

virtual ara::core::Future< ara::core::String > GetAuthorizationUrl (const ara::core::Map< const ara::core::StringView, const ara::core::Vector< const ara::core::StringView > > &queryParameters, const MetaInfo &metaInfo) noexcept=0;

Get the URL that the SOVD client shall use to request a token. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s token endpoint.

virtual ara::core::Future< ara::core::String > GetTokenUrl (const ara::core::Map< const ara::core::StringView, const ara::core::Vector< const ara::core::StringView > > &queryParameters, const MetaInfo &meta Info) noexcept=0;
Offer 函数

This Offer will enable the DM to forward request messages to this handler.

ara::core::Result< void > Offer () noexcept;
StopOffer 函数

This StopOffer will disable the forwarding of request messages from DM.

void StopOffer () noexcept;

This function validates the authorization token sent by the SOVD client. The application shall validate the authorization token according to the authorization protocol used in the system and then according to the outcome set the respective roles as authorized in the clientAuthentication that is passed as parameter. If OAuth 2.0 is used, this would implement the validation that is supposed to happen in the Resource Server.

virtual ara::core::Future< ValidateAuthorizationOutput > Validate Authorization (ara::core::StringView token, const MetaInfo &metaInfo, ClientAuthentication &clientAuthentication) noexcept=0;

嵌套类型

方法文档

函数 GetAuthorizationUrl [SWS_DM_01485] Upstream: RS_Diag_04268

virtual ara::core::Future< ara::core::String > GetAuthorizationUrl (const ara::core::Map< const ara::core::StringView, const ara::core::Vector< const ara::core::StringView > > &queryParameters, const MetaInfo &metaInfo) noexcept=0;

Get the URL that the SOVD client shall use for authorization. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s authorize endpoint.

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopeclass ara::diag::SovdAuthorization
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
queryParametersThe query parameters passed in the request.
metaInfoThe meta information of a diagnostic service port.

Rückgabewert

TypBeschreibung
ara::core::Future<ara::core::String >Returns the URL, that the SOVD client shall use for authorization.

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_01485
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01485@rel:R25-11#39c38591
Content hash
39c38591
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01485
Status: valid/unmigrated Version: rel:R25-11#d45641ff Versionshistorie & Revisions (1 transition, 5 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_01485@rel:R25-11#d45641ff
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#8d714d092026-09-30
  • R22-11rel:R22-11#16824a3e2026-10-14
  • R23-11rel:R23-11#76cd545a2026-10-14
  • R24-11rel:R24-11#6525fcf82026-10-14
  • R25-11rel:R25-11#d45641ff2026-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

函数 GetTokenUrl [SWS_DM_01484] Upstream: RS_Diag_04268

virtual ara::core::Future< ara::core::String > GetTokenUrl (const ara::core::Map< const ara::core::StringView, const ara::core::Vector< const ara::core::StringView > > &queryParameters, const MetaInfo &meta Info) noexcept=0;

Get the URL that the SOVD client shall use to request a token. The SOVD client will be redirected to that URL. If OAuth 2.0 is used, this would be the URL to look up the Authorization Server’s token endpoint.

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopeclass ara::diag::SovdAuthorization
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
queryParametersThe query parameters passed in the request.
metaInfoThe meta information of a diagnostic service port.

Rückgabewert

TypBeschreibung
ara::core::Future<ara::core::String >Returns the URL that the SOVD client shall use to request a token.

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_01484
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01484@rel:R25-11#bf081340
Content hash
bf081340
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01484
Status: valid/unmigrated Version: rel:R25-11#f6a201d9 Versionshistorie & Revisions (1 transition, 5 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_01484@rel:R25-11#f6a201d9
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#7e533d902026-09-30
  • R22-11rel:R22-11#17e901a02026-10-14
  • R23-11rel:R23-11#42f1bade2026-10-14
  • R24-11rel:R24-11#a069b6f52026-10-14
  • R25-11rel:R25-11#f6a201d92026-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

函数 Offer [SWS_DM_01487] Upstream: RS_Diag_04268

ara::core::Result< void > Offer () noexcept;

This Offer will enable the DM to forward request messages to this handler.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0834519262c7 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::diag::SovdAuthorization 的同步成员函数 Offer 激活 Diagnostic Management (DM) 向关联处理程序实例转发请求消息的功能 [SWS_DM_01487]。它不接受任何参数,并返回一个 ara::core::Result<void>,用以确认调用成功或报告发生的错误 [SWS_DM_01487]。

关于错误处理,[SWS_DM_01487] 指定了来自 DiagOfferErrc 且具有回滚语义的两个具体错误代码:

  • DiagOfferErrc::kAlreadyOffered:当该服务已为此实例提供时发生 [SWS_DM_01487]。
  • DiagOfferErrc::kConfigurationMismatch:报告配置与 DEXT 描述数据不一致 [SWS_DM_01487]。

关于执行属性,该调用声明为异常安全(exception safe),但视为非线程安全(not thread-safe)[SWS_DM_01487]。因此,不得对同一实例并发调用该函数。

在与 DM 交互时,该函数符合 AUTOSAR Adaptive 诊断接口的通用提供模式,该模式也用于通用例程或 DoIP 服务(例如 [SWS_DM_00557]、[SWS_DM_00725] 或 [SWS_DM_00809])。在处理程序未通过 Offer 注册之前,DM 不会将请求转发给应用程序,或者使用预定义的替代值对其进行处理 [SWS_DM_01487]、[SWS_DM_01525]、[SWS_DM_01527]。

此文本由 AI 创建。所有陈述均仅基于所提供的规范摘录。

实现者指南即将推出(复杂度 I1)

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

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error.

Fehler

FehlercodeBeschreibung
DiagOfferErrc::kAlreadyOfferedrollback_semantics The service is already offered.
DiagOfferErrc::kConfigurationMismatchrollback_semantics monitor configuration does not match DEXT

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

Record
AUTOSAR/AP/record/SWS_DM_01487
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01487@rel:R25-11#fe00c1a3
Content hash
fe00c1a3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01487
Status: valid/unmigrated Version: rel:R25-11#a9605b85 Versionshistorie & Revisions (1 transition, 5 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_01487@rel:R25-11#a9605b85
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#1ee581c62026-09-30
  • R22-11rel:R22-11#d1dad9c62026-10-14
  • R23-11rel:R23-11#853e9a012026-10-14
  • R24-11rel:R24-11#59ae33f32026-10-14
  • R25-11rel:R25-11#a9605b852026-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

函数 SovdAuthorization [SWS_DM_01489] Upstream: RS_Diag_04268, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit SovdAuthorization (ara::core::InstanceSpecifier instance Specifier, ConcurrencyType concurrencyType) noexcept;

Constructs the port for SOVD Authorization interface.

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopeclass ara::diag::SovdAuthorization
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is referenced by a pingViolation DiagnosticSovdAuthorizationPortMapping needs to be typed by a DiagnosticSovdAuthorizationInterface. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.

Parameter (in)

ParameterBeschreibung
instanceSpecifierInstanceSpecifier to a PortPrototype of a DiagnosticSovdAuthorizationInterface service instance in the manifest.
concurrencyTypeSpecifies 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.

Record
AUTOSAR/AP/record/SWS_DM_01489
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01489@rel:R25-11#7dcb65ae
Content hash
7dcb65ae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01489
Status: valid/unmigrated Version: rel:R25-11#c9585cf9 Versionshistorie & Revisions (1 transition, 5 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_01489@rel:R25-11#c9585cf9
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#af23d0c72026-09-30
  • R22-11rel:R22-11#45eb7d512026-10-14
  • R23-11rel:R23-11#97066c872026-10-14
  • R24-11rel:R24-11#07afb8a72026-10-14
  • R25-11rel:R25-11#c9585cf92026-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

函数 StopOffer [SWS_DM_01486] Upstream: RS_Diag_04268

void StopOffer () noexcept;

This StopOffer will disable the forwarding of request messages from DM.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c318a30e32ad 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

类 ara::diag::SovdAuthorization(头文件 ara/diag/sovd_authorization.h)的方法 StopOffer 用于阻止将 Diagnostic Management (DM) 传入的诊断请求转发给授权服务 [SWS_DM_01486]。该函数具有签名 void StopOffer() noexcept。它不接受任何参数,也不向调用方返回返回值 [SWS_DM_01486]。

错误处理与并发

该函数被指定为异常安全(exception safe),并且不抛出异常 [SWS_DM_01486]。未针对此调用定义特定错误代码以及向 DET 或 DEM 发送错误消息。关于并发性,该方法归类为非线程安全(not thread-safe)[SWS_DM_01486]。如果多个线程使用同一个实例上下文,则必须由调用方应用程序同步访问。解释:此调用可能主要在应用程序正常关闭或暂时撤销授权就绪状态时执行。 问题 Q-6c81f2dc7ee903ca (未决)

相互作用

该概念遵循 AUTOSAR Adaptive 诊断中接口的通用设计模式:名称 StopOffer 借鉴了 ara::com 的服务接口,但在 ara::diag 内部代表独立的实现 AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”。相同的停用语义存在于整个模块中的许多其他端口接口中,例如 GenericRoutine [SWS_DM_00558]、Authentication [SWS_DM_01131]、CommunicationControl [SWS_DM_00810] 以及 Monitor [SWS_DM_01089]。

本使用说明基于 AUTOSAR AP R25-11 规范自动生成。

实现者指南即将推出(复杂度 I2)

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

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_DM_01486
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01486@rel:R25-11#3029b223
Content hash
3029b223
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01486
Status: valid/unmigrated Version: rel:R25-11#9bb7ae44 Versionshistorie & Revisions (1 transition, 5 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_01486@rel:R25-11#9bb7ae44
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#30189eb12026-09-30
  • R22-11rel:R22-11#14fbd18b2026-10-14
  • R23-11rel:R23-11#31cc13ad2026-10-14
  • R24-11rel:R24-11#ac3ee7ea2026-10-14
  • R25-11rel:R25-11#9bb7ae442026-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

函数 ValidateAuthorization [SWS_DM_01483] Upstream: RS_Diag_04268

virtual ara::core::Future< ValidateAuthorizationOutput > Validate Authorization (ara::core::StringView token, const MetaInfo &metaInfo, ClientAuthentication &clientAuthentication) noexcept=0;

This function validates the authorization token sent by the SOVD client. The application shall validate the authorization token according to the authorization protocol used in the system and then according to the outcome set the respective roles as authorized in the clientAuthentication that is passed as parameter. If OAuth 2.0 is used, this would implement the validation that is supposed to happen in the Resource Server.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 78d8310937f8 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

当 SOVD 客户端的请求包含 Authorization HTTP 标头且其令牌尚未有效验证时,诊断服务器将调用纯虚方法 ValidateAuthorization [SWS_DM_01470]。应用程序根据系统中配置的协议(例如在资源服务器上下文中的 OAuth 2.0)检查传入的授权令牌,并为客户端分配相应的角色 [SWS_DM_01483]。

接口规范包括以下参数和返回值 SWS Diagnostics §8.52.1.1.3.5 “ValidateAuthorization”:

  • token(ara::core::StringView):从 HTTP 标头传输的访问令牌 [SWS_DM_01483]。
  • metaInfo(const MetaInfo&):诊断服务端口的元信息 [SWS_DM_01483]。
  • clientAuthentication(ClientAuthentication&):应用程序通过其设置 SOVD 客户端已验证身份角色的对象 [SWS_DM_01483]。在提供返回的 Future 之后,应用程序不得再使用此引用 [SWS_DM_01483]。
  • 返回值:一个 ara::core::Future<ValidateAuthorizationOutput> [SWS_DM_01483]。成功验证后,结构体 ValidateAuthorizationOutput [SWS_DM_01927] 包含有效性时间戳 validUntil [SWS_DM_01820] 以及客户端标识符 identity [SWS_DM_01819]。

Diagnostic Server 将带有相同令牌的请求所分配的角色在达到 validUntil 之前视为已通过身份验证 [SWS_DM_01469],并通过令牌或身份重新识别 SOVD 客户端 [SWS_DM_01781] [SWS_DM_01782]。这种重新识别对于临时操作和 SOVD 锁定等是必需的,因为未通过身份验证的客户端将被拒绝锁定访问并返回 HTTP 401 [SWS_DM_01783]。

发生错误时,Future 将以 DiagSovdErrc::kInvalidAccessToken(无效令牌)或 DiagSovdErrc::kTemporarilyNotAvailable(例如身份验证服务器暂时不可用)来解决(resolve)[SWS_DM_01483]。该函数被指定为 noexcept 且异常安全;实现是否必须是线程安全的,取决于构造函数中传递的 ConcurrencyType [SWS_DM_01483]。

本使用说明由 AI 生成;仅 AUTOSAR 规范具有约束力。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopeclass ara::diag::SovdAuthorization
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
tokenThe authorization token sent by the SOVD client in the HTTP Authorization header.
metaInfoThe meta information of a diagnostic service port.
clientAuthenticationObject used by the application to report the authenticated state of the SOVD client. After the returned Future is ready, the referenced object shall not be used any more by the application.

Rückgabewert

TypBeschreibung
ara::core::Future<ValidateAuthorizationOutput >Either ValidateAuthorizationOutput (for a successful validation) or an error code.

Fehler

FehlercodeBeschreibung
DiagSovdErrc::kInvalidAccessTokenrollback_semantics The access token provided by the client is invalid.
DiagSovdErrc::kTemporarilyNotAvailablerollback_semantics The request currently can’t be served, e.g. in case the access token currently can’t be verified (e.g. because online verification is needed and the authentication server can’t be reached).

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

Record
AUTOSAR/AP/record/SWS_DM_01483
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01483@rel:R25-11#aa1a3d52
Content hash
aa1a3d52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01483
Status: valid/unmigrated Version: rel:R25-11#3ab745cf Versionshistorie & Revisions (1 transition, 5 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_01483@rel:R25-11#3ab745cf
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#8a2fbb692026-09-30
  • R22-11rel:R22-11#600c614a2026-10-14
  • R23-11rel:R23-11#0433454d2026-10-14
  • R24-11rel:R24-11#7b10afcc2026-10-14
  • R25-11rel:R25-11#3ab745cf2026-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

函数 ~SovdAuthorization [SWS_DM_01488] Upstream: RS_Diag_04268

virtual ~SovdAuthorization () noexcept;

Destructor of SovdAuthorization.

Header-Datei#include "ara/diag/sovd_authorization.h"
Scopeclass ara::diag::SovdAuthorization
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_01488
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01488@rel:R25-11#81274e42
Content hash
81274e42
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01488
Status: valid/unmigrated Version: rel:R25-11#4b141c27 Versionshistorie & Revisions (1 transition, 5 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_01488@rel:R25-11#4b141c27
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#3e0dc97d2026-09-30
  • R22-11rel:R22-11#a7d4ac032026-10-14
  • R23-11rel:R23-11#b65bc1cb2026-10-14
  • R24-11rel:R24-11#05fce8112026-10-14
  • R25-11rel:R25-11#4b141c272026-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