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

[Feature Request] Allow workers to pick up ioredis prefixes for ACL usage #915

Closed
lukepolo opened this issue Dec 3, 2021 · 7 comments
Closed

Comments

@lukepolo
Copy link
Contributor

lukepolo commented Dec 3, 2021

We have a lot of IoT devices that we would like to allow our workers to pick up based on a prefix. This would allow us to use ACL's to make sure they can only write / read from that prefix.

Example : a edge device places a job onto the queue with bullmq:queue:10.0.0.1:...

The ACL would allow the edge to write it based on the prefix. We currently are writing a LUA a lua script to handle this but its a pain.

@manast
Copy link
Contributor

manast commented Dec 4, 2021

I am not sure I understand the use case correctly. What would "pick up" mean in this context? Like you, you add jobs to a queue with a some prefix (could this be a group Id?) and then the workers what should they do differently based on that prefix?

@lukepolo
Copy link
Contributor Author

lukepolo commented Dec 9, 2021

Groups may solve this because of how they are prefixed.

is the key prefixed like

bullmq-prefix:queue-name:group-id:uniqueue-jobid ?

@manast
Copy link
Contributor

manast commented Dec 10, 2021

No. Jobs that are part of a group have the same key as standard jobs, the difference is that there is group list for every group that has jobs in it. The group list has this format: bull:queueName:groups:groupId

@manast
Copy link
Contributor

manast commented Dec 10, 2021

When the job is processed you can access the group Id, why can't you use that information to decide the ACL for the device?

@lukepolo
Copy link
Contributor Author

bull:queueName:groups:groupId should still work for me.

@lukepolo
Copy link
Contributor Author

these are edge devices so we dont want them to have access to anything but certain keys (redis ACL with prefixes)

This makes it so an edge device cannot get another devices information at the main redis instance

We could've done this differently but we made the bed long time ago.

@manast
Copy link
Contributor

manast commented Dec 17, 2021

@lukepolo you are welcome to discuss your requirements at more length here: https://github.com/taskforcesh/bullmq-pro-support/discussions or hit me at manast@taskforce.sh

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