ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/ACL/ACL.java
Revision 1.12 - (view) (annotate) - [select for diffs]
Tue Jan 8 13:31:34 2002 UTC (22 years, 3 months ago) by tdb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +57 -66 lines
Diff to previous 1.11
Some final tidying to the ACL code. The IP address checking has been moved
out of the add method to a more suitable location. The code now seems to be
more readable. This should be the last 'feature' that needs doing.

Revision 1.11 - (view) (annotate) - [select for diffs]
Sun Jan 6 23:32:27 2002 UTC (22 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.10: +10 -11 lines
Diff to previous 1.10
Minor tweak to the short[] comparing code. By ensuring the wildcarded array
is the first one, we can perform less checks :-) As this is just in a local context,
the tighter coupling to the rest of the code is probably ok.
One more change to be made in the String to short[] method -- it needs to do
some more rigourous tests, and possibly return an error if the String cannot be
parsed into an IP address. At the moment it assumes the add method has
already done this. This could also make the add method neater as it would
not need to do as many checks, and would therefore look neater.

Revision 1.10 - (view) (annotate) - [select for diffs]
Mon Dec 31 19:25:39 2001 UTC (22 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.9: +1 -0 lines
Diff to previous 1.9
Opps. Lost a bracket. Right, it's time to go out for New Year :-) In fact, this
commit log will be mailed at about 1 minute into 2002 ;-)

Revision 1.9 - (view) (annotate) - [select for diffs]
Mon Dec 31 19:19:03 2001 UTC (22 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.8: +44 -22 lines
Diff to previous 1.8
Some tidying up. Removed debugging code. Added required comments.

Revision 1.8 - (view) (annotate) - [select for diffs]
Mon Dec 31 02:57:00 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.7: +1 -0 lines
Diff to previous 1.7
Added an ACLDatagramSocket. Operation is much the same as the
ACLServerSocket. Also tweaked the toString() to keep the i-scream bits as
well as the more useful stuff.

Revision 1.7 - (view) (annotate) - [select for diffs]
Mon Dec 31 01:49:13 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.6: +122 -6 lines
Diff to previous 1.6
Some significant internal changes. It should be noted that this code is still in
the debugging stage, and thus contains lots of println's :-)
The most obvious change is that when adding a rule we try to determine if it's
and IP address given as the expression. If it is, we store this in a short[] in the
ACLRule inner class. Then when performing a check we look to see if it's an
IP address rule, and then do a special check for IP addresses - which is much
more efficient than comparing two strings. We have also halved the checks
done by only comparing a rule to either the name or IP, rather than both.

Revision 1.6 - (view) (annotate) - [select for diffs]
Mon Dec 24 04:17:29 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.5: +18 -10 lines
Diff to previous 1.5
Creating a toString() for ACLRule, and modified the ACL toString() to make
use of this. It's a bit neater I think.

Revision 1.5 - (view) (annotate) - [select for diffs]
Sun Dec 23 01:05:35 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.4: +11 -24 lines
Diff to previous 1.4
The getACLString() method has been changed to a toString() method, and the
i-scream style toString() has been dropped. The functionality of toString() now
more closely resembles the Java Map's in layout.

Revision 1.4 - (view) (annotate) - [select for diffs]
Sun Dec 23 00:29:33 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3
Added serialization support to the ACL class. Also added testing of this feature
to the ACLTest class, which confirms it works nicely :-)

Revision 1.3 - (view) (annotate) - [select for diffs]
Fri Dec 21 16:49:18 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.2: +25 -25 lines
Diff to previous 1.2
Changed the LinkedList/Iterator to an ArrayList.get(n) solution. According to
Paul's research this should run at least 4 times as fast as the LinkedList in the
iterating stage. (and twice as quick as an ArrayList/Iterator solution!). Using a
plain array could make this go twice as fast again, but it's a lot more work :-)

Revision 1.2 - (view) (annotate) - [select for diffs]
Thu Dec 20 00:59:54 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.1: +93 -14 lines
Diff to previous 1.1
Fully commented, and further testing in the Socket environment. Probably
ready to integrate into the main source tree under the server util package.

Revision 1.1 - (view) (annotate) - [select for diffs]
Wed Dec 19 23:43:27 2001 UTC (22 years, 4 months ago) by tdb
Branch: MAIN
Initial checkin of ACL code for i-scream server. At present it should allow for
ServerSocket's to be wrapped up with an access control list. Very simple to
use, will javadoc sometime soon. Essentially construct a ACLServerSocket
instead of a ServerSocket, then set an ACL (defaults to open ACL). Then it
can be used as a ServerSocket due to inheritance, and will only return from
the allow() method if the connecting Socket is permitted by the ACL.

Convenience Links

Links to HEAD: (view) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a