RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1207805 - Need a way for pcs to clear out auth tokens
Summary: Need a way for pcs to clear out auth tokens
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-31 18:28 UTC by Chris Feist
Modified: 2016-01-29 18:19 UTC (History)
5 users (show)

Fixed In Version: pcs-0.9.142-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 09:36:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2145201 0 None None None 2016-01-29 18:19:51 UTC
Red Hat Product Errata RHSA-2015:2290 0 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2015-11-19 09:43:53 UTC

Description Chris Feist 2015-03-31 18:28:15 UTC
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ý [poki] 2015-03-31 18:37:11 UTC
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 15:12:33 UTC
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 21:30:50 UTC
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 21:40:15 UTC
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 09:36:38 UTC
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.