Skip to content

Commit

Permalink
[eclipse-ditto#926] Mention in documentation the requirement for READ…
Browse files Browse the repository at this point in the history
… permission granted on things by the policy action activateTokenIntegration.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
  • Loading branch information
yufei-cai committed Jan 13, 2021
1 parent 510640f commit 01e65e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
9 changes: 5 additions & 4 deletions documentation/src/main/resources/openapi/ditto-api-2.yml
Expand Up @@ -3464,8 +3464,8 @@ paths:
summary: Activate token integration subjects for this policy
description: |-
Only possible with JWT authentication.
For each entry the user is granted the EXECUTE permission, inject a subject calculated according to the JWT
with which the user is authenticated.
For each entry the user is granted the EXECUTE permission and contains a READ permission granted to
a things resource path, inject a subject calculated according to the JWT with which the user is authenticated.
This subject is configurable.
The injected subjects expire when the JWT expires.
tags:
Expand Down Expand Up @@ -3911,8 +3911,9 @@ paths:
summary: Activate the token integration subject for this policy entry
description: |-
Only possible with JWT authentication.
If the user is granted the EXECUTE permission for this entry, inject a subject calculated according to the JWT
with which the user is authenticated.
If this entry contains a READ permission granted to a things resource path
and the user is granted the EXECUTE permission for this entry,
inject a subject calculated according to the JWT with which the user is authenticated.
This subject is configurable.
The injected subject expires when the JWT expires.
tags:
Expand Down
Expand Up @@ -12,8 +12,8 @@ post:
summary: Activate token integration subjects for this policy
description: |-
Only possible with JWT authentication.
For each entry the user is granted the EXECUTE permission, inject a subject calculated according to the JWT
with which the user is authenticated.
For each entry the user is granted the EXECUTE permission and contains a READ permission granted to
a things resource path, inject a subject calculated according to the JWT with which the user is authenticated.
This subject is configurable.
The injected subjects expire when the JWT expires.
tags:
Expand Down
Expand Up @@ -12,8 +12,9 @@ post:
summary: Activate the token integration subject for this policy entry
description: |-
Only possible with JWT authentication.
If the user is granted the EXECUTE permission for this entry, inject a subject calculated according to the JWT
with which the user is authenticated.
If this entry contains a READ permission granted to a things resource path
and the user is granted the EXECUTE permission for this entry,
inject a subject calculated according to the JWT with which the user is authenticated.
This subject is configurable.
The injected subject expires when the JWT expires.
tags:
Expand Down
3 changes: 3 additions & 0 deletions documentation/src/main/resources/pages/ditto/basic-policy.md
Expand Up @@ -76,6 +76,9 @@ to the following HTTP routes:
- [POST /api/2/policies/{policy-id}/entries/{label}/actions/deactivateTokenIntegration](/http-api-doc.html#/Policies/post_policies__policyId__entries__label__actions_deactivateTokenIntegration)<br/>
Remove the token integration subject from 1 policy entry.

The action `activateTokenIntegration` only injects the token integration subject into policy entries containing
a granted `READ` permission for a thing resource path.

To configure the token integration subject, set the path
```
ditto.gateway.authentication.oauth.token-integration-subject
Expand Down

0 comments on commit 01e65e2

Please sign in to comment.