eclipse-thingweb / eclipse-thingweb/node-wot
Falling back to nosec security if scheme is unknown
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
PR https://github.com/eclipse-thingweb/node-wot/pull/1552 raised a concern about security schemes we don't understand. We used to silently ignore them in some cases.
If we use a security schema `foo` we don't know, like
```
"securityDefinitions": {
"nosecIOT": {
"scheme": "foo"
}
}
```
node-wot raises an error like `TD validation error: must be equal to one of the allowed values`.
This is fine as is!
However, if we prefix it (e.g., `iot:nosecXYZ`), we simply log a warning.
```
"securityDefinitions": {
"nosecIOT": {
"scheme": "iot:nosecXYZ"
}
}
```
`HttpClient cannot set security scheme 'iot:nosecXYZ'`
Some questions that come to my mind
* Shall we look into that and raise an error for unknown schemes? What is the best way of doing that across bindings?
* What about the exposing part?
* Is this also a topic for the Scripting API?
Contributor guide
Research direction
Start by reading PR 1552 and reproducing both securityDefinitions examples from this issue: the unprefixed unknown scheme and the prefixed iot:nosecXYZ scheme. Trace where the warning and validation error originate across bindings, then determine the expected behavior for consuming, exposing, and Scripting API paths. Done means the handling of unknown schemes is agreed and consistently covered across the affected paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- backend-api-design, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100