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

Target auth example #81

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec/section/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ the following namespace prefix bindings unless otherwise stated:
| `hctl` | https://www.w3.org/2019/wot/hypermedia# |
| `htv` | http://www.w3.org/2011/http# |
| `d2rq` | http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1# |
| `wotsec` | https://www.w3.org/2019/wot/security# |
| `idsa` | https://w3id.org/idsa/core/ |

The examples are contained in pink colored boxes:

Expand Down
19 changes: 15 additions & 4 deletions spec/section/target-vocabulary.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ An external vocabulary such as DCAT, VoID, SD is allowed here.
If a target cannot be accessed with existing vocabulary, a custom vocabulary
can be used, for example: handling an authentication flow may be specific
for that specific target. A custom ontology can be used here to describe
this authentication flow.
this authentication flow such as [W3C Web of Things Security](https://www.w3.org/2019/wot/security).

A Target (`rml:Target`) MAY contain the following properties:

Expand Down Expand Up @@ -133,12 +133,18 @@ DCAT dataset in N-Quads format with Zip compression:
</pre>

The following example shows a Target of a
MQTT stream in N-Quads format without compression:
MQTT stream in N-Quads format without compression.
Authentication is performed with a custom HTTP header called `apikey`
with token value `123456789`. Token value is described by IDSA because
WoT Security only describes the security information without providing a
way to supply the actual value of username/password, tokens, etc.
For security reasons, these values should never be provided in the RML mapping
by separating them in separate document.

<pre class="ex-target">
&lt;#MQTTStream&gt; a rml:LogicalTarget;
rml:target [ a rml:Target, td:Thing;
td:hasPropertyAffordance [
td:hasPropertyAffordance [ a td:PropertyAffordance;
td:hasForm [
# URL and content type
hctl:hasTarget "mqtt://localhost/topic";
Expand All @@ -148,13 +154,18 @@ MQTT stream in N-Quads format without compression:
mqv:options ([ mqv:optionName "qos"; mqv:optionValue "1" ] [ mqv:optionName "dup" ]);
];
];
td:hasSecurityConfiguration [ a wotsec:APIKeySecurityScheme, idsa:Token;
wotsec:in "header";
wotsec:name "apikey";
idsa:tokenValue "123456789"
];
];
rml:serialization formats:N-Quads;
.
</pre>

The following example shows a Target of a
TCP stream in N-Quads format without compression:
TCP stream in N-Quads format without compression.

<pre class="ex-target">
&lt;#TCPStream&gt; a rml:LogicalTarget;
Expand Down
Loading