Skip to content

Commit

Permalink
[PLAT-15167]: Incorrect UI validation of the hba conf flag while sett…
Browse files Browse the repository at this point in the history
…ing up OIDC

Summary:
Steps:
1. Enable the hba conf flag with jwks_url and also upload the key in the upload modal as well.
2. Wait for the task to complete.
3. Check the hba_conf gflag values on the edit gflag UI. - Observe that there is missing key upload block.
4. Make some random changes and observe that validation continously throws an error

This issue is fixed, the initial issue was that when we pass both jwt_jwks_url and jwks, during edit GFlags the formatting of GFlags look totally wrong.

Test Plan:
Please refer to screenshot
{F282186}

{F282187}

Reviewers: jmak, agarg, lsangappa, kkannan

Reviewed By: jmak

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D37807
  • Loading branch information
rajmaddy89 committed Sep 9, 2024
1 parent cb7fd11 commit bdffcc3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions managed/ui/src/utils/UniverseUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const CONST_VALUES = {
SINGLE_QUOTES_SEPARATOR: "'",
COMMA_SEPARATOR: ',',
EQUALS: '=',
JWKS: 'jwks',
JWKS_EQUALS: 'jwks=',
JWT_JWKS_URL: 'jwt_jwks_url'
};

Expand Down Expand Up @@ -325,11 +325,10 @@ export const unformatConf = (GFlagInput) => {
}

// Extract jwks content from the row input if it exists
if (
GFlagRowConfSubset.includes(CONST_VALUES.JWKS) &&
!GFlagRowConfSubset.includes(CONST_VALUES.JWT_JWKS_URL)
) {
const JWKSKey = GFlagRowConfSubset.substring(GFlagRowConfSubset.indexOf(CONST_VALUES.JWKS));
if (GFlagRowConfSubset.includes(CONST_VALUES.JWKS_EQUALS)) {
const JWKSKey = GFlagRowConfSubset.substring(
GFlagRowConfSubset.indexOf(CONST_VALUES.JWKS_EQUALS)
);
if (isNonEmptyString(JWKSKey)) {
GFlagRowConfSubset = GFlagRowConfSubset.replace(JWKSKey, '');
GFlagRowConfSubset = GFlagRowConfSubset.trimEnd();
Expand Down

0 comments on commit bdffcc3

Please sign in to comment.