trust_router.git
7 years agoUpdate trust_router.spec, fix version in configure.ac
Jennifer Richards [Fri, 23 Sep 2016 22:35:45 +0000 (18:35 -0400)]
Update trust_router.spec, fix version in configure.ac

7 years agoFix another makefile bug.
Jennifer Richards [Wed, 21 Sep 2016 16:53:49 +0000 (12:53 -0400)]
Fix another makefile bug.

7 years agoAdditional makefile updates.
Jennifer Richards [Wed, 21 Sep 2016 16:17:38 +0000 (12:17 -0400)]
Additional makefile updates.

7 years agoFix compiler options
Jennifer Richards [Wed, 21 Sep 2016 15:32:54 +0000 (11:32 -0400)]
Fix compiler options

7 years agoFix build for t_constraint.c test binary.
Jennifer Richards [Mon, 19 Sep 2016 20:08:39 +0000 (16:08 -0400)]
Fix build for t_constraint.c test binary.

7 years agoAdd copyright statement missing from recently added files.
Jennifer Richards [Wed, 14 Sep 2016 01:20:01 +0000 (21:20 -0400)]
Add copyright statement missing from recently added files.

7 years agoClean up compiler warnings.
Jennifer Richards [Tue, 13 Sep 2016 20:24:36 +0000 (16:24 -0400)]
Clean up compiler warnings.

7 years agoDon't ignore asprintf return value.
Jennifer Richards [Tue, 13 Sep 2016 20:14:45 +0000 (16:14 -0400)]
Don't ignore asprintf return value.

7 years agoClean up Makefile.am to produce libtr_tid
Jennifer Richards [Mon, 19 Sep 2016 19:33:43 +0000 (15:33 -0400)]
Clean up Makefile.am to produce libtr_tid

7 years agoChange spec "match" field back to a single string instead of array. v2.0
Jennifer Richards [Sat, 10 Sep 2016 22:55:08 +0000 (18:55 -0400)]
Change spec "match" field back to a single string instead of array.

7 years agoFixes so that all binaries build cleanly.
Jennifer Richards [Fri, 9 Sep 2016 20:33:22 +0000 (16:33 -0400)]
Fixes so that all binaries build cleanly.

Not all test programs have been run recently, some may not work or may
have incomplete test coverage. The changes to Makefile.am were enough
to get "make" to run, but probably need more work to be optimal.

7 years agoMerge branch 'master' into jennifer/trp-devel
Jennifer Richards [Fri, 9 Sep 2016 18:56:31 +0000 (14:56 -0400)]
Merge branch 'master' into jennifer/trp-devel

7 years agoRemove debugging code.
Jennifer Richards [Fri, 9 Sep 2016 15:47:49 +0000 (11:47 -0400)]
Remove debugging code.

7 years agoReturn success after updating peer. Additional debug messages.
Jennifer Richards [Thu, 8 Sep 2016 17:53:25 +0000 (13:53 -0400)]
Return success after updating peer. Additional debug messages.

7 years agoInstall callback to request routes when connections established.
Jennifer Richards [Wed, 7 Sep 2016 19:13:56 +0000 (15:13 -0400)]
Install callback to request routes when connections established.

7 years agoBug fixes to make TID forwarding work between trust routers.
Jennifer Richards [Wed, 7 Sep 2016 17:55:16 +0000 (17:55 +0000)]
Bug fixes to make TID forwarding work between trust routers.

  - use server hostname instead of GSS name as next_hop in routes
  - don't segfault when finding selected route if none selected
  - report useful message on error in JSON parsing

7 years agoCheck h_errno instead of errno on gethostbyname() failure.
Jennifer Richards [Tue, 6 Sep 2016 17:16:48 +0000 (13:16 -0400)]
Check h_errno instead of errno on gethostbyname() failure.

7 years agoMerge branch 'jennifer/trp-devel' of repository.project-moonshot.org:/srv/git/trust_r...
Jennifer Richards [Fri, 2 Sep 2016 23:57:49 +0000 (19:57 -0400)]
Merge branch 'jennifer/trp-devel' of repository.project-moonshot.org:/srv/git/trust_router into jennifer/trp-devel

Conflicts:
common/tr_config.c

7 years agoAdd option for "remote" IDP realms. Compiles but not tested.
Jennifer Richards [Fri, 2 Sep 2016 22:12:17 +0000 (18:12 -0400)]
Add option for "remote" IDP realms. Compiles but not tested.

7 years agoAdd option for "remote" IDP realms. Compiles but not tested.
Jennifer Richards [Fri, 2 Sep 2016 22:12:17 +0000 (18:12 -0400)]
Add option for "remote" IDP realms. Compiles but not tested.

7 years agoFix several bugs preventing TID requests from functioning.
Jennifer Richards [Thu, 1 Sep 2016 15:39:10 +0000 (11:39 -0400)]
Fix several bugs preventing TID requests from functioning.

 - Partial implementation of config file print for debug
 - Fix a few possibly unitialized values
 - Pass TRPS_INSTANCE to tids event for route lookups
 - Return 0 on success from tr_tids_req_handler()
 - Return null on no match from trp_rtable_get_selected_entry()

7 years agoInitialize TID_RESP values in constructor.
Jennifer Richards [Wed, 31 Aug 2016 20:38:48 +0000 (16:38 -0400)]
Initialize TID_RESP values in constructor.

7 years agoForgot to check in a couple of files.
Jennifer Richards [Thu, 25 Aug 2016 20:18:14 +0000 (16:18 -0400)]
Forgot to check in a couple of files.

7 years agoUse default set of filters for RP clients with none specified.
Jennifer Richards [Thu, 25 Aug 2016 18:41:19 +0000 (14:41 -0400)]
Use default set of filters for RP clients with none specified.

7 years agoLook up TRPC with service name, not gss name.
Jennifer Richards [Wed, 24 Aug 2016 15:44:29 +0000 (11:44 -0400)]
Look up TRPC with service name, not gss name.

7 years agoPeer organizations now parsed and added to peer table.
Jennifer Richards [Tue, 23 Aug 2016 21:12:51 +0000 (17:12 -0400)]
Peer organizations now parsed and added to peer table.

This is feature completeness for initial Dynamic Trust Router
release, not yet debugged.

7 years agoParsing of local organizations now functional.
Jennifer Richards [Mon, 22 Aug 2016 19:20:59 +0000 (15:20 -0400)]
Parsing of local organizations now functional.

7 years agoParsing new-style config files partially working.
Jennifer Richards [Mon, 22 Aug 2016 15:49:35 +0000 (11:49 -0400)]
Parsing new-style config files partially working.

Still need to add APC/community parsing and peer table parsing.

7 years agoParse RP clients from new-style configuration files.
Jennifer Richards [Fri, 19 Aug 2016 20:41:10 +0000 (16:41 -0400)]
Parse RP clients from new-style configuration files.

7 years agoNew-style configuration file loading partially implemented.
Jennifer Richards [Thu, 18 Aug 2016 18:06:26 +0000 (14:06 -0400)]
New-style configuration file loading partially implemented.

7 years agoReimplementing tr_config.c to use new config file format. Not done.
Jennifer Richards [Fri, 12 Aug 2016 21:18:56 +0000 (17:18 -0400)]
Reimplementing tr_config.c to use new config file format. Not done.

IDP realms should decode, but not yet compiled or tested.

7 years agoFix memory leak in tids.c.
Jennifer Richards [Thu, 11 Aug 2016 15:32:35 +0000 (11:32 -0400)]
Fix memory leak in tids.c.

7 years agoCreate/destroy TR_APC structures.
Jennifer Richards [Wed, 10 Aug 2016 18:35:59 +0000 (14:35 -0400)]
Create/destroy TR_APC structures.

7 years agoMerge branch 'master' into jennifer/trp-devel
Jennifer Richards [Wed, 10 Aug 2016 18:29:01 +0000 (14:29 -0400)]
Merge branch 'master' into jennifer/trp-devel

Conflicts:
common/tr_config.c
common/tr_name.c
include/tr_config.h
include/trust_router/tid.h
tr/tr_main.c

