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

Elisa/7492 public device endpoint #8341

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

emyl3
Copy link
Collaborator

@emyl3 emyl3 commented Dec 3, 2024

BACKEND PULL REQUEST

Related Issue

Changes Proposed

Additional Information

  • co-authored by @DanielSass
  • created a new DeviceTypeProdSyncService for logic related to the device sync from prod
    • TBD I may or may not combine this with the existing DeviceTypeSyncService or just rename this service to make it clear it is for the LIVD sync will depend on how the sync is implemented in part III

Testing

  • deployed on dev4
  • use an API testing tool of your choice to fetch the device list from dev4
    e.g.
    curl --header "Sr-Prod-Devices-Token: REPLACE_TOKEN_HERE" https://dev4.simplereport.gov/api/devices
    
    • you should see the entire list without any InternalIds
  • use an API testing tool of your choice to hit that same endpoint without the Sr-Prod-Devices-Token header
    e.g.
    curl -v  https://dev4.simplereport.gov/api/devices
    
    • you should see no devices and see that the request is Unauthorized

@emyl3 emyl3 force-pushed the elisa/7492-public-device-endpoint branch from 6fd0a9b to 42aaf8b Compare December 4, 2024 21:22
Copy link

sonarcloud bot commented Dec 4, 2024

Copy link
Collaborator

@bobbywells52 bobbywells52 left a comment

Choose a reason for hiding this comment

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

Tested and the end point works as expected with and without authorization + paired with Elisa and talked through all of my questions -- LGTM! Thanks for all of you work on this Elisa!!

Copy link
Collaborator

@mpbrown mpbrown left a comment

Choose a reason for hiding this comment

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

Tested the endpoint and everything looks good!

With the current configuration it looks like the lower environments will also end up having this endpoint active right? Just want to check whether that is desired or whether we should have a configuration setting so that by default the endpoint is disabled in the lowers but could be turned on for testing if needed similar to the sendgrid config setting?

private int testLength;

@JsonIgnore
Copy link
Collaborator

Choose a reason for hiding this comment

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

@emyl3 Have you looked into our concerns that removing these ignore tags will cause an issue?

Copy link
Collaborator

Choose a reason for hiding this comment

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

And I apologize because I just now realized I never added that detail to the ticket:

#7492 (comment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had previously deployed this branch both with and without the @JsonIgnore -- is this what you were thinking in terms of adding a timer and logging to see if there's a difference with and without the @JsonIgnore

This is with the JsonIgnore tag
Screenshot 2024-11-15 at 12 21 54

This is without
Screenshot 2024-11-15 at 13 40 56

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let me know if this is not what you had in mind and I can adjust the testing plan and retest 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

Part of me thinks that the issue is no longer relevant because the audit log was moved out of our db table. The other part of me thinks if it is somehow still an issue, we aren't going to see it until we send this to prod.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I talked to @mehansen about this a bit and I loved her idea of just trying to replicate the original issue as a means of confirming that its no longer a concern. But again, the lack of an audit log in the db might make that a futile effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants