-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add network-only scenarios test and implementation to system, cpp, ruby #63
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* create db/network.sql for fixture data * Add 'pubnet' aa_coll for network and aa_coll_obj * Add tests * Set up client-ip/network grant queries This gets the basic join and where setup together for finding networks/grants that match the client's IP address (by way of institution networks). There is some cleanup to do as far method signatures and adding some more tests. * Rename for_user_and_uri to for (with named args) * Move ipaddr calculation to factory
* Adds tests for nested network (allow, deny) and (deny, allow) scenarios * Changes SQL ordering of networks from desc to asc, so that we find the smallest network instead of the largest. * Removes the unnecessary math extravaganza to calculate the cidr range number
It considered the 10. IPs to be internal and ignored them. By adding this directive, it knows to use them.
botimer
requested changes
Dec 21, 2023
@@ -0,0 +1,23 @@ | |||
require "ipaddr" |
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.
move to somewhere bigger?
Mostly clarifications, except one case in authorized_client_ip_spec where the ip addresses were reversed for (allow,allow)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add db/network.sql test fixture
Add restricted-by-network test site apache config
Ensure mod_remoteip does not ignore the ip
It considered the 10. IPs to be internal and ignored them. By adding
this directive, it knows to use them.
GrantRepo correctly finds the smallest network
scenarios
smallest network instead of the largest.
number
Rename for_user_and_uri to for (with named args)
Move ipaddr calculation to factory
Open questions
I/we will need to run the tests against the test site, but that's not a meaningful thing
to do until the test site loads the network.sql fixture.