-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement Airnode whitelisting #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to use all
instead of an empty array.
I am not sure whether not to add .nonempty to disallow [] since it doesn't make sense to deny all Airnodes.
I think empty arrays should be disallowed.
The "allowedAirnodes" configuration is used for both inserting/querying the data.
I couldn't catch the "querying" part, can you explain it?
I mean that an API call to get data for an non-whitelistested Airnode address with return 403. |
1a92b46
to
6397183
Compare
8505777
to
a4fd602
Compare
7f2bb6f
to
77b7a99
Compare
Closes #98
Rationale
Adding the configuration option for whitelisting addresses is simple, but there is a special case - how to whitelist all? We can have a special meaning for empty array, similarly how it's done in Airnode but I think it would be better for this to be explicit and set it to
"all"
instead (string literal instead of an array). Alternatively, we can drop the "whitelist all" use case.The naming is
"allowedAirnodes"
, because it's about Airnode addresses, but the service is not Airnode but Pusher. I don't mind this, because Pusher and Airnode are related.The
"allowedAirnodes"
configuration is used for both inserting/querying the data. The "list airnode addresses" endpoint is unchanged, because when all Airnodes are allowed we would need to scan the data storage anyway.