Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create http/https/tcp/udp transports #238

Closed
jquick opened this issue Jan 29, 2018 · 2 comments
Closed

Create http/https/tcp/udp transports #238

jquick opened this issue Jan 29, 2018 · 2 comments
Labels
Type: New Feature Adds new functionality

Comments

@jquick
Copy link
Contributor

jquick commented Jan 29, 2018

Train-API

The Train-API subsystem supports non-OS platforms targets. It provides the tcp, udp, and unix transports for low-level socket access, as well as http and https for high-level transport implementations.

These are defined via the URI schema:

mandatory minimum:
[tcp|upd|unix|http|https]://host

all options:
[tcp|upd|unix|http|https]://[user[:password]@]host[:port]][/path][?query][#fragment]

Some of these fields may not apply to certain transports. There may be resources that are based on the tcp transport but don't process a path or query parameter (e.g. for low-level interface testing).

The tcp, udp, and unix transports will all provide a low-level socket object with a basic communication interface (using an abstraction on top of the underlying Socket object). It is exposed to all InSpec resources via inspec.backend including all configuration options.

The http and https transports offer a simpler interface for all RESTful endpoints, exposed as the inspec.backend object to InSpec resources. Apart from the simple request it is also possible to use HTTP verbs (get, post, put, options, delete, head, trace).

@adamleff
Copy link
Contributor

I think this would be a really neat addition to Train, but I would hold off on any implementation work until we have a real need / use case that we can use to model how this might look. Otherwise, we're throwing stuff against a wall to see if it sticks.

@zenspider
Copy link
Contributor

Closing until we have need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Adds new functionality
Projects
None yet
Development

No branches or pull requests

4 participants