trust_router.git
6 years agoChange tr_mon_ prefix to mon_, no functional changes
Jennifer Richards [Wed, 11 Apr 2018 21:29:48 +0000 (17:29 -0400)]
Change tr_mon_ prefix to mon_, no functional changes

This better matches other protocol submodule naming (tid_, trp_, gss_)

6 years agoAdd encoder for monitoring responses
Jennifer Richards [Wed, 11 Apr 2018 21:06:29 +0000 (17:06 -0400)]
Add encoder for monitoring responses

  * add response encoder
  * add partial test of response encoder
  * move tr_mon.h to include directory
  * move code common to req/resp from tr_mon_req.c to tr_mon.c
  * fix a couple warnings

6 years agoAdd req encode/decode tests to make system, move from test/ to tests/
Jennifer Richards [Wed, 11 Apr 2018 16:01:14 +0000 (12:01 -0400)]
Add req encode/decode tests to make system, move from test/ to tests/

6 years agoAdd CMakeLists.txt for CLion integration
Jennifer Richards [Wed, 11 Apr 2018 15:41:48 +0000 (11:41 -0400)]
Add CMakeLists.txt for CLion integration

This is not actually used for building the trust router!

6 years agoFirst pass at monitoring request encoder/decoder and tests
Jennifer Richards [Wed, 11 Apr 2018 02:05:12 +0000 (22:05 -0400)]
First pass at monitoring request encoder/decoder and tests

Works, but not yet integrated with the build system.

6 years agoBump package and ABI version numbers 3.3.0 v3.3.0
Jennifer Richards [Fri, 23 Feb 2018 17:06:44 +0000 (12:06 -0500)]
Bump package and ABI version numbers

6 years agoFix segfault when sweeping realms and communities
Jennifer Richards [Thu, 22 Feb 2018 18:48:09 +0000 (13:48 -0500)]
Fix segfault when sweeping realms and communities

Mutation of linked lists led to dereferencing a "next" pointer when the
last item in the list was removed. Fixed in three places.

6 years agoCorrect / update example configuration files v3.0.3
Jennifer Richards [Fri, 17 Nov 2017 23:18:14 +0000 (18:18 -0500)]
Correct / update example configuration files

  * Combine filter specs into single spec with multiple match strings
  * Use example.com instead of local in example hostnames
  * Remove "max_tree_depth", which is not used

6 years agoUse default AAA servers if we have no route for a TID req realm
Jennifer Richards [Fri, 17 Nov 2017 17:10:53 +0000 (12:10 -0500)]
Use default AAA servers if we have no route for a TID req realm

Resolves https://bugs.launchpad.net/moonshot-tr/+bug/1643681

6 years agoUpdate example configuration file to include APC org and realm
Jennifer Richards [Mon, 13 Nov 2017 17:15:30 +0000 (12:15 -0500)]
Update example configuration file to include APC org and realm

6 years agoUpdate version in trust_router.spec
Jennifer Richards [Tue, 7 Nov 2017 19:04:56 +0000 (14:04 -0500)]
Update version in trust_router.spec

6 years agoBump version in configure.ac to 3.0.3
Jennifer Richards [Tue, 7 Nov 2017 18:05:50 +0000 (13:05 -0500)]
Bump version in configure.ac to 3.0.3

6 years agoReturn NULL if dh struct cannot be allocated completely
Jennifer Richards [Tue, 7 Nov 2017 17:42:55 +0000 (12:42 -0500)]
Return NULL if dh struct cannot be allocated completely

Resolves https://bugs.launchpad.net/moonshot-tr/+bug/1730679

6 years agoNeed libtool also
Jennifer Richards [Tue, 12 Sep 2017 20:31:04 +0000 (16:31 -0400)]
Need libtool also

6 years agoAdd automake and m4 to buildrequires
Jennifer Richards [Tue, 12 Sep 2017 20:28:34 +0000 (16:28 -0400)]
Add automake and m4 to buildrequires

6 years agoAdd BuildRequires: autoconf
Jennifer Richards [Tue, 12 Sep 2017 20:23:13 +0000 (16:23 -0400)]
Add BuildRequires: autoconf

