Skip to content

Use public key to validate access to the cloud templates#1619

Merged
MarceloRGonc merged 17 commits intomainfrom
mg/OPS-2983
Nov 18, 2025
Merged

Use public key to validate access to the cloud templates#1619
MarceloRGonc merged 17 commits intomainfrom
mg/OPS-2983

Conversation

@MarceloRGonc
Copy link
Copy Markdown
Contributor

@MarceloRGonc MarceloRGonc commented Nov 14, 2025

Fixes OPS-2983.

Used the test environment to test the approach

Also tested with a production cookie and the test environment.

After this merge, we need to merge this PR: https://github.com/openops-cloud/devops/pull/117 before the production deployment.

@linear
Copy link
Copy Markdown

linear Bot commented Nov 14, 2025

@MarceloRGonc MarceloRGonc changed the title WIP Use public key to validate access to the cloud templates Nov 14, 2025
@MarceloRGonc MarceloRGonc marked this pull request as ready for review November 14, 2025 17:44
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 replaces Frontegg client-based authentication with JWT public key verification for cloud template access. The change eliminates the need for client ID and API key configuration, simplifying the authentication flow by directly verifying JWT tokens using a public key.

Key Changes:

  • Replaced Frontegg IdentityClient with direct JWT verification using a public key
  • Removed deprecated Frontegg configuration flags (FRONTEGG_CLIENT_ID, FRONTEGG_APP_ID, FRONTEGG_API_KEY)
  • Refactored authentication logic from async API calls to synchronous JWT verification

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/shared/src/lib/flag/flag.ts Removed FRONTEGG_CLIENT_ID and FRONTEGG_APP_ID enum values
packages/server/shared/src/lib/system/system-prop.ts Replaced Frontegg client credentials with FRONTEGG_PUBLIC_KEY
packages/server/api/test/integration/cloud/cloud/cloud-auth.test.ts Updated tests to verify JWT-based authentication instead of Frontegg client validation
packages/server/api/src/app/user-info/user-info.module.ts Replaced Frontegg client initialization with public key configuration
packages/server/api/src/app/user-info/cloud-auth.ts Replaced async Frontegg validation with synchronous JWT verification
packages/server/api/src/app/helper/allow-all-origins-hook-handler.ts Extracted CORS hook handler into reusable module
packages/server/api/src/app/flow-template/cloud-template.controller.ts Updated to use JWT verification and extracted CORS handler
packages/server/api/src/app/flags/flag.service.ts Removed Frontegg client configuration flags from service
packages/react-ui/src/app/routes/cloud-connection/frontegg-setup.ts Simplified Frontegg initialization to use tenant resolver instead of client/app IDs
packages/react-ui/src/app/routes/cloud-connection/cloud-logout-page.tsx Updated to initialize Frontegg with only URL parameter
packages/react-ui/src/app/routes/cloud-connection/cloud-connection-page.tsx Updated to initialize Frontegg with only URL parameter

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

Comment thread packages/server/api/src/app/user-info/cloud-auth.ts Outdated
Comment thread packages/react-ui/src/app/routes/cloud-connection/frontegg-setup.ts Outdated
@sonarqubecloud
Copy link
Copy Markdown

@MarceloRGonc MarceloRGonc merged commit f41a93f into main Nov 18, 2025
22 checks passed
@MarceloRGonc MarceloRGonc deleted the mg/OPS-2983 branch November 18, 2025 09:31
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.

3 participants