xmlsec1 error output is not logged

Bug #1468544 reported by Miguel Grinberg
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Hugh Saunders

Bug Description

While trying to implement federation, I was getting code 500 errors when trying to get a SAML assertion from a Keystone instance configured as identity provider. This is what the Keystone log showed:

    2015-06-24 21:54:46.454 13569 INFO keystone.common.wsgi [-] POST http://172.29.236.100:5000/v3/auth/OS-FEDERATION/saml2/ecp
    2015-06-24 21:54:46.482 13569 ERROR keystone.contrib.federation.idp [-] Error when signing assertion, reason: Command '['xmlsec1', '--sign', '--privkey-pem', '/etc/ssl/private/signing_key.pem,/etc/ssl/
certs/signing_cert.pem', '--id-attr:ID', 'Assertion', '/tmp/tmpfXz0D4']' returned non-zero exit status 1
    2015-06-24 21:54:46.482 13569 WARNING keystone.common.wsgi [-] An unexpected error prevented the server from fulfilling your request.

So this was not very useful. Running the xmlsec1 command from the terminal worked fine, so it was not immediately clear what was the problem.

I would like to suggest that the stderr output from xmlsec1 is added to the log when the command fails, to help in troubleshooting this type of problem. I did not see a way to get that output without editing the Keystone source code.

Once I added the stderr to the log it was easy to figure out what the problem was, the permissions on the private key directory were not compatible with the account under which the xmlsec1 process was executed.

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

The only quesiton I have with regards to this request is if there are any secure bits that could leak to the logs.

I agree we should probably provide the stderr output *if* there is an issue with XMLsec1

Changed in keystone:
status: New → Triaged
importance: Undecided → Wishlist
Dolph Mathews (dolph)
tags: added: federation
tags: added: user-experience
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/202477

Changed in keystone:
assignee: nobody → Hugh Saunders (hughsaunders)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/202477
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=bcde2ff191c54819ff4c9cd263345be8d0604c9f
Submitter: Jenkins
Branch: master

commit bcde2ff191c54819ff4c9cd263345be8d0604c9f
Author: Hugh Saunders <email address hidden>
Date: Thu Jul 16 10:10:22 2015 +0100

    Log xmlsec1 output if it fails

    This is to assist with debugging assertion signing issues such as
    key/cert paths or permissions.

    Change-Id: I237211298878ae14cf1084dd35f1531445aa0b2e
    Closes-Bug: #1468544

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: liberty-2 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.