Using autoconf as a build requirement seems to be a controversial
practice, but it is currently required.

6 years agoRaise priority of error messages when cannot open a socket v3.0.2
Jennifer Richards [Tue, 12 Sep 2017 02:17:27 +0000 (22:17 -0400)]
Raise priority of error messages when cannot open a socket

6 years agoUpdate version number (now 3.0.2)
Jennifer Richards [Mon, 11 Sep 2017 22:33:28 +0000 (18:33 -0400)]
Update version number (now 3.0.2)

6 years agoCopy hostname so it stays valid after config loading finishes jennifer/config_loader
Jennifer Richards [Mon, 11 Sep 2017 21:52:13 +0000 (17:52 -0400)]
Copy hostname so it stays valid after config loading finishes

6 years agoBring test programs up to date - all now pass
Jennifer Richards [Mon, 11 Sep 2017 21:51:04 +0000 (17:51 -0400)]
Bring test programs up to date - all now pass

  * Use new config loader
  * Fix various test config files so pass validation
  * Use tr_name_internal.h instead of tr_name.h

6 years agoHandle null TR_GSS_NAMES when checking for match
Jennifer Richards [Mon, 11 Sep 2017 21:46:26 +0000 (17:46 -0400)]
Handle null TR_GSS_NAMES when checking for match

6 years agoRemove Jansson dependence in tr_name.h
Jennifer Richards [Mon, 11 Sep 2017 21:45:35 +0000 (17:45 -0400)]
Remove Jansson dependence in tr_name.h

  * Move Jansson references out of tr_name.h into tr_name_internal.h
  * Move non-public API functions to tr_name_internal.h
  * Use tr_name_internal.h instead of tr_name.h except in public headers

6 years agoValidate arguments in helper function, fix whitespace issue
Jennifer Richards [Sat, 9 Sep 2017 00:05:31 +0000 (20:05 -0400)]
Validate arguments in helper function, fix whitespace issue

6 years agoRemove unused code.
Jennifer Richards [Sat, 9 Sep 2017 00:02:20 +0000 (20:02 -0400)]
Remove unused code.

6 years agoRearrange config file loading to allow splitting across files
Jennifer Richards [Fri, 8 Sep 2017 23:59:27 +0000 (19:59 -0400)]
Rearrange config file loading to allow splitting across files

Prior to this commit, configuration files were loaded one-by-one,
parsing all the sections of each file before moving to the next. This
caused problems unless the files were arranged so that realms were
defined before they were referred to by communities when the files
were read in lexical order. This commit rearranges this so that all
files are first parsed into internal JSON structures, then the first
section of all these structures is parsed, the second section of all
structures is parsed, etc. This eliminates the dependency on file
order that caused the bug.

Also fixed a memory leak: the JSON structures were not being properly
freed after being parsed. These should now be freed.

6 years agoBump version in trust_router.spec, configure.ac v3.0.1
Jennifer Richards [Tue, 18 Jul 2017 22:39:32 +0000 (18:39 -0400)]
Bump version in trust_router.spec, configure.ac

6 years agoReduce amount of debug output
Jennifer Richards [Tue, 18 Jul 2017 21:54:01 +0000 (17:54 -0400)]
Reduce amount of debug output

  * Use tr_debug functions instead of printf/fprintf
  * Stop printing route and comm tables after each TRP update
  * Fix potential (but unlikely) talloc_free() of null pointer

6 years agoOutput key expiration time on a successful request v3.0.0
Jennifer Richards [Mon, 17 Jul 2017 18:14:32 +0000 (14:14 -0400)]
Output key expiration time on a successful request

6 years agoAdd accessor for TID_SRVR_BLK's key_expiration
Jennifer Richards [Mon, 17 Jul 2017 17:29:45 +0000 (13:29 -0400)]
Add accessor for TID_SRVR_BLK's key_expiration

  * add the accessor
  * bump libtr_tid ABI version

