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

disabling anonymous causes failures #84

Open
sfiggins opened this issue Jun 4, 2014 · 3 comments
Open

disabling anonymous causes failures #84

sfiggins opened this issue Jun 4, 2014 · 3 comments

Comments

@sfiggins
Copy link
Contributor

sfiggins commented Jun 4, 2014

With anonymous access disabled, some commands, like creating new users with nexus_user, or new proxies with nexus_proxy_repsoitory will fail with a permission error.

@KAllan357
Copy link
Contributor

I sounds like a bug that those resources aren't using the credentials set in the data bag.

@fishnix
Copy link

fishnix commented Oct 23, 2014

@KAllan357 I get the same failure if I disable the anonymous account, but repo adds/deletes worked fine prior to the anonymous user being disabled. @sfiggins did you ever figure this out?

@sunruh
Copy link

sunruh commented Feb 16, 2015

The reason for this problem is that all resource providers check first whether Nexus is available by calling Chef::Nexus.ensure_nexus_available(node) which in turn calls Chef::Nexus.anonymous_nexus_remote, attempting to anonymously connect to Nexus.

chef_nexus.rb could be modified to have a 2nd rescue for NexusCli::PermissionsException assuming that a nexus is available in this case:

begin
[...]
rescue Errno::ECONNREFUSED, NexusCli::CouldNotConnectToNexusException, NexusCli::UnexpectedStatusCodeException => e
[...]
rescue NexusCli::PermissionsException => e
  Chef::Log.info "Could not connect to Nexus anonymously, assuming availability"
  return true
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants