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

ACL: Support for client id and username #10

Open
uwohlfeil opened this issue Nov 30, 2020 · 1 comment
Open

ACL: Support for client id and username #10

uwohlfeil opened this issue Nov 30, 2020 · 1 comment

Comments

@uwohlfeil
Copy link

Is it possible to add support for Username / Client ID in the ACLs?

Mosquitto Docs

%c to match the client id of the client
%u to match the username of the client

The patterns available for substition are:

    %c to match the client id of the client

    %u to match the username of the client

The substitution pattern must be the only text for that level of hierarchy. Pattern ACLs apply to all users even if the "user" keyword has previously been given.

Example:

pattern write sensor/%u/data

Allow access for bridge connection messages:

pattern write $SYS/broker/connection/%c/state
@abh
Copy link

abh commented Jan 3, 2023

I expected this to work, but other than not being explicitly documented (I think) I am not missing it. In my case I have code anyway to generate the claims, so it's trivial to have that code just "spell out" the ACLs with the explicit username.

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

No branches or pull requests

2 participants