6 years agoInitialize refcount for IDP realms
Jennifer Richards [Fri, 14 Jul 2017 22:49:10 +0000 (18:49 -0400)]
Initialize refcount for IDP realms

6 years agoFix tids/trps ports in default configuration for redhat/centos
Jennifer Richards [Fri, 14 Jul 2017 20:04:19 +0000 (16:04 -0400)]
Fix tids/trps ports in default configuration for redhat/centos

6 years agoApply all filters applicable to a GSS name to a TID req
Jennifer Richards [Fri, 14 Jul 2017 02:41:31 +0000 (22:41 -0400)]
Apply all filters applicable to a GSS name to a TID req

6 years agoBump version in trust_router.spec, configure.ac
Jennifer Richards [Thu, 29 Jun 2017 16:29:14 +0000 (12:29 -0400)]
Bump version in trust_router.spec, configure.ac

(cherry picked from commit 83348c0)

6 years agoFix loop termination condition in trps_filter_outbound_updates()
Jennifer Richards [Tue, 11 Jul 2017 15:00:55 +0000 (11:00 -0400)]
Fix loop termination condition in trps_filter_outbound_updates()

6 years agoCorrect the default TID and TRP ports in internal.cfg
Jennifer Richards [Fri, 30 Jun 2017 22:15:04 +0000 (18:15 -0400)]
Correct the default TID and TRP ports in internal.cfg

6 years agoGive warnings if expiration interval is clipped to allowed min/max
Jennifer Richards [Fri, 23 Jun 2017 15:19:46 +0000 (11:19 -0400)]
Give warnings if expiration interval is clipped to allowed min/max

 * Print warnings in tr_config.c
 * Use GLib-compliant integer as index for GLib function in trps.c

6 years agoFix memory leak in community parsing
Jennifer Richards [Thu, 22 Jun 2017 21:32:06 +0000 (17:32 -0400)]
Fix memory leak in community parsing

6 years agoFix a few bugs in the filtering. Filtering works.
Jennifer Richards [Fri, 16 Jun 2017 23:42:49 +0000 (19:42 -0400)]
Fix a few bugs in the filtering. Filtering works.

  * Change "community" to "comm" to match other usage
  * Gracefully fail to match on null field value
  * Print filter debug information

6 years agoPrint community table as a debug message
Jennifer Richards [Fri, 16 Jun 2017 17:52:23 +0000 (13:52 -0400)]
Print community table as a debug message

 * Add function to create string representation of comm table
 * Add calls to print the community table after route table
 * TODO: clean up the output so it only shows up when debugging

6 years agoFix log message to reflect broader filtering capabilities
Jennifer Richards [Thu, 15 Jun 2017 22:37:58 +0000 (18:37 -0400)]
Fix log message to reflect broader filtering capabilities

6 years agoFix JSON type for TRP peer "filters" block
Jennifer Richards [Thu, 15 Jun 2017 22:35:41 +0000 (18:35 -0400)]
Fix JSON type for TRP peer "filters" block

6 years agoProvide necessary macros from Jansson 2.5+ when using old versions
Jennifer Richards [Thu, 15 Jun 2017 20:15:58 +0000 (16:15 -0400)]
Provide necessary macros from Jansson 2.5+ when using old versions

6 years agoImplement all TRP and TID fields for filtering
Jennifer Richards [Wed, 14 Jun 2017 16:24:24 +0000 (12:24 -0400)]
Implement all TRP and TID fields for filtering

6 years agoAllow inforec filter to have access to realm and community
Jennifer Richards [Tue, 13 Jun 2017 16:32:58 +0000 (12:32 -0400)]
Allow inforec filter to have access to realm and community

6 years agoFilter outbound TRP updates (compiles but not tested)
Jennifer Richards [Mon, 12 Jun 2017 22:03:26 +0000 (18:03 -0400)]
Filter outbound TRP updates (compiles but not tested)

 * Add methods to count and remove inforecs from an update
 * Filter updates after collecting but before sending

6 years agoFilter inbound TRP records (compiles but not tested)
Jennifer Richards [Mon, 12 Jun 2017 20:14:21 +0000 (16:14 -0400)]
Filter inbound TRP records (compiles but not tested)

