You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run into this issue passing Azure SPN credential via environment variables. I don't have any credential file into ~/.azure folder as did set up the following env variables:
I am on Ubuntu 16.04, Inspec 1.26.0, Ruby 2.4.1p111.
Error:
Please report a bug if this causes problems.
/home/vagrant/.azure/credentials was not found or not accessible
libraries/azure_backend.rb:59:in `spn': undefined method `sections' for nil:NilClass (NoMethodError)
from libraries/azure_backend.rb:43:in `connection'
from libraries/azure_backend.rb:217:in `initialize'
from libraries/azure_backend.rb:121:in `new'
from libraries/azure_backend.rb:121:in `initialize'
from libraries/azure_resource_group.rb:35:in `new'
from libraries/azure_resource_group.rb:35:in `initialize'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/plugins/resource.rb:47:in `initialize'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/resource.rb:48:in `new'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/resource.rb:48:in `block (3 levels) in create_dsl'
from startup-compliance/controls/resource_groups.rb:12:in `block in load_with_context'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/rule.rb:50:in `instance_eval'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/rule.rb:50:in `initialize'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/control_eval_context.rb:71:in `new'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/control_eval_context.rb:71:in `block (2 levels) in create'
from startup-compliance/controls/resource_groups.rb:7:in `load_with_context'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/profile_context.rb:146:in `instance_eval'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/profile_context.rb:146:in `load_with_context'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/profile_context.rb:130:in `load_control_file'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/profile.rb:151:in `block in collect_tests'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/profile.rb:148:in `each'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/profile.rb:148:in `collect_tests'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/runner.rb:90:in `block in load'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/runner.rb:79:in `each'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/runner.rb:79:in `load'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/runner.rb:100:in `run'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/base_cli.rb:83:in `run_tests'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/lib/inspec/cli.rb:159:in `exec'
from /home/vagrant/.gem/ruby/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /home/vagrant/.gem/ruby/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /home/vagrant/.gem/ruby/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /home/vagrant/.gem/ruby/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /usr/local/lib/ruby/gems/2.4.0/gems/inspec-1.26.0/bin/inspec:12:in `<top (required)>'
from /home/vagrant/.gem/ruby/2.4.0/bin/inspec:22:in `load'
from /home/vagrant/.gem/ruby/2.4.0/bin/inspec:22:in `<main>'
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
There is a bug in the code. It is trying to access the credentials file when it does not exist even though you have set the AZURE_SUBSCRIPTION_ID environment variable. I will correct this.
…#42)
* Updated so that the credentials file is only interogated if it exists
Fixes#39
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
* Made change to set credentials to nil as requested
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
I run into this issue passing Azure SPN credential via environment variables. I don't have any credential file into ~/.azure folder as did set up the following env variables:
I am on Ubuntu 16.04, Inspec 1.26.0, Ruby 2.4.1p111.
Error:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: