Skip to content

feat(oidc-server): implement mock OIDC provider #2687

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rossnelson
Copy link
Collaborator

Description & motivation 💭

Currently, developers working on temporal/ui cannot test the SSO flow locally
without connecting to an external identity provider. This limits the ability to
iterate quickly on authentication-related UI features and introduces unnecessary
friction in development and QA.

Screenshots (if applicable) 📸

TBD

Design Considerations 🎨

TBD

Testing 🧪

TBD

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

TBD

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2025 4:08am

@rossnelson rossnelson changed the title feat(oidc-server): implement OIDC provider server with CLI script and unit tests feat(oidc-server): implement mock OIDC provider Apr 21, 2025
- Added a new Vite plugin `vite-plugin-oidc-server` to manage the lifecycle
  of the OIDC server during development.
- Replaced the old OIDC server implementation with a modularized version
  under `utilities/oidc-server`.
- Updated `vite.config.ts` to include the new OIDC server plugin.
- Enhanced `vite-plugin-temporal-server` and `vite-plugin-ui-server` to
  support the `with-auth` mode.
- Added new dependencies: `desm`, `helmet`, `lodash`, and `nanoid`.
- Removed deprecated OIDC server scripts and tests.
- Updated `development.yaml` to use the new OIDC server configuration.
- Introduced `getConfig` function for dynamic OIDC server configuration.
- Added `ValidEnv` type and updated `createUIServer` to support `with-auth`.
- Updated `development.yaml` and added `with-auth.yaml` for auth configs.
- Removed redundant URL validation in `auth.go`.
- Added `ejs` dependency and updated `pnpm-lock.yaml`.
- Refactored OIDC server initialization and removed unused code.
- Introduced `start-oidc-server.ts` script for standalone OIDC server.

These changes improve modularity, simplify configuration, and enhance
auth-related functionality.
}
// if u.Host != "" && u.Host != c.Request().Host {
// return "", fmt.Errorf("invalid returnUrl: does not match expected host %s", c.Request().Host)
// }
Copy link
Collaborator Author

@rossnelson rossnelson Apr 25, 2025

Choose a reason for hiding this comment

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

This is probably a controversial change. But we need to be able to redirect from port 3000 (UI) -> 8081 (ui-server) -> 8889 (oidc-server) -> 3000 (UI).

It's probably best to wrap this in a config option and allow this to be bypassed rather than simply remove it.

- Refactored OIDC server plugin to use a centralized `log` function
  with colored output for better readability.
- Updated UI server plugin to display Temporal UI server port logs.
- Enhanced OIDC server views with Tailwind CSS and Google Fonts for
  modern styling.
- Improved interaction and login views with responsive and accessible
  design.
- Removed unnecessary `form-action` directive in OIDC server's CSP
  configuration to allow form submissions.
- Made `ui-server` process quiet during startup for cleaner logs.
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.

1 participant