6 years agoUse new tr_filter_apply() function for TID_REQ filtering
Jennifer Richards [Mon, 12 Jun 2017 17:54:11 +0000 (13:54 -0400)]
Use new tr_filter_apply() function for TID_REQ filtering

6 years agoCode for testing the filters now works
Jennifer Richards [Mon, 12 Jun 2017 17:17:44 +0000 (13:17 -0400)]
Code for testing the filters now works

6 years agoClean up the code a bit
Jennifer Richards [Mon, 12 Jun 2017 17:00:18 +0000 (13:00 -0400)]
Clean up the code a bit

 * Avoid looking inside TR_NAME to encode JSON
 * Add const modifier to decoder signature
 * Only free TR_MSG payload if it is non-NULL

6 years agoIn-progress commit.
Jennifer Richards [Thu, 8 Jun 2017 23:01:54 +0000 (19:01 -0400)]
In-progress commit.

 * Allow array for filter spec match field
 * Validate filters and filter specs
 * Add filter to TRP_PEER
 * Add filter tests in filt_test.c
 * Add several test filter JSON files

6 years agoIn-progress check-in.
Jennifer Richards [Wed, 7 Jun 2017 19:23:40 +0000 (15:23 -0400)]
In-progress check-in.

 * Created TR_NAME version of wildcard matching, plus a unit test
 * Added function to compare a TR_NAME with plain C string
 * Renamed TR_FILTER_TYPE enum entries
 * Reordered some #includes
 * Added filter field handling table and accessors
 * Implemented general tr_filter_apply() function

6 years agoIgnore case when translating a string to an inforec type
Jennifer Richards [Tue, 6 Jun 2017 20:33:40 +0000 (16:33 -0400)]
Ignore case when translating a string to an inforec type

6 years agoProperly track JSON reference to make code match comment.
Jennifer Richards [Fri, 2 Jun 2017 20:07:22 +0000 (16:07 -0400)]
Properly track JSON reference to make code match comment.

6 years agoAdd/move some comments.
Jennifer Richards [Fri, 2 Jun 2017 19:48:15 +0000 (15:48 -0400)]
Add/move some comments.

6 years agoClean up formatting, no functional changes.
Jennifer Richards [Fri, 2 Jun 2017 16:05:34 +0000 (12:05 -0400)]
Clean up formatting, no functional changes.

6 years agoFix misleading indentation
Jennifer Richards [Tue, 6 Jun 2017 18:14:38 +0000 (14:14 -0400)]
Fix misleading indentation

6 years agoPrint version information on startup and add --version option
Jennifer Richards [Tue, 6 Jun 2017 18:14:18 +0000 (14:14 -0400)]
Print version information on startup and add --version option

7 years agoAdd missing dependency for t_constraint
Jennifer Richards [Fri, 13 Jan 2017 17:18:06 +0000 (12:18 -0500)]
Add missing dependency for t_constraint

7 years agoUpdate version info. v2.1.1
Jennifer Richards [Wed, 11 Jan 2017 16:34:18 +0000 (11:34 -0500)]
Update version info.

7 years agoMerge branch 'master' into jennifer/trp-devel
Jennifer Richards [Wed, 11 Jan 2017 16:25:23 +0000 (11:25 -0500)]
Merge branch 'master' into jennifer/trp-devel

7 years agoBring back tids_start() function.
Jennifer Richards [Wed, 11 Jan 2017 16:24:37 +0000 (11:24 -0500)]
Bring back tids_start() function.

7 years agoRestore interface compatibility with libtr_tid.so.2
Jennifer Richards [Tue, 10 Jan 2017 21:19:39 +0000 (16:19 -0500)]
Restore interface compatibility with libtr_tid.so.2

7 years agoFix typos in filenames. v2.1
Jennifer Richards [Wed, 21 Dec 2016 19:12:15 +0000 (19:12 +0000)]
Fix typos in filenames.

7 years agoPatches to fix distribution builds.
Jennifer Richards [Wed, 21 Dec 2016 18:17:03 +0000 (18:17 +0000)]
Patches to fix distribution builds.

7 years agoUpdate version number in configure.ac.
Jennifer Richards [Wed, 21 Dec 2016 15:53:11 +0000 (10:53 -0500)]
Update version number in configure.ac.

7 years agoFix config file names in Makefile.am
Jennifer Richards [Wed, 21 Dec 2016 15:19:27 +0000 (10:19 -0500)]
Fix config file names in Makefile.am

7 years agoUpdate RPM spec file and installed config files.
Jennifer Richards [Tue, 20 Dec 2016 23:13:29 +0000 (18:13 -0500)]
Update RPM spec file and installed config files.

7 years agoSet better defaults.
Jennifer Richards [Tue, 20 Dec 2016 22:01:37 +0000 (17:01 -0500)]
Set better defaults.

7 years agoFix default TRPS port. Add example config files.
Jennifer Richards [Tue, 20 Dec 2016 21:32:21 +0000 (16:32 -0500)]
Fix default TRPS port. Add example config files.

7 years agoRemove obsolete sample configuration files.
Jennifer Richards [Tue, 20 Dec 2016 21:06:44 +0000 (16:06 -0500)]
Remove obsolete sample configuration files.

7 years agoUpdate test programs. All now succeed.
Jennifer Richards [Tue, 20 Dec 2016 17:44:44 +0000 (12:44 -0500)]
Update test programs. All now succeed.

7 years agoRemove debug output, clarify debug message.
Jennifer Richards [Tue, 20 Dec 2016 02:51:31 +0000 (21:51 -0500)]
Remove debug output, clarify debug message.

7 years agoProperly set expiry on new community inforecs.
Jennifer Richards [Tue, 20 Dec 2016 01:23:28 +0000 (20:23 -0500)]
Properly set expiry on new community inforecs.

7 years agoFix bugs in community flooding and TID forwarding.
Jennifer Richards [Mon, 19 Dec 2016 21:57:39 +0000 (16:57 -0500)]
Fix bugs in community flooding and TID forwarding.

Now uses "hostname:port" as the peer label instead of the gss credential
name. This allows the same label to be used to identify the local
trust router when avoiding community loops. Fixes several bugs that
prevented TID forwarding from working reliably, notably by properly
initializing the next pointer in a TR_AAA_SERVER structure to null.

7 years agoDecode the error_path field in TID responses.
Jennifer Richards [Mon, 19 Dec 2016 21:55:48 +0000 (16:55 -0500)]
Decode the error_path field in TID responses.

7 years agoRemove extra free of community table. (Fix bug 1648116)
Jennifer Richards [Wed, 14 Dec 2016 01:54:48 +0000 (20:54 -0500)]
Remove extra free of community table. (Fix bug 1648116)