7 years agoBump versions to 1.5.2 in a couple places. v1.5.2
Jennifer Richards [Wed, 10 Aug 2016 17:36:17 +0000 (13:36 -0400)]
Bump versions to 1.5.2 in a couple places.

7 years agoAttempt to route TID requests using routing table. Unstable.
Jennifer Richards [Wed, 10 Aug 2016 12:38:21 +0000 (08:38 -0400)]
Attempt to route TID requests using routing table. Unstable.

Checking in before beginning configuration file work. Connections between
trust routers are unreliable and need to be debugged.

7 years agoIntroduce "remote" routes that we know about but cannot contact directly.
Jennifer Richards [Thu, 4 Aug 2016 16:45:14 +0000 (12:45 -0400)]
Introduce "remote" routes that we know about but cannot contact directly.

7 years agoProperly respond to wildcard route requests.
Jennifer Richards [Thu, 4 Aug 2016 02:26:18 +0000 (22:26 -0400)]
Properly respond to wildcard route requests.

7 years agoWildcard route requests now working.
Jennifer Richards [Thu, 4 Aug 2016 02:17:15 +0000 (22:17 -0400)]
Wildcard route requests now working.

7 years agoRequests nearly work, but not quite.
Jennifer Richards [Wed, 3 Aug 2016 17:05:07 +0000 (13:05 -0400)]
Requests nearly work, but not quite.

Issue: the request can go out before the return connection for the
peer to respond has been established, so the reply does not get sent.
Checking in before reworking detection that a peer is connected.

7 years agoPartial handling of incoming route requests.
Jennifer Richards [Tue, 2 Aug 2016 21:37:32 +0000 (17:37 -0400)]
Partial handling of incoming route requests.

7 years agoFix memory freeing bugs. Seems stable, even through loss of connections.
Jennifer Richards [Tue, 2 Aug 2016 15:29:12 +0000 (11:29 -0400)]
Fix memory freeing bugs. Seems stable, even through loss of connections.

7 years agoWhitespace change, remove debug printf.
Jennifer Richards [Tue, 2 Aug 2016 15:28:41 +0000 (11:28 -0400)]
Whitespace change, remove debug printf.

7 years agoLeave SIGPIPE handling alone. Caller must disable or handle that.
Jennifer Richards [Tue, 2 Aug 2016 15:24:28 +0000 (11:24 -0400)]
Leave SIGPIPE handling alone. Caller must disable or handle that.

7 years agoSend triggered updates (not really tested).
Jennifer Richards [Wed, 27 Jul 2016 16:18:14 +0000 (12:18 -0400)]
Send triggered updates (not really tested).

7 years agoOnly compute routes for connected peers. Other progress.
Jennifer Richards [Wed, 27 Jul 2016 14:41:10 +0000 (10:41 -0400)]
Only compute routes for connected peers. Other progress.

7 years agoRemove unused debug printf.
Jennifer Richards [Wed, 27 Jul 2016 14:40:45 +0000 (10:40 -0400)]
Remove unused debug printf.

7 years agoUse correct default TRP port.
Jennifer Richards [Tue, 26 Jul 2016 20:18:30 +0000 (16:18 -0400)]
Use correct default TRP port.

7 years agoInitialize route table with local routes. Fix bugs.
Jennifer Richards [Tue, 26 Jul 2016 18:26:49 +0000 (14:26 -0400)]
Initialize route table with local routes. Fix bugs.

7 years agoConnect to hard-coded peer and exchange route info. Buggy and incomplete.
Jennifer Richards [Wed, 20 Jul 2016 04:02:27 +0000 (00:02 -0400)]
Connect to hard-coded peer and exchange route info. Buggy and incomplete.

7 years agoGenerate scheduled updates. Untested, but builds.
Jennifer Richards [Mon, 18 Jul 2016 19:43:12 +0000 (15:43 -0400)]
Generate scheduled updates. Untested, but builds.

7 years agoTest peer table and update selection functions. Seem to work.
Jennifer Richards [Sat, 16 Jul 2016 05:14:08 +0000 (01:14 -0400)]
Test peer table and update selection functions. Seem to work.

