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

Allow placeholders in the authorization context of a connection #178

Closed
dguggemos opened this issue Jun 13, 2018 · 0 comments · Fixed by #205
Closed

Allow placeholders in the authorization context of a connection #178

dguggemos opened this issue Jun 13, 2018 · 0 comments · Fixed by #205
Assignees
Milestone

Comments

@dguggemos
Copy link
Contributor

Currently the subjects of an authorization context are defined as a fixed string, which means you have to grant this subject access to all devices of a connection. To provide more flexibility we want to introduce placeholders in the authorization subject which are replaced before the signal is processed in Ditto.
For example you can define the authorization context of a connection as:

...
"authorizationContext": ["ditto:{{ header:device-id }}"]
...

The placeholder {{ header:device-id }} is then replaced by the value of the device-id header . If a placeholder cannot be resolved, e.g. because the specified header is missing, the message is rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants