Skip to content

Add condition to authorization evaluation#134

Open
csarven wants to merge 8 commits intomainfrom
feature/authorization-condition
Open

Add condition to authorization evaluation#134
csarven wants to merge 8 commits intomainfrom
feature/authorization-condition

Conversation

@csarven
Copy link
Copy Markdown
Member

@csarven csarven commented Mar 24, 2026

This PR supersedes #133 and closes #81 .


This PR introduces acl:condition as an additional requirement on an acl:Authorization, building on the notion of extensibility previously referenced in the Authorization Extensions section of the specification. The feature rests on a capability detection mechanism: servers that support specific condition types, e.g., acl:IssuerCondition and acl:ClientCondition (specified in this version of the specification), advertise them via Link headers on the effective ACL resource. Clients discover supported condition types from those headers and deploy condition-bearing authorizations accordingly. Condition types not signalled by the server are not used in Authorization Evaluation. When multiple conditions are present, they are conjunctive, i.e., all must be satisfied for an Authorization to be applicable. This mechanism paves the way for additional condition types to be incorporated in the future based on needs and implementations in the ecosystem, e.g., time-based conditions or ODRL policies, as anticipated in Authorization Extensions.

The PR includes the following changes (also included in the #changelog of the specification) with correction classes:

Correction Class Description
1 Amend broken links, style sheets, or invalid markup.
2 Amend language and document details.
4 Add requirements for ACL Resource Condition Discovery.
4 Add Access Conditions section describing the condition requirement in an Authorization.
4 Update Authorization Conformance to include acl:condition as part of an applicable Authorization.
4 Add Condition Evaluation section describing the evaluation of conditions and their conjunctive requirement.
2 Add example query demonstrating access conditions with client condition and issuer condition.
2 Add security consideration advisement for client-issuer-agnostic control scenarios.
2 Add security consideration advisement for condition-unaware server scenarios.
2 Add privacy consideration advisement for client and issuer information exposure.
2 Amend first- and third-party context in security and privacy review.
2 Add note about discovering condition types via effective ACL resource without additional requests.

Related TODOs (as separate PRs):

  • Update the ACL vocabulary with the new terms.
  • Update Conformance section to define classes of products and mark advisement levels.
  • ...

Other TODOs:

  • Call for reviews, implementations or commitment to implement.
  • Discuss in the community.

Preview

@csarven csarven added this to the cg-draft milestone Mar 24, 2026
@csarven csarven requested a review from uvdsl March 24, 2026 09:09
@csarven csarven self-assigned this Mar 24, 2026
@csarven csarven force-pushed the feature/authorization-condition branch from f470bc8 to 6e5a2ec Compare March 24, 2026 12:09
@csarven csarven requested a review from TallTed March 28, 2026 10:31
Copy link
Copy Markdown
Member

@uvdsl uvdsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @csarven for putting this together!
I left some inline comments. And here are more general questions:

  1. Do we need to mention the new link header relation in #http-definitions?
  2. Do you consider the section #access-conditions to be appendable? Could we add additional conditions (time, attested attribute, ...) in that section going forward (when consensus is reached in the CG, of course)? Or how do you envision such specification evolution, if at all?

<p id="consider-acl-resource-activities">Implementations are encouraged to use mechanisms to record activities about ACL resources for the purpose of accountability and integrity, e.g., by having audit trails, notification of changes, reasons for change, preserving provenance information.</p>
<p id="consider-provenance-accountability">Implementations that want to allow a class of write or control operations on resources are encouraged to require agents to be authenticated, e.g., for purposes of provenance or accountability.</p>
<p about="" id="consider-client-agnostic-control" rel="spec:advisement" resource="#consider-client-agnostic-control"><span property="spec:statement">Implementations are <span rel="spec:advisementLevel" resource="spec:Encouraged">encouraged</span> to consider scenarios in which Authorizations granting <code>acl:Control</code> are client-agnostic and issuer-agnostic, avoiding inadvertent <a href="#loss-of-control-mitigation" rel="rdfs:seeAlso">loss of control</a> if a client or issuer becomes unavailable or untrustworthy, as well as scenarios in which restricting control access to specific clients or issuers could expose the controller to manipulation through a malicious client or issuer.</span></p>
<p about="" id="consider-condition-legacy" rel="spec:advisement" resource="#consider-condition-legacy"><span property="spec:statement">Implementations are <span rel="spec:advisementLevel" resource="spec:StronglyEncouraged">strongly encouraged</span> to be aware that Authorizations including <code>acl:condition</code> values evaluated by a server without condition support, such as following data migration from a conditions-aware server, could result in elevated access rights. Implementations are strongly encouraged to verify Authorizations with conditions against the condition capabilities of the server prior to deployment.</span></p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementations are strongly encouraged to verify Authorizations with conditions against the condition capabilities of the server prior to deployment.

Would you consider making this statement normative in the discovery section, to be explicit about the expectation that a client may have about a server's support of authorization conditions? This relates to my above comment on the discovery section.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this statement in particular stands as advisory because it is something deployments should be aware of and not something that's testable as a requirement (at least within the scope of this specification).

I've updated the wording on #client-link-condition to signal the purpose better. #acl-condition also mentions discovery of supported condition types, and as a related matter for servers in #server-condition-evaluation that unrecognised is not part of evaluation.

There is always the possibility that a deployment will mess things up, and that's not limited to downgrading from a WAC 1.1 to 1.0 server meanwhile using the same ACL resources. For instance, even while at WAC 1.1. the server may switch authentication mechanisms or even not provide the necessary information to WAC about issuer/client for instance. Of course, these are all possible and some may be (un)likely. But I think the current text in the specification is adequate.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this works for me.

Copy link
Copy Markdown
Contributor

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks OK to me. A few small tweaks to be made.

Note: I have not reviewed with a fine tooth comb. If that is desired, please request another review, preferably with pointer to specific sections about which you're concerned.

<section id="acl-resource-condition-discovery" inlist="" rel="schema:hasPart" resource="#acl-resource-condition-discovery">
<h3 property="schema:name">ACL Resource Condition Discovery</h3>
<div datatype="rdf:HTML" property="schema:description">
<p about="" id="server-link-condition" rel="spec:requirement" resource="#server-link-condition"><span property="spec:statement">When a server wants to enable applications to discover supported condition types (<cite><a href="#access-conditions" rel="rdfs:seeAlso">Access Conditions</a></cite>) for a given <a href="#effective-acl-resource">effective ACL resource</a>, the <span rel="spec:requirementSubject" resource="spec:Server">server</span> <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> advertise each supported condition type by responding to an HTTP request on the effective ACL resource including a <code>Link</code> header with the <code>rel</code> value of <code>http://www.w3.org/ns/auth/acl#condition</code> and the condition type as link target [<cite><a class="bibref" href="#bib-rfc8288">RFC8288</a></cite>].</span></p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first thought would be to discover it in Storage Description, LWS advertises capabilities this way https://w3c.github.io/lws-protocol/lws10-core/#storage-description-capabilities

Does WAC expect that available conditions may differ across resources in the same storage. In that case it seems that mechanism to manage that variability is left out of scope.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placing condition signalling in the HTTP response header of the effective ACL resource means clients cannot alter what is supported or enforced for a given resource. Variability across resources is accommodated by the per effective ACL resource discovery and ultimately left to the URI owner to manage as appropriate. How a resource server manages that variability internally is deliberately out of scope, keeping the specification simpler and orthogonal to resource server implementation choices ( #http-interactions ).

csarven and others added 2 commits March 31, 2026 23:55
Co-authored-by: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Co-authored-by: Christoph Braun <braun@kit.edu>
@csarven csarven force-pushed the feature/authorization-condition branch from eb2f500 to cafa174 Compare March 31, 2026 22:01
@csarven
Copy link
Copy Markdown
Member Author

csarven commented Mar 31, 2026

@uvdsl , thanks for co-authoring and reviewing.

Do we need to mention the new link header relation in #http-definitions?

#http-definitions was intended to indicate parts that can be defined or registered elsewhere. Extension relation types (as with http://www.w3.org/ns/auth/acl#condition) don't need to be registered with IANA (as per Web Linking).

Do you consider the section #access-conditions to be appendable? Could we add additional conditions (time, attested attribute, ...) in that section going forward (when consensus is reached in the CG, of course)? Or how do you envision such specification evolution, if at all?

Yes, other condition types can be added to this section given need, consensus, and interest to implement. It should stay consistent with what's intended by #authorization-extensions. (Though I hope that we don't end up extending indefinitely because that'd make WAC more complicated than it was ever intended. Simple > Complex. Easier to add, harder to remove.)

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

Thank you @csarven, this looks good now.

I think the option to add more condition types is valuable, and I agree that proposals must be carefully considered before adding to not end up with an "open registry".

@csarven
Copy link
Copy Markdown
Member Author

csarven commented Apr 1, 2026

We at dokieli Enterprises commit to implementing the client features as described in this PR.

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

I plan to implement checking the client and issuer conditions as well as providing the URLs of supported conditions for servers to advertise in my Java implementation https://github.com/uvdsl/solid-wac-java

@elf-pavlik
Copy link
Copy Markdown
Member

Plans for updating https://github.com/solid-contrib/specification-tests/tree/main/web-access-control
would also be great 🤞

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

@Potherca, would you be interested in supporting client and/or issuer restrictions with WAC in the Nextcloud plugin and the PHP Solid Server? This PR might be of interest to you and your team.

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

@gibsonf1, would you be interested in supporting client and/or issuer restrictions with WAC in your TwinPod? This PR might be of interest to you and your team.

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

@damooo, would you be interested in supporting client and/or issuer restrictions with WAC in Manas? This PR might be of interest to you.

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

@woutermont, given that you implemented such checks for clients in the past, or maybe also @joachimvh, would you be interested in supporting client and/or issuer restrictions with WAC in CSS?

@uvdsl
Copy link
Copy Markdown
Member

uvdsl commented Apr 1, 2026

@bourgeoa, would you be interested in supporting client and/or issuer restrictions with WAC in NSS? This PR might be of interest to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client identification

5 participants