7 years agoSelect route updates for a given peer (not yet tested).
Jennifer Richards [Fri, 15 Jul 2016 21:02:01 +0000 (17:02 -0400)]
Select route updates for a given peer (not yet tested).

7 years agoBasic peer table, hard coded for testing.
Jennifer Richards [Fri, 15 Jul 2016 19:00:53 +0000 (15:00 -0400)]
Basic peer table, hard coded for testing.

7 years agoPeer table (work in progress).
Jennifer Richards [Fri, 15 Jul 2016 16:37:05 +0000 (12:37 -0400)]
Peer table (work in progress).

7 years agoSweep for expired routes. Sweeps every two seconds for now, not yet configurable.
Jennifer Richards [Thu, 14 Jul 2016 19:54:50 +0000 (15:54 -0400)]
Sweep for expired routes. Sweeps every two seconds for now, not yet configurable.

7 years agoRemove extraneous newline
Jennifer Richards [Thu, 14 Jul 2016 18:13:24 +0000 (14:13 -0400)]
Remove extraneous newline

7 years agoSelect active route after updates to the route table.
Jennifer Richards [Fri, 1 Jul 2016 21:05:47 +0000 (17:05 -0400)]
Select active route after updates to the route table.

7 years agoUpdate the routing table when TRP updates are received.
Jennifer Richards [Fri, 1 Jul 2016 19:24:32 +0000 (15:24 -0400)]
Update the routing table when TRP updates are received.

7 years agoUpdate route table when a TRP update is received. Not tested.
Jennifer Richards [Fri, 1 Jul 2016 15:02:12 +0000 (11:02 -0400)]
Update route table when a TRP update is received. Not tested.

7 years agoAdd next_hop field to route update record, filled in locally.
Jennifer Richards [Thu, 30 Jun 2016 16:32:37 +0000 (12:32 -0400)]
Add next_hop field to route update record, filled in locally.

7 years agoImproved, sorted printing, provide _to_str methods.
Jennifer Richards [Thu, 30 Jun 2016 01:47:07 +0000 (21:47 -0400)]
Improved, sorted printing, provide _to_str methods.

7 years agoDo a signed compare suitable for sorting TR_NAMEs.
Jennifer Richards [Thu, 30 Jun 2016 01:45:25 +0000 (21:45 -0400)]
Do a signed compare suitable for sorting TR_NAMEs.

7 years agoFully test trp_rtable code. All tests pass.
Jennifer Richards [Wed, 29 Jun 2016 20:15:05 +0000 (16:15 -0400)]
Fully test trp_rtable code. All tests pass.

7 years agoImplement hash-indexed routing table.
Jennifer Richards [Tue, 28 Jun 2016 20:35:12 +0000 (16:35 -0400)]
Implement hash-indexed routing table.

7 years agoTrust router: open TRP connection to self, send multiple msgs.
Jennifer Richards [Tue, 28 Jun 2016 03:58:52 +0000 (23:58 -0400)]
Trust router: open TRP connection to self, send multiple msgs.

7 years agoMake outgoing connections. Connect to self as a test.
Jennifer Richards [Mon, 27 Jun 2016 20:55:32 +0000 (16:55 -0400)]
Make outgoing connections. Connect to self as a test.

7 years agoAvoid freeing uninitialized pointer. Add -r option to trpc.
Jennifer Richards [Sat, 25 Jun 2016 18:24:03 +0000 (14:24 -0400)]
Avoid freeing uninitialized pointer. Add -r option to trpc.

The trust router can now accept multiple simultaneous connections from
trpc programs. The messages are decoded from JSON and then printed to
the screen.

7 years agoDecode JSON TRP messages, then send to main thread.
Jennifer Richards [Sat, 25 Jun 2016 01:41:28 +0000 (21:41 -0400)]
Decode JSON TRP messages, then send to main thread.

7 years agoSuccessful messages via mq to main thread.
Jennifer Richards [Fri, 24 Jun 2016 17:16:13 +0000 (13:16 -0400)]
Successful messages via mq to main thread.

7 years agoAuthenticate GSS context in separate thread. (Not fully working yet.)
Jennifer Richards [Fri, 24 Jun 2016 15:19:59 +0000 (11:19 -0400)]
Authenticate GSS context in separate thread. (Not fully working yet.)

