Bug 2111998

Summary: fence_ibm_vpc: Add an authentication token caching mechanism (save token in session for configurable interval) (RHEL9)
Product: Red Hat Enterprise Linux 9 Reporter: Oyvind Albrigtsen <oalbrigt>
Component: fence-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: Brandon Perkins <bperkins>
Severity: medium Docs Contact:
Priority: urgent    
Version: 9.1CC: bperkins, cfeist, cluster-maint, cluster-qe, toneata
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 9.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: fence-agents-4.10.0-31.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2102024
: 2127872 2127878 (view as bug list) Environment:
Last Closed: 2023-05-09 07:19:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2102024    
Bug Blocks: 2127872, 2127878    

Description Oyvind Albrigtsen 2022-07-28 15:07:15 UTC
+++ This bug was initially created as a clone of Bug #2102024 +++

Description of problem:

Enhancement:
Add an authentication token caching mechanism to the IBM VPC fencing agent (save token in session for configurable interval)

When any of the fence monitor, VM power status, or VM shutdown API requets are trigged, an authentication token is retrrieved for authorization. 

If the authentication token can be cached within the session(for a configurable interval), it can be reused in subsequent calls(for example
when the fence agent triggers a shutdown, VM/VSI power status, monitor, etc).


For instance, consider the cache token that will be saved in the session:
1.If the current token is expired (or never fetched), make a new request for one.
2.If the current token should be refreshed, issue a refresh request.
3.After any request initiated above complete, return the stored token.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:


Actual results:


Expected results:


Additional info:
https://github.com/ClusterLabs/fence-agents/pull/493

Comment 16 errata-xmlrpc 2023-05-09 07:19:25 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 (Moderate: fence-agents security and bug fix update), 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://access.redhat.com/errata/RHSA-2023:2161