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

Removed use of Basic authentication for the sample app. #156

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

santiagoars
Copy link
Contributor

[PR] Removed use of Basic authentication for the sample app.

## Description
The ords-remix-jwt-sample template was originally using Basic authentication when executing requests to the different handlers defined in ORDS. Since using Basic auth is not really a best practice, a ticket was opened to remove it. Instead, the end user endpoints are no longer protected and can be accessed by any user. The end user can only execute read-only actions, so it is fine to have it public. 

Fixes # (issue number)

## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?
In order to test what type of auth is used, requests were made throughout the application using both the normal end user and an authenticated user. Logs were printed inside the `ORDSFetcher` function to compare the `authCredentials` being used when the user requests the home page.

- [ ] End User
AUTH:  
AUTH:  
AUTH:  
AUTH:  
GET /home 200 - - 2147.232 ms
- [ ] Authenticated User
AUTH:  Bearer <token>
AUTH:  Bearer <token>
AUTH:  Bearer <token>
AUTH:  Bearer <token>
GET /home 200 - - 1829.794 ms
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [n/a] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings/errors
- [x] I have added tests that prove my fix is effective or that my feature works
- [n/a] New and existing unit tests pass locally with my changes

@santiagoars santiagoars requested a review from oiramS November 19, 2024 18:58
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 19, 2024
Copy link
Contributor

@oiramS oiramS left a comment

Choose a reason for hiding this comment

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

@santiagoars Uppon further inspection of the changes, noticed that the discover functionality is now inaccessible if the user is not logged in, we may need to make those endpoints public as well and update the corresponding documentation section to avoid loss of service.

Screenshot 2024-11-19 at 6 15 05 p m

@santiagoars
Copy link
Contributor Author

santiagoars commented Dec 5, 2024

List of things to do before closing the ticket:

@oiramS oiramS self-requested a review December 11, 2024 15:18
Copy link
Contributor

@oiramS oiramS left a comment

Choose a reason for hiding this comment

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

Please implement the requested changes and close the threads that will be implemented in a future PR. Once that is done re-request another review.

@oiramS oiramS self-requested a review December 11, 2024 23:14
Copy link
Contributor

@oiramS oiramS left a comment

Choose a reason for hiding this comment

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

Could you also please:

@santiagoars
Copy link
Contributor Author

I executed the CONCERT_SAMPLE_APP.sql directly in DB Actions and it executed correctly.

Screenshot 2024-12-12 at 3 35 32 p m

@santiagoars
Copy link
Contributor Author

santiagoars commented Dec 12, 2024

List of things to do before closing the ticket:

Just for reference, the unchecked items in this comment will be worked on a different PR.

@oiramS
Copy link
Contributor

oiramS commented Dec 12, 2024

Assigning to @dbtools-antcampo so this can be merged.

@oiramS oiramS self-requested a review December 12, 2024 23:36
@dbtools-antcampo dbtools-antcampo merged commit dba7231 into main Dec 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement. templates-ords-remix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants