Remove backend gateway and have javascript talk directly with the API#197
Merged
wjonassen merged 7 commits intoopendcs:mainfrom Oct 2, 2024
Merged
Conversation
…ascript talk directly with the API. Added a context param to web.xml (Which I am not sure is the right place to do it), and it's accessed in decodes.jsp for all web pages to use.
wjonassen
commented
Sep 28, 2024
wjonassen
commented
Sep 28, 2024
opendcs-web-client/src/main/webapp/resources/js/datatables/datatables.js
Show resolved
Hide resolved
Collaborator
Author
|
This is just a small change to begin with so I can get some comments before I make the changes for the entire project. I've done login, as well as the platforms page. Once we agree, the rest of the pages will be updated to follow the same process. |
MikeNeilson
reviewed
Sep 28, 2024
opendcs-web-client/src/main/webapp/resources/jsp/includes/decodes.jsp
Outdated
Show resolved
Hide resolved
Removed Gateway code. Removed api.conf, since it's being declared in web.xml. Fixed AlgorithmsTest.java because api.conf is not used anymore. NOTE - Still need to test some of these changes, just getting the commit out there for comments on specifics and/or general flow.
adamkorynta
reviewed
Sep 30, 2024
adamkorynta
approved these changes
Sep 30, 2024
Added the authentication_type and authentication_base_path context parameters so we can use sso, as well as basic auth. Also, to go with the sso authentication, added some code in login.jsp to handle the sso authentication both visually and functionally.
MikeNeilson
reviewed
Oct 1, 2024
The versions in libs.versions.toml need to be where they are at for the lower version of java. There is also a vulnerability identified in this version, but until we update the supported java, this vulnerability will be there.
adamkorynta
reviewed
Oct 2, 2024
wjonassen
commented
Oct 2, 2024
opendcs-web-client/src/main/webapp/resources/jsp/includes/decodes.jsp
Outdated
Show resolved
Hide resolved
adamkorynta
approved these changes
Oct 2, 2024
|
This was referenced Oct 2, 2024
This was
linked to
issues
Oct 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Currently, javascript hits its own webserver and then that is relayed to the api. This is unnecessarily complicated, so now the browser will talk directly with the API, removing that middle step.
Solution
The goal is to remove the gateway code completely and have the user set the path to the api in a config file.
how you tested the change
Need to test that all of the pages and ajax calls interact the same as before. NOTE - CORS settings will need to be set properly as well.