7 years agoAdd accessor functions and check in header file.
Jennifer Richards [Thu, 23 Jun 2016 17:24:23 +0000 (13:24 -0400)]
Add accessor functions and check in header file.

7 years agoTest multithreaded functionality of tm_mq.
Jennifer Richards [Wed, 22 Jun 2016 20:59:02 +0000 (16:59 -0400)]
Test multithreaded functionality of tm_mq.

7 years agoImplement message queue and test program.
Jennifer Richards [Wed, 22 Jun 2016 17:08:32 +0000 (13:08 -0400)]
Implement message queue and test program.

7 years agoMinor patches from Adam Bishop to fix build issues from commit 1bc4bf5.
Jennifer Richards [Tue, 21 Jun 2016 15:25:18 +0000 (11:25 -0400)]
Minor patches from Adam Bishop to fix build issues from commit 1bc4bf5.

  1. Make sure that the spec file only includes systemd on el7 builds to fix an el6 build break.
  2. Fix a build break on 32 bit systems - Jansson provides a macro which I should have used.

7 years agoFix syntax of TR_EXPORT.
Jennifer Richards [Mon, 20 Jun 2016 19:15:45 +0000 (15:15 -0400)]
Fix syntax of TR_EXPORT.

7 years agoUse accessor functions for TRP objects.
Jennifer Richards [Mon, 20 Jun 2016 18:35:09 +0000 (14:35 -0400)]
Use accessor functions for TRP objects.

7 years agoSeparate trp_msg.c into trp_upd.c and trp_req.c.
Jennifer Richards [Mon, 20 Jun 2016 17:57:50 +0000 (13:57 -0400)]
Separate trp_msg.c into trp_upd.c and trp_req.c.

7 years agoMerge branch 'jennifer/march2016-patches'
Jennifer Richards [Mon, 20 Jun 2016 17:39:31 +0000 (13:39 -0400)]
Merge branch 'jennifer/march2016-patches'

Conflicts (both trivial):
common/tr_config.c
common/tr_name.c

7 years agoApply Adam Bishop's March 2016 patches.
Jennifer Richards [Mon, 20 Jun 2016 17:24:43 +0000 (13:24 -0400)]
Apply Adam Bishop's March 2016 patches.

0001: (Trivial) The trust router does not build in a minimal environment on CentOS; specifying glib2 explicitly corrects this.
0002: (Trivial) This adds a check and log entry for the serial number to the config parser.
0003: (Trivial) Correct a typo and add more information to a log message.
0004: (Trivial) Implement enough of tr_print_config to diagnose this quicker
0005: (Substantial) Fix the corruption by making sure that a dereferenced copy is performed on each realm.
0006: (Trivial) Obligatory version bump.

7 years agoSpecify string argument to tr_name() as const.
Jennifer Richards [Mon, 20 Jun 2016 16:30:13 +0000 (12:30 -0400)]
Specify string argument to tr_name() as const.

Fixes build problem with freeradius. Merges janetuk github commits
9b50472db6493fd7b5d5b6024b7899fc279fac59 and
38b9ed4c2fc284114012f1a50b357a0ae7e267c0. See:
https://github.com/janetuk/trust_router/pull/6/commits/38b9ed4c2fc284114012f1a50b357a0ae7e267c0

7 years agoMove TRP messaging to tr_msg.c. Fix old bug.
Jennifer Richards [Fri, 17 Jun 2016 01:49:26 +0000 (21:49 -0400)]
Move TRP messaging to tr_msg.c. Fix old bug.

* Move TRP message-related code to tr_msg.c
* Change names/code to match existing conventions
* Add constructor/destructor for TID_RESP struct
* Free sub-structures when freeing TR_MSG struct
* Add msgtst to Makefile.am

7 years agoFree json object after encoding.
Jennifer Richards [Thu, 16 Jun 2016 15:14:00 +0000 (11:14 -0400)]
Free json object after encoding.

7 years agoEncode update messages.
Jennifer Richards [Thu, 16 Jun 2016 02:26:19 +0000 (22:26 -0400)]
Encode update messages.

