Giter Club home page Giter Club logo

Comments (11)

jennifer-richards avatar jennifer-richards commented on September 5, 2024

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.

jennifer-richards avatar jennifer-richards commented on September 5, 2024

Implemented by #60 (and then changed to -C in the next commit)

from trust-router.

jennifer-richards avatar jennifer-richards commented on September 5, 2024

Test

Steps

  1. Install an invalid configuration
  2. Run the trust router with the -C option
  3. It should exit with an error message and echo $? should report non-zero exit status
  4. Install a valid configuration
  5. Run the trust router with the -C option
  6. It should exit with a success message and `echo $? should report zero exit status

Expected results

Output as described above

from trust-router.

meadmaker avatar meadmaker commented on September 5, 2024
  • 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.

jennifer-richards avatar jennifer-richards commented on September 5, 2024

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.

jennifer-richards avatar jennifer-richards commented on September 5, 2024

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.

jennifer-richards avatar jennifer-richards commented on September 5, 2024

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.

jennifer-richards avatar jennifer-richards commented on September 5, 2024

Oh, the fix to add port validation is waiting in #92.

from trust-router.

meadmaker avatar meadmaker commented on September 5, 2024

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.

meadmaker avatar meadmaker commented on September 5, 2024

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.

meadmaker avatar meadmaker commented on September 5, 2024

Passed.

from trust-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.