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

Best policy practices for production #3

Closed
eercanayar opened this issue Aug 13, 2018 · 1 comment
Closed

Best policy practices for production #3

eercanayar opened this issue Aug 13, 2018 · 1 comment

Comments

@eercanayar
Copy link
Contributor

In config.js line 11;

// In actual production, the policy document should be generated dynamically.

Isn't it a waste that generating a policy for every single thing? Assume that thousands of devices for an IoT solution. I think it should be only a single policy which allows publish and subscribe to topics by their certificate ID's. An example from AWS IoT docs is like this:

{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Action":["iot:Publish"],
        "Resource": ["arn:aws:iot:us-east-1:123456789012:topic/${iot:CertificateId}"]
    },
    {
        "Effect": "Allow",
        "Action": ["iot:Connect"],
        "Resource": ["*"]
    }]
}

What do you think about this, what are your recommendations about that?

@cncoder
Copy link
Contributor

cncoder commented Aug 25, 2018

  • The policy for each device should be dynamic. In other words, it should not be that all devices have the same security policy, so that there is enough flexibility.

  • For the same security policy that some devices have, you can assign them to an iot device group and then attach a policy for the group.

@cncoder cncoder closed this as completed Aug 27, 2018
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