Skip to content
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

Change sso callback verification #1092

Merged
merged 4 commits into from
Jul 11, 2023
Merged

Change sso callback verification #1092

merged 4 commits into from
Jul 11, 2023

Conversation

gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented Jul 11, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 742932f

This pull request improves the SSO authentication flow by using the jwks-rsa package to verify JWT tokens from Auth0. It also updates the frontend and backend configurations to use the JWKS endpoint instead of the certificate file. Additionally, it modifies the NewActivityFilterOptions component to show all the enabled platforms for creating new activities.

🤖 Generated by Copilot at 742932f

We are the masters of the keys
We fetch them from the jwks endpoint
We verify the tokens with ease
We secure our ssoCallback descent

Why

How

🤖 Generated by Copilot at 742932f

  • Replace cert property with jwks property in auth0 configuration to dynamically fetch public keys for JWT verification (link, link)
  • Add jwks-rsa package as a dependency and use its client and helper function in ssoCallback API handler to verify JWT tokens using JWKS endpoint (link, link, link)
  • Change computedPlatformOptions in NewActivityFilterOptions component to use CrowdIntegrations.enabledConfigs instead of active value to display available platforms for creating new activities (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@gaspergrom gaspergrom added the Improvement Created by Linear-GitHub Sync label Jul 11, 2023
@gaspergrom gaspergrom self-assigned this Jul 11, 2023
backend/src/api/auth/ssoCallback.ts Show resolved Hide resolved
// .name,
// })));

const computedPlatformOptions = computed(() => CrowdIntegrations.enabledConfigs.map((i) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems like it doesn't belong here - maybe add a separate PR for this and explain what this is and add Joana as reviewer :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it was for debugging one issue, already removed

@gaspergrom gaspergrom merged commit 5aee96b into main Jul 11, 2023
7 checks passed
@gaspergrom gaspergrom deleted the feature/sso-callback branch July 11, 2023 10:39
@gaspergrom gaspergrom restored the feature/sso-callback branch July 11, 2023 10:48
gaspergrom added a commit that referenced this pull request Jul 11, 2023
gaspergrom added a commit that referenced this pull request Jul 11, 2023
gaspergrom added a commit that referenced this pull request Jul 11, 2023
gaspergrom added a commit that referenced this pull request Jul 11, 2023
gaspergrom added a commit that referenced this pull request Jul 11, 2023
This reverts commit 5aee96b.

(cherry picked from commit 334ada4)
gaspergrom added a commit that referenced this pull request Jul 11, 2023
(cherry picked from commit 5aee96b)
(cherry picked from commit b52fe6f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants