Removing User Auth Endpoint#67
Closed
jacob6838 wants to merge 19 commits into
Closed
Conversation
* ui: adjust user admin tab to show only users of signed in organization * ui: adjust intersection admin tab to show only intersections of signed in organization * ui: adjust rsu admin tab to show only rsus of signed in organization * chore: fix spacing * chore: remove unneeded method calls * fix: adjust preloaded data for admin page to update when organization is changed * chore: remove unused import * chore: remove unused import * test: adjust unit test for removal of unnecessary dispatch * refactor: move organization filtering to back-end * chore: remove unused variables * test: update front-end unit tests * chore: adjust delete messages for RSU and User tabs * chore: adjust delete messages for RSU tab * test: adjust unit tests for clarity
* UI: update help page descriptions and images * UI: update help page images * test: adjust unit test for help page UI * Adding markdown help page with new formatting and additional rsu configuration descriptions * Securely removing IP Addresses from images * Update webapp/src/components/help.md Co-authored-by: Drew Johnston <31270488+drewjj@users.noreply.github.com> * Adding help section on permissions * Updating V2x msg viewer case to V2X * ui: adjust formatting and additional descriptions * chore: refactor help page images and add unit test * Re-formatting help page * Adding in-page permissions table * Update Help.test.tsx.snap * ui: remove environment variables from help page and make descriptions clearer for non devs * ui: remove redundant word from help page --------- Co-authored-by: jacob6838 <jfrye@neaeraconsulting.com> Co-authored-by: Jacob Frye <51723791+jacob6838@users.noreply.github.com> Co-authored-by: Drew Johnston <31270488+drewjj@users.noreply.github.com>
Adding default environment variables for all non-required elements, and adding errors for required variables. un-specified non-required variables will produce warnings when relevant. Changes include re-working python api env variable access, rewriting sample.env with only 3 required variables, overhauling run documentation, and updating debug configurations * Moving Dockerfile to match other services * Adding in required jar dependencies * Re-Adding runtime to Dockerfile * Updating Reference BSM * Switching from Message Frame types to Specific types * Removing Data Loaders from read accessors * Adding in Accessors for Processed BSM messages * Removing unneeded print statements * Adding in Processed BSM MongoDB accessor and Endpoints * Adding PSM support to decoder * Removing ASN.1 Codec Submodule * Fixing bug when decoding capitalized messages * Switching to hosted jar files * Removing SNMP controller - Controller to be added in rsu-status manager instead. * Switching Ode Data objects to OdeMessageFrame * Removing un-needed print statements * Removing print statements * Updating version number * Switching BSM queries to use common bounding box calculation * Removing DataLoader from Events and Assessments * Updating TIM message size allowance * Adding static modifiers to decoder mappers * Moving large strings into files to improve readability * Updating ci/cd scripts to use repo host instead of USDOT * Updating CI to Java version 22 * Updating processed BSM, SPAT, and MAP webapp types * Cleaning up removed OdeBsmData type * Updating webapp intersection map to use processed bsm * Updating webapp asn1 processing for ProcessedBsm * Cleaning up tests * Adding organization-permissions chart to README * Switching to proper bounding box * Adding valid date check for spat visualization * Removing Geo Coordinate reference requirement * Combining orgs_to_add to bulk update queries * Implementing write_db_batched for batched add queries * Updating unit tests for batched queries * Resolving processed-msg unit test merge conflicts * Resolving unused variable warnings * Update StompControllerTest.java * Adding "Update time range" intersection map button * Update control-panel.tsx * Updating env access in python addons * fixing python unit tests * Fixing issues with Serializing page data from intersection-api * Update sample.env * Fixing python api bugs * Adding default values to docker-compose yml files * Updating GITHUB token instructions * Cleaning up unnecessary imports * Updating intersection-api README * Converting map timestamps in intersection map * Update map-slice.tsx * Re-naming sliderValue to sliderValueDeciseconds * Add pull request file change limit check to CI workflow * Enhance CI workflow to log max allowed changed files and validate pull request size * Improve CI workflow logging for changed files count in pull requests * Add cancellation of parallel jobs on failure in CI workflow * chore: revert cancel * Enhance CI workflow to enforce changed files limit before subsequent jobs * Refactor CI workflow to directly use MAX_CHANGED_FILES variable in error message for clarity * Update control-panel.tsx * Fixing python api env var references * Update api_environment.py * Updating python unit tests * Fixing rsu query bugs * Update main.py * Fixing env defaults for addons and webapp * Switching visualizer to pull processed BSMs * Re-generating sample mongo data with processed-msg updates * Resolving unit test errors * Revert "Re-generating sample mongo data with processed-msg updates" This reverts commit d7bce4d. * Reapply "Re-generating sample mongo data with processed-msg updates" This reverts commit 1a0cdba. * Update release notes 2025-Q3 for version 2.0.0 * Update paramaterization * Rename the param variable to be consistent with changes from develop * Fixing timeBeforeSeconds merge conflict * Update userSlice.ts * Switching time API server url * Updating time-server api unit test * Updating map/spat times to be in milliseconds * Updating map/spat times to be in milliseconds * Update map-slice.tsx * Update timeSyncSlice.ts * Removing print statments * Update map-slice.tsx * Update control-panel.tsx * Finalizing sample.env and KEYCLOAK_ENDPOINT default * Create sample.env * Documenting required environment variables * Pulling live spat offset calculation into control-panel * Updating live data streaming cleanup * Fixing rsu organization query bugs * Default spat timestamp in decoder mode when leaving/returning * Clearing sourceData when resetting intersection map view * Update map-slice.tsx * Cleaning up live intersection data start vs stop logic * Adding cancellation of pullInitialData * Temporarily removing live data updates * Adding quick-start section to README * Switching Decoder unit tests to use json comparison in unit tests * Switching live intersection map to use deduplicated map/spat * Re-enabling live data updates * Live intersection map pulling initial spat data * Cleaning up latent request on live data restart * adding abort controllers to live data map/spat * Removing live data offset display * Delaying live data initial SPaT message retrieval * Adding spat message age to live viewer * Tweaking time offset sync to reduce error in response time * Updating timeRenderWindow logic * Update map-slice.tsx * Updating ffm version to usdot 2.0.2 * Updating keycloak sample theme * Adding logging level empty check * Update Dockerfile.intersection-api * Updating slider value on live message received * Adding asn1application binaries and configuring codec confid for linux vs windows loading * Defaulting spat signal group to latest even if outside of render interval * Improving live ws disconnection * Improving live ws disconnection * Working codecconfig asnapplication dll/so loading * DEVELOPMENT ONLY - adding usdot to settings.xml * Fixing spat signal group latest processing * Update sample-full.env * Updating wzdx enabled default * Tweaking live imap slider update call * Adding Mapbox token creating instructions * Upgrading python-keycloak to 5.8.1 to resolve introspect errors * Tweaking connect/reconnect for live imap * Update map-slice.tsx * Rewriting live imap ws client * Fixing new imap live ws connection * Removing random } from aggregation endpoint timestamps * Tweaking live imap reconnect logic * Tweaking cleanupLiveStreaming method * Update map-slice.tsx * Adding reconnect on webDocketFactory error * Updating jpo-utils to USDOT develop * Update map-slice.tsx * Increasing wait on WS reconnection attempt * Adding optional variables to sample.env * Fixing default keycloak URL * Adding session ID to live intersection map * Updating README getting started docs * Resolving missing params in test_ping_data_query * Update test_rsu_online_status.py * Tweaking webapp decoder parsing * Re-setting live data active after failed reconnect * Re-pulling map/spat each reconnect * Hard resetting map view on live data active toggle * Removing hard map reset on live data active toggle * Updating ODE bsm json tests for schema * Update test_rsu_online_status.py * Converting ANY auth queries to IN * Update configSlice.ts * Reducing WZDx icon height * Reducing Intersection icon width and label font size * Tweaking rsu_geo_query query formatting * Replaceing get 0 with getFirst * Fixing auth_tools org permissions check parsers * Removing print statement * Fixing auth rsu IP address comparison * Fixing formatting bug in RSU geo query * Final re-formatting of rsu geo fwd query * Removing unnecessary print statements * Removing cvmger_api query logger * Updating DefaultConfig tests * Adding intersection config boolean test * Updating jpo-utils submodule to usdot develop * Removing overrides from iapi settings.xml * Updating jpo-utils to USDOT master * Updating conflictmonitor iapi dep version * Update settings.xml * Update docs/Release_notes.md Co-authored-by: jacob6838 <51723791+jacob6838@users.noreply.github.com> * Update docs/Release_notes.md Co-authored-by: jacob6838 <51723791+jacob6838@users.noreply.github.com> * Update docs/Release_notes.md Co-authored-by: jacob6838 <51723791+jacob6838@users.noreply.github.com> * Update docs/Release_notes.md * Updating default webapp port to 3000 Adding WEBAPP_PORT env var and changing default port to 3000 * Create developer_best_practices.md * Adding submodule init to quick-start section * Adding getting-started link to the quick-start section * Adding fork sync instructions * Updating fork sync PR creation description * Improving mocking in timeSyncSlice test * Update timeSyncSlice.test.ts * Updating KC_LOG_LEVEL env var name * Updating PR length recommendation * Cleaning up unused code and print statements * Fixing docker host ip in sample.env.local * Removing deprecated VSCode virtual environment instructions * Adding additional docker build debugging steps * Updating squash merge resolution to prefer merge * Adding python API .vscode default env vars * Removing unused intersection_no_api docker profile * Cleaning up docker-compose commands and language * Adding localhost:3001/3002 to realm.json * Cleaning up realm.json * Removing unnecessary configure_logging calls * Updating vscode compoint task references * Updating readme to use webapp port 3000 * Updating jpo-utils to cdot-cv for mongo execute permissions * Improving webapp npm setup documentation * Setting python debug config to use 8081 * Set Flask run port to 8081 and update launch configuration * Adding FLASK_RUN_PORT env var --------- Co-authored-by: john-wiens <jwiens3141@gmail.com> Co-authored-by: Brandon Payne <bpayne@trihydro.com> Co-authored-by: Drew Johnston <31270488+drewjj@users.noreply.github.com> Co-authored-by: Drew Johnston <drewjj901@gmail.com>
Updating Heatmap Visuals and Data Controls API rsucounts endpoints returns counts for all message types at once with aggregation query Webapp uses RTK query hooks to retrieve rsu counts data New heatmap cluster layer shows clustered counts for selected message type Counts message type fields migrated to MenuSlice * Adding dropdown on heatmap * Adding prototype aggregation endpoint to rsucounts * Adding fork sync instructions * Updating fork sync PR creation description * rsu counts returning all message types at once * Adding rtk-query rsuCountsApi * Updating DisplayCounts to use local state and rtk query counts * Improving mocking in timeSyncSlice test * Update timeSyncSlice.test.ts * Updating KC_LOG_LEVEL env var name * Adding additional heatmap display layers * Removing explicit mapbox gl import * Fixing heatMapData post processing * Updating msg count types to uppercase * Update Map.tsx * Filtering out heatmap data with less than 0 count * Updating RSU cluster colors * Adding extrusion geometry * Reducing extrusion height * Updating cluster sizing * Tweaking count labels color * Tweaking heatmap formatting * Removing heatmap extrusion layer * Adding message counts to RSU side menu * Opening message counts on heatmap display * tweaking heatmap layer opening count menu * Updating heatmap unit tests * Update test_rsu_querycounts.py * Update test_rsu_querycounts.py * Updating PR length recommendation * Cleaning up unused code and print statements * Fixing docker host ip in sample.env.local * Removing deprecated VSCode virtual environment instructions * Adding additional docker build debugging steps * Updating rsu querycounts tests for aggregation * Updating squash merge resolution to prefer merge * Updating heatmap stops array * Keying map layers object * Update Map.tsx * Tweaking heatmap intensity interpolation * Tweaking heatmap intensity interpolation * Distinguishing heatmap cluster borders * Final tweak of heatmap intensity * Adding python API .vscode default env vars * Removing unused intersection_no_api docker profile * Cleaning up docker-compose commands and language * Adding localhost:3001/3002 to realm.json * Cleaning up realm.json * Fixing timeSyncSlice test * Update Map.test.tsx.snap * Removing unnecessary COUNTS_MSG_TYPE variable * Updating unit tests * Updating heatmap intensity stops * Tweaking heatmap intensity scaling --------- Co-authored-by: john-wiens <jwiens3141@gmail.com> Co-authored-by: Brandon Payne <bpayne@trihydro.com> Co-authored-by: Drew Johnston <31270488+drewjj@users.noreply.github.com> Co-authored-by: Drew Johnston <drewjj901@gmail.com>
* Removing RSU configuration admin permission requirement * Requiring operator role to view RSU configuration menu
Fixing RSU configuration menu permissions to allow all org-roles above Operator to access the menu (operator and admin). The menu should only be hidden from users
…#261) * feat: add RsuSnmpFwdFetch resource for fetching SNMP configurations * feat: implement RSU message forwarding configuration fetch functionality * feat: display RSU message source type and enhance fetch functionality in SnmpwalkMenu * refactor: centralize SNMP message forwarding configuration formatting logic * refactor: introduce constants for message forwarding types and table names in SNMP helpers * feat: add memoized check for empty message forward configurations in SnmpwalkMenu * chore: move message source type display to the bottom of SnmpwalkMenu * feat: add error handling for missing RSU fields in SNMP config fetch * feat: refactor message forwarding types and table names to use Enums * feat: enhance type safety and handling for RSU message forward config fetch * refactor: rename RSU config fetch methods and actions for clarity and consistency * feat: update error message for RSU message forwarding configuration fetch * feat: add line break for improved layout in SnmpwalkMenu component * fix: update message forwarding type checks to use Enum values for consistency * chore: simplify error toast message for RSU message forwarding configuration fetch * refactor: change logging level to warning and remove unused error response in rsu_snmp_fwd_fetch * fix: avoid exposing raw exception details to client * fix: use logging.exception for better traceback visibility during SNMP config fetch errors * fix: add rejectWithValue for improved error handling in geoRsuQuery * fix: handle non-Error and unknown exceptions during RSU config fetch * fix: use a copy of rsu_info to preserve original data during SNMP config fetch * test: add unit tests for `snmp.rsu_message_forward_helpers` module * test: update config slice tests to include changeSuccess, destIp, and snmpMsgType * fix: ensure consistent use of Enum `.value` for TableNames in RSU message forwarding * fix: rename `m_type` to `msgfwd_type_value` for clarity in RSU message forwarding logic * chore: move closing brace * test: clean up unused imports in `test_rsu_message_forward_helpers` * test: update assertions to use `.value` for TableNames Enum in RSU message forwarding tests * docs: add detailed docstring for `format_snmp_msgfwd_configs` function * fix: return 500 with error details if RSU info is missing required SNMP fields * docs: add docstrings for `RsuSnmpFwdFetch` class and `get` method to improve clarity * test: add unit tests for `RsuSnmpFwdFetch` class to cover various scenarios in SNMP config retrieval * test: add unit test for handling API exceptions in `configSlice` * test: add unit test for handling non-ok response in `ApiHelper._getData` * chore: remove debug `console.log` statements from `configSlice` async actions * fix: handle undefined payload in `getRsuMsgConfigsFromRsu.rejected` case in `configSlice` * fix: handle optional chaining for undefined tables in `SnmpwalkMenu` and correct conditional logic * fix: improve error message for empty RSU message forwarding response in `configSlice` * fix: update TS type for `getRsuMsgConfigsFromRsu` response in `SnmpwalkMenu` * test: add unit tests for handling string and unknown exceptions in `getRsuMsgConfigsFromRsu` * fix: make `snmp_encrypt_pw` optional in `RsuSnmpFwdFetch` and update corresponding tests * test: update snapshot for `SnmpwalkMenu` to reflect new UI changes * refactor: improve error handling in RsuSnmpFwdFetch by raising appropriate exceptions * fix: ensure case insensitivity for message forwarding configuration types in rsu_message_forward_helpers * chore: update empty message forwarding configurations text in SnmpwalkMenu for clarity * fix: correct logic for checking message forwarding configuration tables in SnmpwalkMenu * test: parameterize message type and IP tests for improved readability and maintainability * chore: update snapshot for SnmpwalkMenu * test: update RsuSnmpFwdFetch tests to use ANY for flexibility in mock assertions * test: remove unnecessary caplog assertion in test_format_snmp_msgfwd_configs_unknown_type
* Updating map layer ID references * Removing python API moove ai features * Removing moove ai webapp features * Removing moove ai env vars * Removing moove ai unit tests * Removing additional moove ai env vars * Moove ai removal unit test tweaks
* chore: update dependencies via `npm audit fix` * chore: upgrade `jspdf` to 4.0.0 and update related dependencies * chore: add `TextEncoder` and `TextDecoder` to global setup in tests * chore: add dependency overrides for `nth-check`, `postcss`, and `webpack-dev-server` in `package.json` These overrides are used to resolve vulnerabilities in react-scripts' sub-dependencies that are no longer maintained. * chore: run up to date, audited 1954 packages in 2s 462 packages are looking for funding run `npm fund` for details found 0 vulnerabilities for newly detected vulnerabilities * chore: upgrade `eslint` to 9.39.2 and add override in `package.json` This resolves deprecation warnings for @humanwhocodes/config-array@0.13.0, @humanwhocodes/object-schema@2.0.3 and eslint@8.57.1 * Revert "chore: upgrade `eslint` to 9.39.2 and add override in `package.json`" This reverts commit e8fc5ad. * chore: remove `webpack-dev-server` override from `package.json`
* chore: run `npx viject` to migrate to Vite * chore: update dependencies for @material-table/core and @types/react-dom * chore: update testing setup to use Vitest * chore: update Jest snapshots to Vitest format * chore: migrate Jest mocks to Vitest * chore: update more snapshots to reflect migration from Jest to Vitest * chore: remove `overrides` section from package.json * chore: update Node.js version in Dockerfile to 22-alpine * chore: improve environment variable handling and update Mapbox style loading logic * chore: update environment variables to VITE_ prefix and migrate configuration files accordingly * chore: update ESLint and TypeScript-related dependencies * chore: update jsdom to v27.4.0 * chore: update component snapshots to reflect style changes in test files * chore: update Node.js version in CI workflow to 22 and remove redundant npm commands * chore: set CI timezone to UTC, switch to `npm ci`, and enhance `DateTime.local` override in tests * chore: update TypeScript and development dependencies in package.json * chore: update test files to use ISO 8601 date strings for consistency * chore: replace `jest` with `vitest` mocks test files failing in CI * chore: update CI timezone to America/Denver * chore: remove `.env.development` and update references to `sample.env.development.local`
* Creating Admin RSU postgres objects and repositories * Adding all queries for getModifyRsuData * Creating initial admin getRsuData endpoints * Successfully compiling RSU repository queries * Converting admin RSU queries to native * Working admin rsu iapi GET endpoint * Writing iapi rsu management unit tests * refactor: regenerate PostgreSQL entity classes for RSU management using JPA Buddy * Fixing repositories after table renaming * Fixing warnings * Removing RSU admin endpoint files * Re-generating all jpa models * Moving postgres models * Regenerating all jpa postgres objects * Tweaking jpa table data models * Converting PostgresService to Repository queries * Removing unused repos * Adding missing @id annotations * Update PermissionServiceTest.java * Updating sql to use booleans and adding missing pkeys * Fixing JPA Object data types * Updating iss_keys and obu_ota_requests JPA defs with pkeys * Minor code cleanup * Revert "Updating sql to use booleans and adding missing pkeys" This reverts commit 55b791c. * Updating iapi jpa boolean types * Moving create schema keycloak to top of sql script --------- Co-authored-by: Matt Cook <matt.cook@trihydro.com>
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.
PR Details
Description
Removing user-auth endpoint from python API and integration features into webapp. The webapp previously used a python api user-auth endpoint to validate the user's access and get a list of their registered organizations. However, all of that information is available through accessing keycloak directly and decoding the JWT token.
The webapp previously completed the following actions after a user logged in through keycloak:
The webapp now completes the following actions:
How Has This Been Tested?
This was tested by running the webapp locally and logging into the webapp with the default test@gmail.com user, as well as creating a new user with no org assignments to confirm that they were not granted full access and directed to contact support
Types of changes
Checklist: