Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor-1160] Different Values Pointing to Basic Auth, Need to Unify #1619

Merged

Conversation

prabhask5
Copy link
Contributor

Description

Unified previous different basic auth formats ('basicauth', '', AuthType.BASIC) to one basic auth format (AuthType.BASIC), by changing all instances of 'basicauth' and '' in relation to auth types to AuthType.BASIC.

Category

Refactoring

Why these changes are required?

The different basic auth formats were confusing since they appeared to represent different auth types but they all pointed to the same auth type. Refactoring clears this confusion up.

What is the old behavior before changes and new behavior after changes?

Old behavior: 'basicauth', '' in relation to authType, AuthType.BASIC exist, new behavior: only AuthType.BASIC exists

Issues Resolved

#1160

Testing

Manually tested to make sure nothing broke, updated related auth type tests to include new AuthType.BASIC format.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Prabhas Kurapati <[email protected]>
Signed-off-by: Prabhas Kurapati <[email protected]>
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #1619 (facc60c) into main (d14bb68) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1619   +/-   ##
=======================================
  Coverage   66.29%   66.29%           
=======================================
  Files          93       93           
  Lines        2344     2344           
  Branches      317      317           
=======================================
  Hits         1554     1554           
  Misses        720      720           
  Partials       70       70           
Files Coverage Δ
public/apps/customerror/custom-error.tsx 25.00% <ø> (ø)

Signed-off-by: Prabhas Kurapati <[email protected]>
@prabhask5
Copy link
Contributor Author

@cwperks @DarshitChanpura @scrawfor99 This PR is ready for review I'm pretty sure, I'm not sure how to fix the code coverage warning if that is something I can fix, would like some guidance on that part. Ty!

@cwperks
Copy link
Member

cwperks commented Oct 27, 2023

@prabhask5 Can you merge in the latest from main into this branch? There are fixes for the integ tests in the main branch.

Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @prabhask5 , I left a few comments. This PR looks good to me, but I'm not sure about changing instances of empty string to AuthType.BASIC.

server/auth/auth_handler_factory.test.ts Outdated Show resolved Hide resolved
server/auth/auth_handler_factory.test.ts Show resolved Hide resolved
public/apps/account/account-app.tsx Outdated Show resolved Hide resolved
Signed-off-by: Prabhas Kurapati <[email protected]>
Signed-off-by: Prabhas Kurapati <[email protected]>
@prabhask5
Copy link
Contributor Author

@cwperks @DarshitChanpura Following up on the review request, tysm!

Copy link
Contributor

@stephen-crawford stephen-crawford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me--way to bust these out @prabhask5 thanks for all your great work.

@cwperks cwperks added the backport 2.x backport to 2.x branch label Nov 13, 2023
@cwperks cwperks merged commit 2131598 into opensearch-project:main Nov 13, 2023
10 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 13, 2023
#1619)

* finished ticket

Signed-off-by: Prabhas Kurapati <[email protected]>

* fixed invalid auth type error

Signed-off-by: Prabhas Kurapati <[email protected]>

* fixed unit tests

Signed-off-by: Prabhas Kurapati <[email protected]>

* made requested changes

Signed-off-by: Prabhas Kurapati <[email protected]>

* updated saml to AuthType.SAML + fixed basicauth test

Signed-off-by: Prabhas Kurapati <[email protected]>

---------

Signed-off-by: Prabhas Kurapati <[email protected]>
(cherry picked from commit 2131598)
@cwperks
Copy link
Member

cwperks commented Nov 13, 2023

Thank you @prabhask5 ! Sorry I just got home from a conference yesterday and had limited time to review PRs. This looks good to me 🚢

leanneeliatra pushed a commit to leanneeliatra/security-dashboards-plugin-fork that referenced this pull request Nov 17, 2023
opensearch-project#1619)

* finished ticket

Signed-off-by: Prabhas Kurapati <[email protected]>

* fixed invalid auth type error

Signed-off-by: Prabhas Kurapati <[email protected]>

* fixed unit tests

Signed-off-by: Prabhas Kurapati <[email protected]>

* made requested changes

Signed-off-by: Prabhas Kurapati <[email protected]>

* updated saml to AuthType.SAML + fixed basicauth test

Signed-off-by: Prabhas Kurapati <[email protected]>

---------

Signed-off-by: Prabhas Kurapati <[email protected]>
Signed-off-by: [email protected] <[email protected]>
DarshitChanpura added a commit that referenced this pull request Nov 17, 2023
#1619) (#1649)

---------
Signed-off-by: Prabhas Kurapati <[email protected]>
(cherry picked from commit 2131598)

Co-authored-by: Prabhas Kurapati <[email protected]>
Co-authored-by: Darshit Chanpura <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants