Skip to content

New UI, removed mockas and old UI service, oidc for UI/API auth#385

Merged
masv3971 merged 16 commits into
mainfrom
masv/apigw/new_ui
May 13, 2026
Merged

New UI, removed mockas and old UI service, oidc for UI/API auth#385
masv3971 merged 16 commits into
mainfrom
masv/apigw/new_ui

Conversation

@masv3971
Copy link
Copy Markdown
Member

@masv3971 masv3971 commented May 7, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates API/UI authentication to OIDC/JWKS, introduces a new embedded Admin UI served by APIGW, and removes the legacy standalone UI and MockAS services.

Changes:

  • Replace api_auth configuration/secrets from BasicAuth/JWT to JWKS/OIDC and update middleware accordingly (including SPOCP rules at the APIAuth level).
  • Add embedded Admin UI (static assets + OIDC login/session endpoints) and allow admin sessions to access /api/v1/* routes.
  • Add datastore + identity-mapping “search” APIs and remove old UI/MockAS codepaths (commands + internal services/assets).

Reviewed changes

Copilot reviewed 61 out of 64 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
pkg/model/secrets.go Switch secrets structure from basic_auth users to api_auth.oidc client_secret and update Clear/Apply logic.
pkg/model/secrets_test.go Update secrets tests for OIDC client secret handling.
pkg/model/config.go Redefine APIAuth to JWKS/OIDC + move SPOCP rules to top-level APIAuth.
pkg/model/config_default_test.go Update defaults tests for new JWKS/OIDC fields.
pkg/httphelpers/middleware.go Add SessionOrAPIAuth helper middleware.
pkg/httphelpers/middleware_jwt.go Rename/reshape JWT auth to JWKS auth, add OIDC discovery mode, change APIAuth to return (handler, error).
pkg/httphelpers/middleware_jwt_test.go Update middleware tests for JWKS/OIDC refactor and new APIAuth signature.
pkg/helpers/validate.go Add struct-level validation to enforce JWKS and OIDC mutual exclusivity in APIAuth.
pkg/configuration/config_test.go Update secrets parsing test YAML to use api_auth.oidc.client_secret.
internal/ui/upload_csv_templates/README.md Remove legacy UI CSV upload template documentation.
internal/ui/upload_csv_templates/ehic_upload_template.csv Remove legacy UI CSV template.
internal/ui/static/ui.js Remove legacy UI JavaScript bundle.
internal/ui/static/index.html Remove legacy UI HTML entrypoint.
internal/ui/outbound/kafka_message_publisher.go Remove legacy UI Kafka publisher implementation.
internal/ui/httpserver/service.go Remove legacy standalone UI HTTP server.
internal/ui/httpserver/middleware.go Remove legacy UI session/auth middleware.
internal/ui/httpserver/endpoints.go Remove legacy UI endpoints.
internal/ui/httpserver/api.go Remove legacy UI apiv1 interface.
internal/ui/cache/service.go Remove legacy UI cache/session-key service.
internal/ui/apiv1/handlers.go Remove legacy UI apiv1 handlers (username/password login, proxy calls).
internal/ui/apiv1/event_publisher.go Remove legacy UI event publisher interface.
internal/ui/apiv1/client.go Remove legacy UI apiv1 client wiring.
internal/mockas/inbound/kafka_message_handlers.go Remove legacy MockAS Kafka consumer implementation.
internal/mockas/httpserver/service.go Remove legacy MockAS HTTP server.
internal/mockas/httpserver/endpoints.go Remove legacy MockAS endpoints.
internal/mockas/httpserver/api.go Remove legacy MockAS interface.
internal/mockas/apiv1/utils.go Remove legacy MockAS mock-generation helpers.
internal/mockas/apiv1/pid.go Remove legacy MockAS PID mock generator.
internal/mockas/apiv1/pda1.go Remove legacy MockAS PDA1 mock generator.
internal/mockas/apiv1/handlers.go Remove legacy MockAS handlers.
internal/mockas/apiv1/elm.go Remove legacy MockAS ELM mock generator.
internal/mockas/apiv1/ehic.go Remove legacy MockAS EHIC mock generator.
internal/mockas/apiv1/datastore_request.go Remove legacy MockAS datastore HTTP client code.
internal/mockas/apiv1/client.go Remove legacy MockAS client wiring.
internal/apigw/staticembed/embed.go Broaden embedded static asset patterns to include new admin UI assets.
internal/apigw/staticembed/admin.js Add new Admin UI frontend logic (Alpine-based) calling new search + CRUD APIs.
internal/apigw/staticembed/admin.html Add new Admin UI HTML entrypoint with OIDC login flow.
internal/apigw/httpserver/service.go Wire APIAuth middleware with error handling; add Admin UI routes, sessions, and session-or-api auth for /api/v1.
internal/apigw/httpserver/methods.go Add helper to read org_id list from admin session.
internal/apigw/httpserver/endpoints_identity_mapping.go Add identity-mapping search endpoint and apply session org_id filter to request.
internal/apigw/httpserver/endpoints_datastore.go Add datastore search endpoint and apply session org_id filter to request.
internal/apigw/httpserver/endpoints_admin.go Add admin UI login/callback/status/logout endpoints and session creation.
internal/apigw/httpserver/api.go Extend APIGW apiv1 interface with search + admin UI OIDC methods.
internal/apigw/db/methods_identity_mapping.go Add DB search for identity mappings with allowed-sources filtering.
internal/apigw/db/methods_datastore.go Add DB search for documents with allowed-sources filtering.
internal/apigw/db/interfaces.go Extend DB interfaces with new search methods.
internal/apigw/apiv1/mock_stores_test.go Update in-memory stores to satisfy new search methods for tests.
internal/apigw/apiv1/handlers_verifier.go Minor variable naming cleanup in verifier handler.
internal/apigw/apiv1/handlers_vctm.go Minor refactor of cache-hit reply construction.
internal/apigw/apiv1/handlers_openid_federation.go Minor variable naming cleanup.
internal/apigw/apiv1/handlers_oidcrp.go Minor refactor to use intermediate reply variables.
internal/apigw/apiv1/handlers_oauth.go Minor reply variable cleanup; adjust issuer JWKS stripping logic naming.
internal/apigw/apiv1/handlers_misc.go Minor variable rename for health reply.
internal/apigw/apiv1/handlers_issuer.go Minor refactors + clarify issuer replies; add new datastore search API.
internal/apigw/apiv1/handlers_issuer_resolve_test.go Update mock store interface implementation for new search method.
internal/apigw/apiv1/handlers_identity_mapping.go Add identity mapping search API + Swagger annotations.
internal/apigw/apiv1/handlers_datastore.go Add datastore search API + Swagger annotations.
internal/apigw/apiv1/handlers_admin_ui.go Add admin OIDC login URL, callback exchange/verify, and logout URL builder.
internal/apigw/apiv1/client.go Initialize OIDC provider/config/verifier for admin UI when api_auth.oidc is enabled.
cmd/ui/main.go Remove legacy standalone UI service entrypoint.
cmd/mockas/main.go Remove legacy standalone MockAS service entrypoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/httphelpers/middleware_jwt.go
Comment thread pkg/httphelpers/middleware_jwt.go
Comment thread internal/apigw/httpserver/service.go Outdated
Comment thread internal/apigw/httpserver/endpoints_admin.go Outdated
Comment thread internal/apigw/apiv1/handlers_admin_ui.go Outdated
Comment thread internal/apigw/db/methods_datastore.go
Comment thread internal/apigw/db/methods_identity_mapping.go
Comment thread internal/apigw/apiv1/handlers_datastore.go
Comment thread internal/apigw/apiv1/handlers_identity_mapping.go
Comment thread pkg/httphelpers/middleware_jwt.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 66 out of 71 changed files in this pull request and generated 16 comments.

Comment thread internal/apigw/httpserver/service.go Outdated
Comment thread internal/apigw/httpserver/service.go Outdated
Comment thread internal/apigw/httpserver/endpoints_admin.go Outdated
Comment thread internal/apigw/httpserver/endpoints_admin.go Outdated
Comment thread internal/apigw/httpserver/endpoints_datastore.go
Comment thread pkg/httphelpers/middleware_jwt.go Outdated
Comment thread pkg/httphelpers/middleware_jwt.go
Comment thread internal/apigw/apiv1/handlers_identity_mapping.go
Comment thread internal/apigw/apiv1/handlers_datastore.go
Comment thread internal/apigw/apiv1/handlers_datastore.go
@masv3971 masv3971 requested a review from Copilot May 12, 2026 21:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
5.0% Duplication on New Code (required ≤ 3%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@masv3971 masv3971 merged commit aa9d3d8 into main May 13, 2026
5 of 6 checks passed
@masv3971 masv3971 deleted the masv/apigw/new_ui branch May 13, 2026 08:04
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.

2 participants