diff --git a/index.html b/index.html index fb5552506..be3404c87 100644 --- a/index.html +++ b/index.html @@ -1359,17 +1359,56 @@

Security Vocabulary Definitions

nameName for query, header, or cookie parameters.optionalstring

APIKeySecurityScheme

API key authentication security configuration identified by the Vocabulary Term apikey (i.e., "scheme": "apikey"). This is for the case where the access token is opaque and is not using a standard token format.

Vocabulary termDescriptionAssignmentType
inSpecifies the location of security authentication information.with defaultstring (one of header, query, body, or cookie)
nameName for query, header, or cookie parameters.optionalstring
-

BearerSecurityScheme

Bearer Token [[!RFC6750]] security configuration identified by the Vocabulary Term bearer (i.e., "scheme": "bearer") for situations where bearer tokens are used independently of OAuth2. If the oauth2 scheme is specified it is not generally necessary to specify this scheme as well as it is implied. For format, the value jwt indicates conformance with [[!RFC7519]], jws indicates conformance with [[!RFC7797]], cwt indicates conformance with [[!RFC8392]], and jwe indicates conformance with [[!RFC7516]], with values for alg interpreted consistently with those standards. Other formats and algorithms for bearer tokens MAY be specified in vocabulary extensions.

+

BearerSecurityScheme

Bearer Token [[!RFC6750]] security configuration identified by the Vocabulary Term bearer (i.e., "scheme": "bearer") for situations where bearer tokens are used independently of OAuth 2.0. If the oauth2 scheme is specified it is not generally necessary to specify this scheme as well as it is implied. For format, the value jwt indicates conformance with [[!RFC7519]], jws indicates conformance with [[!RFC7797]], cwt indicates conformance with [[!RFC8392]], and jwe indicates conformance with [[!RFC7516]], with values for alg interpreted consistently with those standards. Other formats and algorithms for bearer tokens MAY be specified in vocabulary extensions.

Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
algEncoding, encryption, or digest algorithm.with defaultstring (e.g., MD5, ES256, or ES512-256)
formatSpecifies format of security authentication information.with defaultstring (e.g., jwt, cwt, jwe, or jws)
inSpecifies the location of security authentication information.with defaultstring (one of header, query, body, or cookie)
nameName for query, header, or cookie parameters.optionalstring

PSKSecurityScheme

Pre-shared key authentication security configuration identified by the Vocabulary Term psk (i.e., "scheme": "psk").

Vocabulary termDescriptionAssignmentType
identityIdentifier providing information which can be used for selection or confirmation.optionalstring
-

OAuth2SecurityScheme

OAuth2 authentication security configuration for systems conformant with [[!RFC6749]] and [[!RFC8252]], identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). For the code flow both authorization and token MUST be included. If no scopes are defined in the SecurityScheme then they are considered to be empty.

+

OAuth2SecurityScheme

OAuth 2.0 authentication security configuration for systems conformant with [[!RFC6749]], [[!RFC8252]] and (for the device flow) [[!RFC8628]], identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). +For the code flow both authorization and token MUST be included. +For the client flow token MUST be included. +For the client flow authorization MUST NOT be included. +For the device flow both authorization and token MUST be included. +In the case of the device flow +the value provided for authorization refers to the device authorization endpoint defined in [[!RFC8628]]. +The mandatory elements for each flow are summarized in the following table: +

Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
+ + + + +
Elementcodeclientdevice
authorizationmandatoryomitmandatory; refers to device authorization endpoint
tokenmandatorymandatorymandatory
refreshoptionaloptionaloptional
+

+

+Note that the table below lists these elements as "optional". In fact whether they are mandatory or not depends on the flow. +The token element is listed as optional even though it is mandatory for all predefined flows since it might +not be mandatory for some flows defined in an extension. We should investigate whether there is a better way to express these +"variant record" constraints. +

+

If multiple flows are available (for example, multiple OAuth 2.0 security schemes with different flows are given for a Form) then only +one may be selected for use by a Consumer. +If an OAuth 2.0 flow other than code, client or device needs to be specified an extension vocabulary MUST be used. +This includes the password and implicit flows, which are no longer considered best practice [[WOT-SECURITY-GUIDELINES]]. +This also applies to flows that are similar at the protocol level but do +not exactly follow the OAuth 2.0 specification, +for example by automating grants rather than invoking a user agent to interact with a human resource owner. +If no scopes are defined in the SecurityScheme then they are considered to be empty.

+