7 years agoProperly handle record types. Encoding temporarily broken.
Jennifer Richards [Wed, 15 Jun 2016 22:52:05 +0000 (18:52 -0400)]
Properly handle record types. Encoding temporarily broken.

7 years agoEncode route_req messages.
Jennifer Richards [Wed, 15 Jun 2016 16:17:17 +0000 (12:17 -0400)]
Encode route_req messages.

7 years agoDecode and print route_req messages.
Jennifer Richards [Wed, 15 Jun 2016 03:26:54 +0000 (23:26 -0400)]
Decode and print route_req messages.

7 years agoHandle update messages properly by separating records from body.
Jennifer Richards [Wed, 15 Jun 2016 02:49:58 +0000 (22:49 -0400)]
Handle update messages properly by separating records from body.

7 years agoParse update messages. Add rudimentary printing.
Jennifer Richards [Tue, 14 Jun 2016 21:08:08 +0000 (17:08 -0400)]
Parse update messages. Add rudimentary printing.

7 years agoProgress towards parsing update messages.
Jennifer Richards [Tue, 14 Jun 2016 18:36:09 +0000 (14:36 -0400)]
Progress towards parsing update messages.

7 years agoBeginning of JSON parser for TRP messages (nonfunctional)
Jennifer Richards [Tue, 14 Jun 2016 03:52:03 +0000 (23:52 -0400)]
Beginning of JSON parser for TRP messages (nonfunctional)

7 years agoSeparate TRP from main trust router code.
Jennifer Richards [Mon, 13 Jun 2016 20:05:20 +0000 (16:05 -0400)]
Separate TRP from main trust router code.

Not a functional checkin, probably does not build.

7 years agoInclude tids.service in list of %files. v1.5.1-centos7
Jennifer Richards [Fri, 3 Jun 2016 16:29:09 +0000 (16:29 +0000)]
Include tids.service in list of %files.

7 years agoAdd stub of TRP client test program, trpc.
Jennifer Richards [Thu, 26 May 2016 19:55:08 +0000 (15:55 -0400)]
Add stub of TRP client test program, trpc.

7 years agoAdd TRP handling events, plus change to cfg layout.
Jennifer Richards [Thu, 26 May 2016 02:42:13 +0000 (22:42 -0400)]
Add TRP handling events, plus change to cfg layout.

The main purpose of this commit is to add a stub for TRP event handling.
This currently amounts to listning to a TCP port and replying with a
brief message. Additionally, moved the active and new configurations
in the TR_INSTANCE struct into a container called TR_CFG_MGR. Other
instance types (TIDS, TRPS [new with this commit], and CFGWATCH)
instances now refer to the TR_CFG_MGR rather than to the TR_INSTANCE.
This resolves circular include dependencies and makes for a cycle-free
object hierarchy. Finally, introduced more complete use of talloc
for memory management, though this is probably not complete yet.

7 years agoProvide function to convert log severity to string.
Jennifer Richards [Thu, 26 May 2016 02:33:31 +0000 (22:33 -0400)]
Provide function to convert log severity to string.

7 years agoLoad config files in lexical order.
Jennifer Richards [Tue, 24 May 2016 14:45:44 +0000 (10:45 -0400)]
Load config files in lexical order.

Previously, arbitrary load order was used. Also added config options for
the config watcher polling.

7 years agoRefactor to move task code out of tr_main.c.
Jennifer Richards [Tue, 24 May 2016 01:37:49 +0000 (21:37 -0400)]
Refactor to move task code out of tr_main.c.

7 years agoResolve circular header dependencies.
Jennifer Richards [Mon, 23 May 2016 21:54:03 +0000 (17:54 -0400)]
Resolve circular header dependencies.

The use of TR_INSTANCE throughout various modules created a situation
where circular header file inclusion was occurring. Resolve this by
moving responsibility for picking out appropriate members from the
active configuration to the caller and passing only the directly
data into various functions. Also cleaned up some allocation code
to better make use of talloc.

7 years agoFix function name.
Jennifer Richards [Mon, 23 May 2016 20:24:15 +0000 (16:24 -0400)]
Fix function name.