7 years agoReturn error when TID requests fail. (bug #1648118)
Jennifer Richards [Tue, 13 Dec 2016 21:43:01 +0000 (16:43 -0500)]
Return error when TID requests fail. (bug #1648118)

7 years agoRemove commented-out and debug code.
Jennifer Richards [Tue, 13 Dec 2016 20:55:03 +0000 (15:55 -0500)]
Remove commented-out and debug code.

7 years agoFix bugs related to handling TID responses. Fix a few memory leaks.
Jennifer Richards [Tue, 6 Dec 2016 22:33:32 +0000 (17:33 -0500)]
Fix bugs related to handling TID responses. Fix a few memory leaks.

7 years agoFix segfaults related to copying DH parameters.
Jennifer Richards [Thu, 1 Dec 2016 21:21:40 +0000 (16:21 -0500)]
Fix segfaults related to copying DH parameters.

7 years agoSupport multiple AAA servers. Compiles but untested.
Jennifer Richards [Wed, 30 Nov 2016 22:12:20 +0000 (17:12 -0500)]
Support multiple AAA servers. Compiles but untested.

7 years agoAdd timed blocking to tr_mq_pop().
Jennifer Richards [Wed, 23 Nov 2016 17:52:58 +0000 (12:52 -0500)]
Add timed blocking to tr_mq_pop().

7 years agoAdd tr_dup_dh_params() to make copy of DH parameters.
Jennifer Richards [Wed, 23 Nov 2016 13:30:38 +0000 (08:30 -0500)]
Add tr_dup_dh_params() to make copy of DH parameters.

7 years agoListen for tids clients on all TCP interfaces.
Jennifer Richards [Fri, 18 Nov 2016 20:31:38 +0000 (15:31 -0500)]
Listen for tids clients on all TCP interfaces.

7 years agoMerge fix from debian build machine.
Jennifer Richards [Thu, 17 Nov 2016 16:12:29 +0000 (11:12 -0500)]
Merge fix from debian build machine.

7 years agoAdd IPv6 support to tids.
Jennifer Richards [Thu, 17 Nov 2016 16:12:12 +0000 (11:12 -0500)]
Add IPv6 support to tids.

7 years agoAdd missing cast.
Jennifer Richards [Thu, 17 Nov 2016 16:10:09 +0000 (11:10 -0500)]
Add missing cast.

7 years agoOpen all ports for servers. Disallow IPv4-mapped IPv6 addrs.
Jennifer Richards [Sat, 12 Nov 2016 02:14:54 +0000 (21:14 -0500)]
Open all ports for servers. Disallow IPv4-mapped IPv6 addrs.

7 years agoSupport IPv6 for TRP connections.
Jennifer Richards [Fri, 11 Nov 2016 21:30:53 +0000 (16:30 -0500)]
Support IPv6 for TRP connections.

7 years agoBegin adding IPv6 support. Active GSS connections now work.
Jennifer Richards [Fri, 11 Nov 2016 19:57:50 +0000 (14:57 -0500)]
Begin adding IPv6 support. Active GSS connections now work.

7 years agoEnforce single COI->APC mapping.
Jennifer Richards [Mon, 7 Nov 2016 20:36:48 +0000 (15:36 -0500)]
Enforce single COI->APC mapping.

7 years agoFix community table sweep / removal. Trust router now stable.
Jennifer Richards [Mon, 7 Nov 2016 17:22:21 +0000 (12:22 -0500)]
Fix community table sweep / removal. Trust router now stable.

7 years agoDon't send communities in triggered updates. Comms now flood!
Jennifer Richards [Thu, 27 Oct 2016 18:21:41 +0000 (14:21 -0400)]
Don't send communities in triggered updates. Comms now flood!

Community flooding appears to be functional. Does not yet do
correct loop prevention (mismatch between peer labels prevents
detection) or expiration of abandoned community memberships.

7 years agoHandle community updates when received. Builds, not tested.
Jennifer Richards [Wed, 26 Oct 2016 20:53:59 +0000 (16:53 -0400)]
Handle community updates when received. Builds, not tested.

7 years agoFix segfault issues. Comm updates now sent, but ignored.
Jennifer Richards [Tue, 25 Oct 2016 20:59:49 +0000 (16:59 -0400)]
Fix segfault issues. Comm updates now sent, but ignored.

7 years agoGather/send community updates. Refactoring. Builds, not tested.
Jennifer Richards [Wed, 19 Oct 2016 19:57:12 +0000 (15:57 -0400)]
Gather/send community updates. Refactoring. Builds, not tested.

7 years agoRemove stray semicolon.
Jennifer Richards [Wed, 19 Oct 2016 15:11:41 +0000 (11:11 -0400)]
Remove stray semicolon.

7 years agoUse GArray for route update gathering.
Jennifer Richards [Fri, 14 Oct 2016 18:42:39 +0000 (14:42 -0400)]
Use GArray for route update gathering.

7 years agoFix several minor bugs affecting config file reading.
Jennifer Richards [Thu, 13 Oct 2016 22:16:18 +0000 (18:16 -0400)]
Fix several minor bugs affecting config file reading.

7 years agoRemove forgotten merge cruft.
Jennifer Richards [Thu, 13 Oct 2016 20:59:28 +0000 (16:59 -0400)]
Remove forgotten merge cruft.