Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1207805 - Need a way for pcs to clear out auth tokens
Need a way for pcs to clear out auth tokens
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs (Show other bugs)
7.2
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Chris Feist
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-31 14:28 EDT by Chris Feist
Modified: 2016-01-29 13:19 EST (History)
5 users (show)

See Also:
Fixed In Version: pcs-0.9.142-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 04:36:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2145201 None None None 2016-01-29 13:19 EST
Red Hat Product Errata RHSA-2015:2290 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2015-11-19 04:43:53 EST

  None (edit)
Description Chris Feist 2015-03-31 14:28:15 EDT
We should provide a command for pcs to clear out your current tokens, as well as clear out tokens/users on the server from /var/lib/pcsd

Maybe something like this:
pcs cluster auth --clear
pcs cluster clear-auth
pcs cluster auth --reset
...
Comment 1 Jan Pokorný 2015-03-31 14:37:11 EDT
This is where full-blown certificates might be nicer to work with
-- deleting just selected (per some identification) authentication
holders, etc.  On the other hand, such approach might turn to be
Pandora's box on its own.
Comment 2 Chris Feist 2015-06-11 11:12:33 EDT
Provide way to reset certificates and other files as well.

Note: Tomas has already created the ability to use customer certificates and sync them to all nodes.
Comment 3 Chris Feist 2015-06-23 17:30:50 EDT
Fixed upstream here:

https://github.com/feist/pcs/commit/2e74ea2059383cbf247ccc0166b3be5602c4a8c0

Command is 'pcs pcsd clear-auth [--remote] [--local]'.

If you're root it will remove /var/lib/pcsd/tokens, if not ~/.pcs/tokens (with --local)

With --remote it remove /var/lib/pcsd/pcs_users.conf

And without --local or --remote it removes both files.
Comment 4 Chris Feist 2015-07-10 17:40:15 EDT
After Fix:

[root@c3 ~]# rpm -q pcs
pcs-0.9.142-1.el7.x86_64
[root@c3 ~]# ls -lh /var/lib/pcsd/tokens 
-rw-------. 1 root root 357 Jul 10 16:33 /var/lib/pcsd/tokens
[root@c3 ~]# ls -lh /var/lib/pcsd/pcs_users.conf 
-rw-r--r--. 1 root root 1.4K Jul 10 16:33 /var/lib/pcsd/pcs_users.conf
[root@c3 ~]# pcs pcsd clear-auth --remote
[root@c3 ~]# ls -lh /var/lib/pcsd/tokens 
-rw-------. 1 root root 357 Jul 10 16:33 /var/lib/pcsd/tokens
[root@c3 ~]# ls -lh /var/lib/pcsd/pcs_users.conf 
ls: cannot access /var/lib/pcsd/pcs_users.conf: No such file or directory
[root@c3 ~]# pcs pcsd clear-auth --local
[root@c3 ~]# ls -lh /var/lib/pcsd/pcs_users.conf 
ls: cannot access /var/lib/pcsd/pcs_users.conf: No such file or directory
[root@c3 ~]# ls -lh /var/lib/pcsd/tokens 
ls: cannot access /var/lib/pcsd/tokens: No such file or directory
[root@c3 ~]#
Comment 8 errata-xmlrpc 2015-11-19 04:36:38 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-2290.html

Note You need to log in before you can comment on or make changes to this bug.