Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicit channel auth scheme #182

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

elf-pavlik
Copy link
Member

@elf-pavlik elf-pavlik commented Jul 6, 2023

closes #155

TODO

  • Once agreed on, update examples in all the channel types

Preview | Diff (doesn't show the changes in code snippets!)

@elf-pavlik elf-pavlik added this to the 0.3 milestone Jul 6, 2023
@elf-pavlik elf-pavlik requested review from csarven and CxRes July 6, 2023 12:43
@CxRes
Copy link
Member

CxRes commented Jul 6, 2023

I would suggest that you add an implementation guidance box, otherwise spec users will wonder why we are adding channel auth in the examples even though it has no mention in the spec.

@elf-pavlik
Copy link
Member Author

It also shows in the data model as required information on Subscription Service and Notification Channel. Actually that the only change that gets highlighted in the HTML diff.

@CxRes
Copy link
Member

CxRes commented Jul 7, 2023

That should be "zero, one or many" (I disagree with @csarven 's way of describing, we have argued this previously, because there is no way to indicate that Subscription Service may not advertise this property at all and that would be OK). I would also suggest the property on Subscription Service be called authSchemes instead of channelAuthScheme for consistency with Notification Channels.

@elf-pavlik
Copy link
Member Author

I would also suggest the property on Subscription Service be called authSchemes instead of channelAuthScheme for consistency with Notification Channels.

I think chanelAuthScheme is consistent with channelType, also having two different predicates only differ by final s could be confusing.

That should be "zero, one, or many"

If we want it always to be explicit it can't be zero, one of the examples uses None. In what scenarios would you see zero?

@CxRes
Copy link
Member

CxRes commented Jul 9, 2023

I think chanelAuthScheme is consistent with channelType, also having two different predicates only differ by final s could be confusing.

Plural indicates that a thing is an array. Not having an "s" is the inconsistent thing, imho.

I strongly disagree with your definition of consistency. AuthSchemes are only meaningful in the context of the channel, but is a general thing. channelType is called so because type is vague thing even when described in the context of a channel (and can be confused with other kinds of "types" like "data type") and that we explicitly define a "Channel Type" in the spec.

If we want it always to be explicit it can't be zero, one of the examples uses None. In what scenarios would you see zero?

You could conceivably have a channel that you need to subscribe to (one a server will create on request only), but is otherwise public and does not require authorization (not that I would recommend anyone make one, but consistency demands that we allow such a thing).

What I would concede is that if you specify the property, then zero entries makes no sense. But you should be able to skip specifying channelAuthScheme altogether in the above scenario.

protocol.html Outdated Show resolved Hide resolved
Copy link
Member

@csarven csarven left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together and thinking about this problem/solution. Pardon the late reply.

Approving but see change requests. I'd like to see a short paragraph/section for #authentication-scheme describing a bit further. See review comments.

@@ -779,6 +786,7 @@ <h3 property="schema:name" content="Subscription Service Data Model">Subscriptio
<ul>
<li id="notify-subscription-id">One <code>id</code> property to identify the subscription service.</li>
<li id="notify-channelType">One <code>channelType</code> property to state the <a href="#notification-channel-types" rel="rdfs:seeAlso">notification channel type</a>.</li>
<li id="notify-channelAuthScheme">One or many <code>channelAuthScheme</code> property to state the supported authentication schemes.</li>
Copy link
Member

Choose a reason for hiding this comment

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

I couldn't suggest a change to add a paragraph/section (perhaps right after #authentication-authorization or a new subsection of the #protocol section.) The following suggestion would refer to Authentication Scheme.

Suggested change
<li id="notify-channelAuthScheme">One or many <code>channelAuthScheme</code> property to state the supported authentication schemes.</li>
<li id="notify-channelAuthScheme">One or many <code>channelAuthScheme</code> property to state the supported <a href="#authentication-scheme">authentication schemes</a>.</li>

@@ -807,6 +816,7 @@ <h3 property="schema:name" content="Notification Channel Data Model">Notificatio
<ul>
<li id="notify-channel-id">One <code>id</code> property to identify the notification channel.</li>
<li id="notify-channel-type">One <code>type</code> property to state the <a href="#notification-channel-types" rel="rdfs:seeAlso">notification channel type</a>.</li>
<li id="notify-channel-authScheme">One <code>authScheme</code> property to state the authentication scheme used for the channel.</li>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<li id="notify-channel-authScheme">One <code>authScheme</code> property to state the authentication scheme used for the channel.</li>
<li id="notify-channel-authScheme">One <code>authScheme</code> property to state the <a href="#authentication-scheme">authentication scheme</a> used for the channel.</li>

@@ -807,6 +816,7 @@ <h3 property="schema:name" content="Notification Channel Data Model">Notificatio
<ul>
<li id="notify-channel-id">One <code>id</code> property to identify the notification channel.</li>
<li id="notify-channel-type">One <code>type</code> property to state the <a href="#notification-channel-types" rel="rdfs:seeAlso">notification channel type</a>.</li>
<li id="notify-channel-authScheme">One <code>authScheme</code> property to state the authentication scheme used for the channel.</li>
Copy link
Member

Choose a reason for hiding this comment

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

Curious.. is authScheme intended to be consumed by SubscriptionClient? Or towards recording what's currently in use (and for unspecified use)?

Is it required / what might not function if omitted?

@@ -807,6 +816,7 @@ <h3 property="schema:name" content="Notification Channel Data Model">Notificatio
<ul>
<li id="notify-channel-id">One <code>id</code> property to identify the notification channel.</li>
<li id="notify-channel-type">One <code>type</code> property to state the <a href="#notification-channel-types" rel="rdfs:seeAlso">notification channel type</a>.</li>
<li id="notify-channel-authScheme">One <code>authScheme</code> property to state the authentication scheme used for the channel.</li>
Copy link
Member

@csarven csarven Jul 29, 2023

Choose a reason for hiding this comment

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

I presume "None" will map to notify:None .. but we mean something like notify:AuthenticationSchemeIsNotUsed?

@csarven
Copy link
Member

csarven commented Jul 29, 2023

I think requiring channelAuthScheme with at least one value encourages (more) complete and useful information. Just as specifying the type of the channel, its endpoint, features. Why wouldn't authentication scheme information be part of this? The only thing I can think of is that it is unknown (unprovided) to the DescriptionResource and that the values may change (for some reason).

As for singular/plural, singular suffices for RDF properties as atomic statements / arcs in graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make AuthN/AuthZ of each channel explicit
3 participants