check_PROGRAMS = common/t_constraint
TESTS = common/t_constraint
+lib_LTLIBRARIES = libtr_tid.la
+
+libtr_tid_la_SOURCES = $(tid_srcs) \
+$(common_srcs) \
+trp/trp_req.c \
+trp/trp_upd.c
+
+libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
+libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
+libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 3 -no-undefined
+
common_t_constraint_SOURCES = common/t_constraint.c \
common/tr_debug.c \
common/tr_name.c \
common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
- include/tr_debug.h \
+ include/tr_debug.h include/trust_router/trp.h \
include/trust_router/tr_dh.h \
include/trust_router/tr_constraint.h \
include/trust_router/tr_versioning.h
include/tr_idp.h include/tr_rp.h \
include/tr_comm.h include/tr_apc.h \
include/tr_tid.h include/tr_trp.h \
- include/tr_filter.h \
- include/tid_internal.h
+ include/tr_filter.h include/tr_gss.h \
+ include/tid_internal.h include/trp_internal.h \
+ include/tr_cfgwatch.h include/tr_event.h \
+ include/tr_mq.h include/trp_ptable.h \
+ include/trp_rtable.h include/tr_util.h
pkgdata_DATA=schema.sql
-nobase_dist_pkgdata_DATA=redhat/init redhat/sysconfig redhat/trusts.cfg redhat/tidc-wrapper redhat/trust_router-wrapper redhat/tr-test-main.cfg redhat/default-main.cfg redhat/tids-wrapper redhat/sysconfig.tids
+nobase_dist_pkgdata_DATA=redhat/init redhat/sysconfig redhat/organizations.cfg redhat/tidc-wrapper redhat/trust_router-wrapper redhat/tr-test-internal.cfg redhat/default-internal.cfg redhat/tids-wrapper redhat/sysconfig.tids
if HAVE_SYSTEMD
systemdsystemunit_DATA = tids.service
endif
EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
- tr/manual.cfg tr/portal.cfg \
+ tr/internal.cfg tr/organizations.cfg \
redhat/tids.init
#include <talloc.h>
#include <time.h>
#include <errno.h>
+#include <assert.h>
#include <tr_mq.h>
{
TR_MQ_MSG *msg=NULL;
msg=tr_mq_msg_new(NULL, "Message", TR_MQ_PRIO_NORMAL);
- asprintf((char **)&(msg->p), "%s: %d messages to go...", label, n);
+ assert(-1!=asprintf((char **)&(msg->p), "%s: %d messages to go...", label, n));
msg->p_free=free;
return msg;
}
thread_data[ii].mq=mq;
thread_data[ii].msg_dly=dly[ii];
thread_data[ii].n_msgs=10;
- asprintf(&(thread_data[ii].label), "thread %d", ii+1);
+ assert(-1!=asprintf(&(thread_data[ii].label), "thread %d", ii+1));
pthread_create(&(thread[ii]), NULL, thread_start, &thread_data[ii]);
printf("%s started.\n", thread_data[ii].label);
}
AC_PREREQ(2.63)
-AC_INIT([trust_router],[2.0.0],
+AC_INIT([trust_router],[2.1.0],
[bugs@project-moonshot.org])
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_AUX_DIR(build-aux)
#define TR_DEFAULT_CONSOLE_THRESHOLD LOG_NOTICE
#define TR_DEFAULT_APC_EXPIRATION_INTERVAL 43200
#define TR_DEFAULT_TRP_CONNECT_INTERVAL 10
-#define TR_DEFAULT_TRP_UPDATE_INTERVAL 120
+#define TR_DEFAULT_TRP_UPDATE_INTERVAL 30
#define TR_DEFAULT_TRP_SWEEP_INTERVAL 30
#define TR_DEFAULT_TID_REQ_TIMEOUT 5
#define TR_DEFAULT_TID_RESP_NUMER 2
--- /dev/null
+{
+ "tr_internal": {
+ "max_tree_depth": 12,
+ "hostname":"beta.example.com",
+ "trps_port":25308,
+ "tids_port":25309,
+ "cfg_poll_interval": 1,
+ "cfg_settling_time": 5,
+ "trp_sweep_interval": 30,
+ "trp_update_interval": 30,
+ "trp_connect_interval": 10,
+ "tid_request_timeout": 5,
+ "tid_response_numerator": 2,
+ "tid_response_denominator": 3,
+ "logging": {
+ "log_threshold": "info",
+ "console_threshold":"notice"
+ }
+ }
+}
+++ /dev/null
-{"tr_internal": {"max_tree_depth": 4,
- "hostname":"tr.moonshot.local",
- "tids_port": 12309,
-
- "logging": { "console_threshold": "debug",
- "log_threshold": "info"
- }
- }
-}
--- /dev/null
+{
+ "communities": [
+ {
+ "apcs": [],
+ "community_id": "apc.x",
+ "idp_realms": ["idp.x", "other.idp.x"],
+ "rp_realms": ["rp.x", "other.rp.x"],
+ "type": "apc",
+ "expiration_interval": 10
+ },
+ {
+ "apcs": ["apc."],
+ "community_id": "coi.x",
+ "idp_realms": ["idp.x"],
+ "rp_realms": ["rp.x"],
+ "type": "coi"
+ }
+ ],
+ "local_organizations": [
+ {
+ "organization_name": "Demo Organization",
+ "realms": [
+ {
+ "realm": "rp.x",
+ "gss_names": ["alpha-cred@apc.x",
+ "beta-cred@apc.x",
+ "gamma-cred@apc.x"],
+ "filters": {
+ "tid_inbound": [
+ {
+ "action": "accept",
+ "domain_constraints": [
+ "*.local"
+ ],
+ "specs": [
+ {
+ "field": "rp_realm",
+ "match": "rp.x"
+ },
+ {
+ "field": "rp_realm",
+ "match": "*.rp.x"
+ }
+ ],
+ "realm_constraints": [
+ "rp.x", "*.rp.x"
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "realm": "other.rp.x",
+ "gss_names": ["something@apc.x"]
+ },
+ {
+ "realm": "idp.x",
+ "gss_names": ["alpha-cred@apc.x"],
+ "identity_provider": {
+ "aaa_servers": ["alpha.local"],
+ "apcs": ["apc.x"],
+ "shared_config": "no"
+ }
+ },
+ {
+ "realm": "other.idp.x",
+ "gss_names": ["beta-cred@apc.x"],
+ "identity_provider": {
+ "aaa_servers": ["alpha.local"],
+ "apcs": ["apc.x"],
+ "shared_config": "no"
+ }
+ }
+ ]
+ }
+ ],
+ "peer_organizations": [
+ {
+ "hostname": "gamma.local",
+ "port": 12310,
+ "gss_names": ["gamma-cred@apc.x"]
+ }
+ ]
+}
+++ /dev/null
-{
- "communities": [
- {
- "apcs": [
- "pci-community.ja.net"
- ],
- "community_id": "comm.offcenter.org",
- "idp_realms": [
- "idr2.offcenter.org"
- ],
- "rp_realms": [
- "sr3.offcenter.org"
- ],
- "type": "coi"
- },
- {
- "apcs": [
-
- ],
- "community_id": "pci-community.ja.net",
- "idp_realms": [
- "idr1.offcenter.org",
- "idr2.offcenter.org",
- "ja.net",
- "no-longer-untitled.offcenter.org"
- ],
- "rp_realms": [
- "exchange.ja.net",
- "sr3.offcenter.org"
- ],
- "type": "apc"
- }
- ],
- "idp_realms": [
- {
- "aaa_servers": [
- "127.0.0.1"
- ],
- "apcs": [
- "pci-community.ja.net"
- ],
- "realm_id": "idr1.offcenter.org",
- "shared_config": "yes"
- },
- {
- "aaa_servers": [
- "127.0.0.1"
- ],
- "apcs": [
- "pci-community.ja.net"
- ],
- "realm_id": "idr2.offcenter.org",
- "shared_config": "no"
- },
- {
- "aaa_servers": [
- "10.1.10.90"
- ],
- "apcs": [
- "pci-community.ja.net"
- ],
- "realm_id": "ja.net",
- "shared_config": "no"
- },
- {
- "aaa_servers": [
- "127.0.0.1"
- ],
- "apcs": [
- "pci-community.ja.net"
- ],
- "realm_id": "no-longer-untitled.offcenter.org",
- "shared_config": "yes"
- }
- ],
- "rp_clients": [
- {
- "filter": {
- "filter_lines": [
- {
- "action": "accept",
- "domain_constraints": ["*.exchange.ja.net"],
- "filter_specs": [
- {
- "field": "rp_realm",
- "match": "exchange.ja.net"
- },
- {
- "field": "rp_realm",
- "match": "*.exchange.ja.net"
- }
- ],
- "realm_constraints": ["*.exchange.ja.net", "a.com"]
- }
- ],
- "type": "rp_permitted"
- },
- "gss_names": [
- "01b80aa9-8753-4691-8f8a-f49f7793546f@portal-realm.ja.net"
- ]
- },
- {
- "filter": {
- "filter_lines": [
- {
- "action": "accept",
- "domain_constraints": ["*.bob.sr3.offcenter.org"],
- "filter_specs": [
- {
- "field": "rp_realm",
- "match": "sr3.offcenter.org"
- },
- {
- "field": "rp_realm",
- "match": "*.sr3.offcenter.org"
- }
- ],
- "realm_constraints": ["*.sr3.offcenter.org" ]
- }
- ],
- "type": "rp_permitted"
- },
- "gss_names": [
- "895c308a-5624-4055-bb4f-ea24b77e6637@portal-realm.ja.net"
- ]
- }
- ]
-}
"cfg_poll_interval": 1,
"cfg_settling_time": 5,
"trp_sweep_interval": 30,
- "trp_update_interval": 120,
+ "trp_update_interval": 30,
"trp_connect_interval": 10,
"tid_request_timeout": 5,
"tid_response_numerator": 2,
%global optflags %{optflags} -Wno-parentheses
Name: trust_router
-Version: 2.0.0
+Version: 2.1.0
Release: 1%{?dist}
Summary: Moonshot Trust Router
# Install config files
install -D -m 755 redhat/init $RPM_BUILD_ROOT/%{_initrddir}/trust_router
-install -D -m 640 redhat/trusts.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/trusts.cfg
-install -D -m 640 redhat/default-main.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/default/main.cfg
-install -D -m 640 redhat/tr-test-main.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/tr-test/main.cfg
+install -D -m 640 redhat/organizations.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/organizations.cfg
+install -D -m 640 redhat/default-internal.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/default/internal.cfg
+install -D -m 640 redhat/tr-test-internal.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/tr-test/internal.cfg
install -D -m 640 redhat/sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/trust_router
install -D -m 640 redhat/sysconfig.tids $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/tids
install -D -m 755 redhat/tids.init $RPM_BUILD_ROOT/%{_initrddir}/tids
# Link shared config
-ln -s ../../trusts.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/default/trusts.cfg
-ln -s ../../trusts.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/tr-test/trusts.cfg
+ln -s ../../organizations.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/default/organizations.cfg
+ln -s ../../organizations.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/trust_router/conf.d/tr-test/organizations.cfg
# Install wrapper scripts
install -D -m 755 redhat/tidc-wrapper $RPM_BUILD_ROOT/%{_bindir}/tidc-wrapper
%dir %attr(755,root,trustrouter) %{_sysconfdir}/trust_router/conf.d/default
%dir %attr(755,root,trustrouter) %{_sysconfdir}/trust_router/conf.d/tr-test
-%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/trusts.cfg
-%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/default/main.cfg
-%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/tr-test/main.cfg
-%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/default/trusts.cfg
-%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/tr-test/trusts.cfg
+%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/organizations.cfg
+%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/default/internal.cfg
+%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/tr-test/internal.cfg
+%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/default/organizations.cfg
+%attr(640,root,trustrouter) %config(noreplace) %{_sysconfdir}/trust_router/conf.d/tr-test/organizations.cfg
%files libs
%defattr(-,root,root,-)