The device authorization endpoint technically uses a different protocol than the authorization endpoint used by other flows, +and it might be possible for a developer to confuse the two. +However, since the device flow does not use the regular authorization endpoint there should be no ambiguity. +We are considering however an alternative design where there is a separate element, +device_authorization, +which MUST be included for the device flow (and then the regular authorization endpoint then MUST NOT be used). +

+ + -
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server. +In the case of the device flow, the URI provided for the authorization value refers to the device authorization endpoint [[!RFC8628]]. +optionalanyURI
tokenURI of the token server.optionalanyURI
refreshURI of the refresh server.optionalanyURI
scopesSet of authorization scope identifiers provided as an array. These are provided in tokens returned by an authorization server and associated with forms in order to identify what resources a client may access and how. The values associated with a form should be chosen from those defined in an OAuth2SecurityScheme active on that form.optionalstring or Array of string
flowAuthorization flow.mandatorystring (e.g., code)
+flowAuthorization flow.mandatorystring (e.g., code, client, or device) @@ -2471,7 +2510,7 @@

securityDefinitions and security

- As another more complex example, OAuth2 makes use of scopes. + As another more complex example, OAuth 2.0 makes use of scopes. These are identifiers that may appear in tokens and must match with corresponding identifiers in a resource to allow access to that resource (or Interaction Affordance in the case of W3C WoT). diff --git a/index.template.html b/index.template.html index 8687c1527..1767f3f78 100644 --- a/index.template.html +++ b/index.template.html @@ -1308,17 +1308,56 @@

Security Vocabulary Definitions

nameName for query, header, or cookie parameters.optionalstring

APIKeySecurityScheme

API key authentication security configuration identified by the Vocabulary Term apikey (i.e., "scheme": "apikey"). This is for the case where the access token is opaque and is not using a standard token format.

Vocabulary termDescriptionAssignmentType
inSpecifies the location of security authentication information.with defaultstring (one of header, query, body, or cookie)
nameName for query, header, or cookie parameters.optionalstring
-

BearerSecurityScheme

Bearer Token [[!RFC6750]] security configuration identified by the Vocabulary Term bearer (i.e., "scheme": "bearer") for situations where bearer tokens are used independently of OAuth2. If the oauth2 scheme is specified it is not generally necessary to specify this scheme as well as it is implied. For format, the value jwt indicates conformance with [[!RFC7519]], jws indicates conformance with [[!RFC7797]], cwt indicates conformance with [[!RFC8392]], and jwe indicates conformance with [[!RFC7516]], with values for alg interpreted consistently with those standards. Other formats and algorithms for bearer tokens MAY be specified in vocabulary extensions.

+

BearerSecurityScheme

Bearer Token [[!RFC6750]] security configuration identified by the Vocabulary Term bearer (i.e., "scheme": "bearer") for situations where bearer tokens are used independently of OAuth 2.0. If the oauth2 scheme is specified it is not generally necessary to specify this scheme as well as it is implied. For format, the value jwt indicates conformance with [[!RFC7519]], jws indicates conformance with [[!RFC7797]], cwt indicates conformance with [[!RFC8392]], and jwe indicates conformance with [[!RFC7516]], with values for alg interpreted consistently with those standards. Other formats and algorithms for bearer tokens MAY be specified in vocabulary extensions.

Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
algEncoding, encryption, or digest algorithm.with defaultstring (e.g., MD5, ES256, or ES512-256)
formatSpecifies format of security authentication information.with defaultstring (e.g., jwt, cwt, jwe, or jws)
inSpecifies the location of security authentication information.with defaultstring (one of header, query, body, or cookie)
nameName for query, header, or cookie parameters.optionalstring

PSKSecurityScheme

Pre-shared key authentication security configuration identified by the Vocabulary Term psk (i.e., "scheme": "psk").

Vocabulary termDescriptionAssignmentType
identityIdentifier providing information which can be used for selection or confirmation.optionalstring
-

OAuth2SecurityScheme

OAuth2 authentication security configuration for systems conformant with [[!RFC6749]] and [[!RFC8252]], identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). For the code flow both authorization and token MUST be included. If no scopes are defined in the SecurityScheme then they are considered to be empty.

+

OAuth2SecurityScheme

OAuth 2.0 authentication security configuration for systems conformant with [[!RFC6749]], [[!RFC8252]] and (for the device flow) [[!RFC8628]], identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). +For the code flow both authorization and token MUST be included. +For the client flow token MUST be included. +For the client flow authorization MUST NOT be included. +For the device flow both authorization and token MUST be included. +In the case of the device flow +the value provided for authorization refers to the device authorization endpoint defined in [[!RFC8628]]. +The mandatory elements for each flow are summarized in the following table: +

Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
+ + + + +
Elementcodeclientdevice
authorizationmandatoryomitmandatory; refers to device authorization endpoint
tokenmandatorymandatorymandatory
refreshoptionaloptionaloptional
+

