Comments (11)
This would be easy and helpful. We should do this when time allows, if there isn't already a way to do this.
Launchpad Details: #LPC Margaret Cullen - 2017-05-08 20:24:45 +0000
from trust-router.
Implemented by #60 (and then changed to -C
in the next commit)
from trust-router.
Test
Steps
- Install an invalid configuration
- Run the trust router with the -C option
- It should exit with an error message and
echo $?
should report non-zero exit status - Install a valid configuration
- Run the trust router with the -C option
- It should exit with a success message and `echo $? should report zero exit status
Expected results
Output as described above
from trust-router.
- Invalid JSON syntax (leave off a closing brace): ✔️
- Invalid JSON key name (root => "communities" => [0] => "apcs" renamed to "abcs"): ✔️
- Invalid data:
- "apcs" value of [1, 2, true]: ❌
- Port numbers of 0, 66500: ❌
What all are you considering part of "invalid"?
from trust-router.
Hm, when I set APCs to an array with non-string values or use 0/66500 as ports, I get errors. Maybe another CentOS-specific issue? I'll try on a CentOS instance.
from trust-router.
Ok, if the "apcs" for a community of type "apc" [1,2,true]
, it is accepted. I think this is ok - the "apcs" field is ignored for an APC community. If I change the community to a "coi" then it gives an error.
Where are you setting ports?
from trust-router.
ah, must be for the trust router to listen on (I think invalid ports for AAA servers or peer trust routers are being flagged as errors).
I'll fix that. I'm inclined to leave the "apcs" as is (as long as it's only for the APC community). We currently don't do validation of fields that are present but should not be, and I think that'd be the right place to deal with that (i.e., any non-empty "apcs" array for an APC indicates a confused configuration)
from trust-router.
Oh, the fix to add port validation is waiting in #92.
from trust-router.
Ok, if the "apcs" for a community of type "apc" [1,2,true], it is accepted. I think this is ok - the "apcs" field is ignored for an APC community. If I change the community to a "coi" then it gives an error.
That seems reasonable.
Where are you setting ports?
ah, must be for the trust router to listen on
Indeed, it was.
from trust-router.
I'm inclined to leave the "apcs" as is (as long as it's only for the APC community). We currently don't do validation of fields that are present but should not be
That sounds good.
from trust-router.
Passed.
from trust-router.
Related Issues (20)
- Update for OpenSSL 1.1.0
- Linking against libtr_tid.la fails HOT 3
- Missing 'monitoring' section of internal config prevents startup HOT 1
- Build problem for (at least) Debian HOT 7
- Debian libtr_tid symbols file out of date and inaccurate
- TR_MQ does not correctly handle tail pointer when adding high priority messages, may lose messages and leak memory HOT 1
- "show peers" returning an empty list HOT 3
- Monitoring handler processes left sleeping HOT 2
- Problematic use of threads and fork() in main trust router process HOT 1
- Test: Enabling/Disabling the monitoring interface HOT 2
- Test: Monitoring interface 'show' command HOT 3
- Excessive logging HOT 9
- Test: TID request / error counting HOT 8
- RPM-supplied internal.cfg should include a monitoring section HOT 3
- Error message for TIDS port already in use is misleading HOT 4
- The trmon help message should list available commands HOT 3
- trmon only ever responds with help message HOT 4
- CentOS trust_router services do not start and stop cleanly HOT 1
- trustrouter peer monitoring generates empty response HOT 7
- tidc should report error on TID lookup error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trust-router.