Add support for HTTP Basic authentication - #812
Conversation
| protect bearer tokens against replay attacks.</para> | ||
| <para>An ONVIF compliant device should authenticate an RTSP request at the RTSP level. If HTTP is used to tunnel the RTSP request the device shall not authenticate on the HTTP level.</para> | ||
| <para>When authenticating RTSP or HTTP methods, an ONVIF compliant device shall use digest authentication [RFC 2617] or JWT-based authorization. The credentials shall be managed with the GetUsers, CreateUsers, DeleteUsers and SetUser methods. If the device also supports WS-Security, the same set of credentials shall be used.</para> | ||
| <para>When authenticating RTSP or HTTP methods, an ONVIF compliant device shall use digest authentication [RFC 2617], HTTP Basic authentication [RFC 7617] or JWT-based authorization. The credentials shall be managed with the GetUsers, CreateUsers, DeleteUsers and SetUser methods. If the device also supports WS-Security, the same set of credentials shall be used.</para> |
There was a problem hiding this comment.
Is HTTP Basic authentication really to be applicable for RTSP?
There was a problem hiding this comment.
RTSP 1.0 mandates Basic
RTSP2.0 does not mention Basic
|
General note: It could a bit of backward compatibility issue for clients. They could expect no HTTP digest for HTTPS connection (as it was required before). Also for all currently existing profiles using of HTTP digest for HTTPS to be the expected behavior. There were no exceptions before. |
Latest changes addresses your concern. |
|
@bsriramprasad what problem are we trying to? I am not a fan of HTTP basic auth, de facto it is equivalent of removing the password. We already had issues in the past with profile Q, I have the feeling we are repeating the story here. Small provocation: isn't certificate based client authentication enough? Adding Basic Auth will imply that by mistake vendor will implement HTTP + Basic Auth, you can take this for granted. |
Good point! Agreed, and that is why the constraint has to be testable rather than advisory. Profile Q's mitigation was a deployment guidance page. This one is normative and checkable — the updated requirements text is in the PR and explained here for coherent PR discussion
Each requirement maps to a conformance assertion.
mTLS binds authentication to the TLS connection. A gateway terminates TLS, so the client certificate never reaches the device, mTLS did not replace/deprecate digest and continues to be in core. Per-client certificate issuance, renewal, and revocation is also a substantial operational burden.
The problem we are addressing is interoperability with TLS-only deployments and architectures where Digest cannot be forwarded transparently through a proxy because it is bound to the request URI and server nonce. Mutual TLS is another valid option, but it requires client-certificate provisioning and is not equivalent to username/password authentication for existing clients and deployments. Authentication mechanisms in ONVIFClient → Device (inbound)
Device → Authorization Server (outbound)Defined in the ONVIF Security Service Specification for OAuth 2.0 client registration:
Gap addressed by this proposal. No existing inbound mechanism is simultaneously proxy-forwardable, based on device-local credentials, and free of external infrastructure.
Note on Bottomline : Basic is the only combination of stateless-forwardable, device-local credentials, and zero infrastructure. |
Add support for HTTP Basic authentication only over TLS-protected connections (RFC 7617)
Motivation
As ONVIF devices increasingly operate in cloud-connected and TLS-only deployments, the current specification's exclusive reliance on HTTP Digest authentication creates friction for modern integration patterns:
Cloud and proxy architectures: Digest authentication cannot be proxied transparently. Because the response hash is bound to the request URI and to a device-issued nonce, any intermediary that rewrites paths or distributes requests across workers must terminate and re-originate authentication itself — holding password-equivalent credentials for each device and maintaining per-device auth state. Basic authentication, being stateless and path-independent, forwards unchanged, which simplifies cloud-based device access at the cost of requiring TLS
with proper certificate validation end to end.
Regulatory direction: Frameworks such as the EU Cyber Resilience Act and NIS2 impose secure-by-design and risk-management obligations that are pushing deployments toward encrypted-by-default transport, making TLS-everywhere an increasingly common baseline.
Simplified authentication stack: Organizations enforcing TLS-only access can use Basic over TLS rather than maintaining Digest challenge-response infrastructure alongside TLS termination.
Interoperability with standard HTTP clients and tooling: HTTP Basic is universally supported across HTTP client libraries, browsers, and automation tooling without custom Digest handling.
This change introduces HTTP Basic authentication as an optional, TLS-only feature with an explicit capability signal (
HttpBasic).Compatibility Analysis
HttpBasicis optional; per existing Core convention, an omitted capability indicates the device does not support it.WWW-Authenticatechallenge as HTTP requires; the capability is for configuration and planning, not negotiation.HttpBasicboolean attribute indevicemgmt.wsdl(GetServiceCapabilities path).Summary of Changes
doc/Core.xmlHttpBasicrow to Security capabilities (updatedmorerowscount)wsdl/ver10/device/wsdl/devicemgmt.wsdlSecurityCapabilitiesHttpBasicboolean attributeReferences