Implement Security Bootstrapping #3081
Labels
oauth
OAuth implementation and support
task
w3c-compliance
wot-discovery
W3C WoT Discovery specification
Milestone
In the WoT Discovery specification, "security bootstrapping" requires that an unauthenticated request for a Thing Description is responded to in a certain way such that a Consumer knows how to authenticate in order to access the resource.
WebThings Gateway already responds with a
401
response if a valid JWT is not provided, which would be valid for the Bearer security scheme if aWWW-Authenticate
header was also provided. Alternatively, if the OAuth2 scheme is used it should respond with a302
or303
response and implement the full OAuth2 flow.Note that authenticating access to the Thing Description is technically different to authenticating access to the Thing's interaction affordances, which is what the security metadata inside the Thing Description is for. Currently WebThings Gateway uses the same security mechanism (JWT tokens) for both. It claims to use OAuth2 for interaction affordances, but that doesn't appear to be fully implemented.
The text was updated successfully, but these errors were encountered: