Open Mylanos opened 4 days ago
@Mylanos: This pull request references Jira Issue OCPBUGS-44505, which is invalid:
Comment /jira refresh
to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.
The bug has been updated to refer to the pull request using the external bug tracker.
/jira refresh
@Mylanos: This pull request references Jira Issue OCPBUGS-44505, which is valid. The bug has been moved to the POST state.
Requesting review from QA contact: /cc @yapei
/retest
/retest
/retest
@Mylanos: The following test failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
ci/prow/e2e-gcp-console | c771cf1d2e1dac5526e99c783bc3e402c89210c5 | link | true | /test e2e-gcp-console |
Full PR test history. Your PR dashboard.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Mylanos, spadgett
The full list of commands accepted by this bot can be found here.
The pull request process is described here
This PR replaces the use of
crypto-browserify
for generating a hash for a given username with the nativeCrypto
object and itssubtle.digest
method, which is supported in all browsers compatible with v4.18. This way we not only remove unnecessary dependencies, but also use browser-optimized native cryptographic functionality.Changes in this PR:
crypto-browserify
's createHash function with a newly implementedgenerateHash
function that utilizes browser-nativeCrypto.subtle.digest
.Analysis: The way we generated the hashes inside of the
useSelector
hook call foruserUid
retrieval, had to be refined as thesubtle.digest
returns aPromise
and theuseSelector
hook should remain synchronous by design. I split the hook call into two parts, where the first part only retrieves theuserImpersonateNameOrUID
and the second oneusername
. Theusername
contents change is used to active an effect which generates its unique identifier/hash intouniqueUsername
. TheuserUid
is then initialized based on the prior implementationuserImpersonateNameOrUID || uniqueUsername
.