Dominik Richter
a0e8be2568
bugfix: non-url servers with compliance login
...
Non-url URIs may have lead to broader crashes than initially fixed. Overwrite all URL resolvers in the plugin to work with these non-schema URLs.
Fixes #1473
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-30 12:04:21 -04:00
Adam Leff
88581ae3dd
Raise exception if profile target URL cannot be parsed
...
When attempting to parse the profile out of the target URL, we
were not raising an exception if we failed to do so. Such a situation
could arise if a user's inspec config.json is incorrect either due to
manual editing or failure to re-login after an upgrade past Automate
0.8.0.
This change provides a clear exception if this occurs and also adds
tests for the compliance_profile_name method.
Signed-off-by: Adam Leff <adam@leff.co>
2017-05-26 14:30:37 -05:00
Adam Leff
81bfdf2d55
Fix is_automate_server_080_and_later? call
...
Method name was incorrect (missing `?`) and also was missing
the required config parameter.
Signed-off-by: Adam Leff <adam@leff.co>
2017-05-19 21:07:58 -04:00
Seth Thomas
9f30fe1726
Fixing typo on method name
...
Signed-off-by: Seth Thomas <sthomas@chef.io>
2017-05-19 19:58:46 -04:00
Christoph Hartmann
5cc288d5df
support new automate 0.8.0
...
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-17 15:02:08 +02:00
Christoph Hartmann
effd0dd9f8
harmonize compliance profiles view with supermarket views ( #1654 )
...
* harmonize profiles view with supermarket plugin
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-04-13 11:24:17 -04:00
Jeremy J. Miller
735b67ab8a
allow Automate profile dependencies
...
Signed-off-by: Jeremy J. Miller <jm@chef.io>
2017-04-11 16:45:24 -04:00
Christoph Hartmann
71cc62c757
use -- for description of inspec login_automate
...
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-03-02 12:30:33 +01:00
Dominik Richter
b86201d6df
Merge pull request #1478 from chef/tduffield/relax-rubocop-pin
...
Use RuboCop 0.39.0 (same as chefstyle)
2017-02-09 00:09:48 +01:00
Tom Duffield
1ea83f526c
Address rubocop violations
...
Signed-off-by: Tom Duffield <tom@chef.io>
2017-02-08 16:49:16 -06:00
Dominik Richter
d4243b3558
map url to https for compliance plugin
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-02-08 23:29:58 +01:00
Dominik Richter
8c48e81b10
bugfix: warn users about insecure login requirements
...
Fixes https://github.com/chef/inspec/issues/1469
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-02-08 08:47:31 +01:00
Montague, Brent
463f3ff09f
Refactor after revisions requested from @chris-rock
...
Signed-off-by: Montague, Brent <brent@bmontague.com>
2017-01-25 14:33:34 -05:00
Montague, Brent
caa554b467
Updated compliance api requests to actually use refresh token correctly
...
We do not store a token in the config file but rather generate one on
each commmand. This is just a first pass and needs some work.
Signed-off-by: Montague, Brent <brent@bmontague.com>
2017-01-25 14:33:34 -05:00
Christoph Hartmann
8015f1191c
implement download of profiles
...
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-01-05 13:31:36 +01:00
Christoph Hartmann
7a0aa49986
use cached profile for compliance dependencies if vendored
...
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2016-12-08 10:11:55 +00:00
Victoria Jeffrey
0991cd142f
move vendor_deps to base_cli
...
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
2016-12-01 15:29:47 +01:00
Victoria Jeffrey
b110c1fba5
Vendor profile when uploading to chef-compliance
...
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
2016-11-30 18:24:12 +01:00
Victoria Jeffrey
d8b512ec8c
refactor headers retrieval into get_headers method
...
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
2016-11-30 18:10:33 +01:00
Victoria Jeffrey
60009b292b
address comments
...
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
2016-11-30 13:27:50 +01:00
Victoria Jeffrey
bdf5eae15e
Extend inspec compliance cli to support automate backend
...
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
2016-11-30 13:27:50 +01:00
Jerry Aldrich III
cafa35e5ce
Change Inpsec
to Inspec
...
Signed-off-by: Jerry Aldrich III <jerry@chef.io>
2016-11-08 11:20:32 -06:00
Steven Danna
76ef897d80
Improve error messages from compliance fetcher
...
Signed-off-by: Steven Danna <steve@chef.io>
2016-09-26 01:57:58 +02:00
Alex Pop
624849d418
removed unsupported legacy login and replaced it with the current username/password login option. a bit of refactoring around error checking and error/success output content
2016-09-19 23:08:42 +02:00
Steven Danna
4d2d0f2b67
Typo supermarket -> compliance
...
Signed-off-by: Steven Danna <steve@chef.io>
2016-09-09 14:46:36 +01:00
Steven Danna
120b3d895a
Allow supermarket:// and compliance:// in inspec.yml
...
Signed-off-by: Steven Danna <steve@chef.io>
2016-09-09 14:14:37 +01:00
Steven Danna
85cbe713d7
Add GitFetcher and rework Fetchers+SourceReaders
...
This adds a new git fetcher. In doing so, it also refactors how the
fetchers work a bit to better support fetchers that need to resolve
user-provided sources to fully specified sources appropriate for a
lockfile.
Signed-off-by: Steven Danna <steve@chef.io>
2016-09-09 14:14:36 +01:00
Alex Pop
8dcd71374b
Raise error when an invalid URI is received
2016-09-05 14:44:01 +01:00
Kartik Null Cating-Subramanian
33ae22d313
Support controls and describe blocks in InSpec shell
2016-08-19 19:07:23 +02:00
Christoph Hartmann
af04a0f5ba
implement workaround for thor
2016-08-18 20:50:49 +02:00
Victoria Jeffrey
b98c3e243e
give accurate information for inspec compliance login --help
2016-08-18 20:00:27 +02:00
Christoph Hartmann
cf784ded7c
update exit codes
2016-08-18 19:40:08 +02:00
Victoria Jeffrey
c3d245fafd
fail gracefully on inspec compliance profiles when bad token is provided
2016-08-18 19:35:29 +02:00
Victoria Jeffrey
24a2c5c356
return token stored message on login
2016-08-18 16:47:34 +02:00
Christoph Hartmann
502aef54fd
use bundler instead of gem, to speed up integration testing for different versions
2016-08-18 16:32:45 +02:00
Victoria Jeffrey
bdb1d913d9
Remove false username/passwd msg from inspec compliance login
2016-08-17 17:15:52 +02:00
Victoria Jeffrey
b75b8ab4a9
inspec compliance version fails gracefully when server config info is missing
2016-08-17 17:00:53 +02:00
Christoph Hartmann
96754cac6c
fix integration tests for Chef Compliance
2016-08-17 13:51:26 +02:00
Christoph Hartmann
8a17cb6b5b
update readme for bundles
2016-06-29 08:14:36 +02:00
Christoph Hartmann
6e93a13000
show error if user is not logged in to compliance server
2016-05-06 13:47:22 +02:00
Christoph Hartmann
46f38b51d0
add integration tests for compliance plugin
2016-04-29 01:12:53 +02:00
Christoph Hartmann
8678ab6625
fix compliance plugin
2016-04-29 00:39:25 +02:00
Christoph Hartmann
3007aef248
add function tests for compliance
command
2016-04-13 16:55:14 -04:00
Christoph Hartmann
07c359431f
fix: make the plugin compatible with all versions of chef compliance
2016-04-13 16:27:57 -04:00
Christoph Hartmann
01bec4cd1e
merge cli commands login, api_token and token to login
2016-04-13 16:27:57 -04:00
Stephan Renatus
54db2625eb
inspec-compliance: restore compat with pre-1.0
2016-04-13 16:27:57 -04:00
Stephan Renatus
71e1372b5e
fix rubocop
2016-04-13 16:27:57 -04:00
Stephan Renatus
4004dfbb3c
inspec-compliance: update README
2016-04-13 16:27:57 -04:00
Stephan Renatus
7b740a2f9d
inspec-compliance: style
2016-04-13 16:27:57 -04:00
Stephan Renatus
e0bd2bb595
inspec-compliance: work with compliance 1.0
2016-04-13 16:27:57 -04:00