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

inspec-compliance + Compliance 1.0 #576

Merged
merged 8 commits into from
Apr 13, 2016
Merged

inspec-compliance + Compliance 1.0 #576

merged 8 commits into from
Apr 13, 2016

Conversation

srenatus
Copy link
Contributor

This change includes the necessary adaptations for having inspec's compliance plugin work with compliance 1.0.

@srenatus srenatus added the Type: Enhancement Improves an existing feature label Mar 23, 2016
@chris-rock
Copy link
Contributor

We need to ensure that it also works with older versions. This extension does not work with versions pre-1.0

# logs into the server, retrieves a token and stores it locally
def self.login(server, username, password, insecure)
# saves the api token supplied by the user
def self.api_token(server, refresh_token, verify, user, insecure)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should still be able to input username and password

@chris-rock chris-rock changed the title [on hold] inspec-compliance + Compliance 1.0 WIP inspec-compliance + Compliance 1.0 Mar 29, 2016
@@ -8,7 +8,8 @@ This extensions offers the following features:

To use the CLI, this InSpec add-on adds the following commands:

* `$ inspec compliance login user password` - authentication against Chef Compliance
* `$ inspec compliance api_token server --token TOKEN --user USER` - save the Chef Compliance API token for user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this plugin should offer two methods

  • handle the complete oauth flow to retrieve a token. that allows the plugin to get a refresh token as well (requires us to setup a specific client/application for inspec)
  • take an api token as input

@srenatus srenatus changed the title WIP inspec-compliance + Compliance 1.0 inspec-compliance + Compliance 1.0 Apr 5, 2016
@chris-rock chris-rock changed the title inspec-compliance + Compliance 1.0 WIP: inspec-compliance + Compliance 1.0 Apr 8, 2016
@chris-rock
Copy link
Contributor

At this point of time, this PR misses a couple of things:

  • usability for login should be the same, cli should take --token, --refresh-token as option
  • proper fallback for legacy auth (version not determined etc)
  • simple login flow

@chris-rock
Copy link
Contributor

I add additions to this PRs to address this

@chris-rock chris-rock changed the title WIP: inspec-compliance + Compliance 1.0 inspec-compliance + Compliance 1.0 Apr 13, 2016
@chris-rock chris-rock merged commit f9ef1f5 into master Apr 13, 2016
@chris-rock chris-rock deleted the sr/oidc branch April 13, 2016 21:21
@srenatus
Copy link
Contributor Author

Thanks @chris-rock for the additions! 👍

Note that when https://github.com/chef/chef-compliance/pull/767 is merged, we should probably (re)introduce another variant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants