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

CHEF_FIPS=1 causes bad_sig and 401 Unauthorized from erchef #116

Open
jeremymv2 opened this issue Nov 1, 2017 · 1 comment
Open

CHEF_FIPS=1 causes bad_sig and 401 Unauthorized from erchef #116

jeremymv2 opened this issue Nov 1, 2017 · 1 comment

Comments

@jeremymv2
Copy link
Contributor

This is here as a bread crumb trail..

When the environment variable CHEF_FIPS is set to 1 a restore operation will send WARNING messages in obtuse ways that are not immediately obvious, like (xxxxx == redacted):

Restoring users
Updating user record for xxxxx
WARNING: Wrong number of users to update for xxxxx. Skipping
Updating user record for xxxxx
WARNING: Wrong number of users to update for xxxxx. Skipping
Updating user record for xxxxx
WARNING: Wrong number of users to update for xxxxx. Skipping
Updating user record for xxxxx
WARNING: Wrong number of users to update for xxxxxx. Skipping
Updating user record for xxxxx
WARNING: Wrong number of users to update for xxxxx. Skipping
...

The errors log from the exception handler has more clues:

  "message": "401 \"Unauthorized\"",
...
  "exception": "Net::HTTPServerException",
  "req_path": "/users",
  "req_method": "POST"

Erchef has the actual reason (bad_sig):

2017-10-31T19:17:03Z [email protected] method=POST; path=/organizations; status=401; req_id=g3IAA2QAEGVyY2hlZkAxMjcuMC4wLjEDAAOs2gCgAAEAAAAA; msg=bad_sig; couchdb_groups=false; couchdb_organizations=false; couchdb_containers=false; couchdb_acls=false; 503_mode=false; couchdb_associations=false; couchdb_association_requests=false; req_time=2; rdbms_time=0; rdbms_count=1; user=pivotal; req_api_version=0;

The workaround for now is unsetting that environment variable then running the ec restore as normal :

export CHEF_FIPS=
@stevendanna
Copy link
Contributor

I think it is likely that this was actually a Chef Server bug that will be fixed in the next version of Chef Server.

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

2 participants