+

+Note that the table below lists these elements as "optional". In fact whether they are mandatory or not depends on the flow. +The token element is listed as optional even though it is mandatory for all predefined flows since it might +not be mandatory for some flows defined in an extension. We should investigate whether there is a better way to express these +"variant record" constraints. +

+

If multiple flows are available (for example, multiple OAuth 2.0 security schemes with different flows are given for a Form) then only +one may be selected for use by a Consumer. +If an OAuth 2.0 flow other than code, client or device needs to be specified an extension vocabulary MUST be used. +This includes the password and implicit flows, which are no longer considered best practice [[WOT-SECURITY-GUIDELINES]]. +This also applies to flows that are similar at the protocol level but do +not exactly follow the OAuth 2.0 specification, +for example by automating grants rather than invoking a user agent to interact with a human resource owner. +If no scopes are defined in the SecurityScheme then they are considered to be empty.

+

The device authorization endpoint technically uses a different protocol than the authorization endpoint used by other flows, +and it might be possible for a developer to confuse the two. +However, since the device flow does not use the regular authorization endpoint there should be no ambiguity. +We are considering however an alternative design where there is a separate element, +device_authorization, +which MUST be included for the device flow (and then the regular authorization endpoint then MUST NOT be used). +

+ + -
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server. +In the case of the device flow, the URI provided for the authorization value refers to the device authorization endpoint [[!RFC8628]]. +optionalanyURI
tokenURI of the token server.optionalanyURI
refreshURI of the refresh server.optionalanyURI
scopesSet of authorization scope identifiers provided as an array. These are provided in tokens returned by an authorization server and associated with forms in order to identify what resources a client may access and how. The values associated with a form should be chosen from those defined in an OAuth2SecurityScheme active on that form.optionalstring or Array of string
flowAuthorization flow.mandatorystring (e.g., code)
+flowAuthorization flow.mandatorystring (e.g., code, client, or device) @@ -2420,7 +2459,7 @@

securityDefinitions and security

- As another more complex example, OAuth2 makes use of scopes. + As another more complex example, OAuth 2.0 makes use of scopes. These are identifiers that may appear in tokens and must match with corresponding identifiers in a resource to allow access to that resource (or Interaction Affordance in the case of W3C WoT). diff --git a/ontology/wot-security.ttl b/ontology/wot-security.ttl index 2bfd41277..4eb66bc86 100644 --- a/ontology/wot-security.ttl +++ b/ontology/wot-security.ttl @@ -114,7 +114,7 @@ :OAuth2SecurityScheme rdf:type rdfs:Class, owl:Class ; rdfs:label "OAuth2SecurityScheme" ; rdfs:subClassOf :SecurityScheme ; - rdfs:comment "OAuth2 authentication security configuration for systems conformant with !RFC6749 and !RFC8252, identified by the term oauth2 (i.e., \"scheme\": \"oauth2\"). For the implicit flow authorization MUST be included. For the password and client flows token MUST be included. For the code flow both authorization and token MUST be included. If no scopes are defined in the SecurityScheme then they are considered to be empty."@en . + rdfs:comment "

OAuth 2.0 authentication security configuration for systems conformant with [[!RFC6749]], [[!RFC8252]] and (for the device flow) [[!RFC8628]], identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). For the code flow both authorization and token MUST be included. For the client flow token MUST be included. For the client flow authorization MUST NOT be included. For the device flow both authorization and token MUST be included. In the case of the device flow the value provided for authorization refers to the device authorization endpoint defined in [[!RFC8628]]. The mandatory elements for each flow are summarized in the following table:
Elementcodeclientdevice
authorizationmandatoryomitmandatory; refers to device authorization endpoint
tokenmandatorymandatorymandatory
refreshoptionaloptionaloptional

Note that the table below lists these elements as "optional". In fact whether they are mandatory or not depends on the flow. The token element is listed as optional even though it is mandatory for all predefined flows since it might not be mandatory for some flows defined in an extension. We should investigate whether there is a better way to express these "variant record" constraints.

If multiple flows are available (for example, multiple OAuth 2.0 security schemes with different flows are given for a Form) then only one may be selected for use by a Consumer. If an OAuth 2.0 flow other than code, client or device needs to be specified an extension vocabulary MUST be used. This includes the password and implicit flows, which are no longer considered best practice [[WOT-SECURITY-GUIDELINES]]. This also applies to flows that are similar at the protocol level but do not exactly follow the OAuth 2.0 specification, for example by automating grants rather than invoking a user agent to interact with a human resource owner. If no scopes are defined in the SecurityScheme then they are considered to be empty.

The device authorization endpoint technically uses a different protocol than the authorization endpoint used by other flows, and it might be possible for a developer to confuse the two. However, since the device flow does not use the regular authorization endpoint there should be no ambiguity. We are considering however an alternative design where there is a separate element, device_authorization, which MUST be included for the device flow (and then the regular authorization endpoint then MUST NOT be used).

"@en . :PSKSecurityScheme rdf:type rdfs:Class, owl:Class ; rdfs:label "PSKSecurityScheme" ; diff --git a/ontology/wotsec.html b/ontology/wotsec.html index a20325146..48ab5df4c 100644 --- a/ontology/wotsec.html +++ b/ontology/wotsec.html @@ -40,7 +40,7 @@

Introduction

CertSecurityScheme

IRI: https://www.w3.org/2019/wot/security#CertSecurityScheme

Certificate-based asymmetric key security configuration conformant with X509V3 identified by the term cert (i.e., "scheme": "cert").
Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:identity

DigestSecurityScheme

IRI: https://www.w3.org/2019/wot/security#DigestSecurityScheme

Digest authentication security configuration identified by the term digest (i.e., "scheme": "digest"). This scheme is similar to basic authentication but with added features to avoid man-in-the-middle attacks.
Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:in
wotsec:name
wotsec:qop

NoSecurityScheme

IRI: https://www.w3.org/2019/wot/security#NoSecurityScheme

A security configuration corresponding to identified by the term nosec (i.e., "scheme": "nosec"), indicating there is no authentication or other mechanism required to access the resource.
Sub-class ofwotsec:SecurityScheme
-

OAuth2SecurityScheme

IRI: https://www.w3.org/2019/wot/security#OAuth2SecurityScheme

OAuth2 authentication security configuration for systems conformant with !RFC6749 and !RFC8252, identified by the term oauth2 (i.e., "scheme": "oauth2"). For the implicit flow authorization MUST be included. For the password and client flows token MUST be included. For the code flow both authorization and token MUST be included. If no scopes are defined in the SecurityScheme then they are considered to be empty.
Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:authorization
wotsec:flow
wotsec:refresh
wotsec:scopes
wotsec:token
+

OAuth2SecurityScheme

IRI: https://www.w3.org/2019/wot/security#OAuth2SecurityScheme

FIX - INCONSISTENT WITH BODY. OAuth 2.0 authentication security configuration for systems conformant with [[!RFC6749]], [[!RFC8252]] and (for the device flow) [[!RFC8628]], identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). For the code flow both authorization and token MUST be included. For the client flow both authorization and token MUST be included. For the device flow both authorization and token MUST be included. If an OAuth 2.0 flow other than code, client or device needs to be specified an extension vocabulary MUST be used. This includes the password and implicit flows, which are no longer considered best practice. This also applies to flows that are similar at the protocol level but do not exactly follow the OAuth 2.0 specification, for example by automating grants rather than invoking a user agent to interact with a human resource owner. If no scopes are defined in the SecurityScheme then they are considered to be empty.

Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:authorization
wotsec:flow
wotsec:refresh
wotsec:scopes
wotsec:token

PSKSecurityScheme

IRI: https://www.w3.org/2019/wot/security#PSKSecurityScheme

Pre-shared key authentication security configuration identified by the term psk (i.e., "scheme": "psk").
Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:identity

PoPSecurityScheme

IRI: https://www.w3.org/2019/wot/security#PoPSecurityScheme

Proof-of-possession (PoP) token authentication security configuration identified by the term pop (i.e., "scheme": "pop"). Here jwt indicates conformance with !RFC7519, jws indicates conformance with !RFC7797, cwt indicates conformance with !RFC8392, and jwe indicates conformance with RFC7516, with values for alg interpreted consistently with those standards. Other formats and algorithms for PoP tokens MAY be specified in vocabulary extensions.
Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:alg
wotsec:authorization
wotsec:format
wotsec:in
wotsec:name

PublicSecurityScheme

IRI: https://www.w3.org/2019/wot/security#PublicSecurityScheme

Raw public key asymmetric key security configuration identified by the term public (i.e., "scheme": "public").
Sub-class ofwotsec:SecurityScheme
In the domain ofwotsec:identity