Skip to content

Reintroduce SAML SSO#4938

Merged
zomars merged 33 commits intocalcom:mainfrom
devkiran:feat/saml-sso
Oct 18, 2022
Merged

Reintroduce SAML SSO#4938
zomars merged 33 commits intocalcom:mainfrom
devkiran:feat/saml-sso

Conversation

@devkiran
Copy link
Copy Markdown
Contributor

@devkiran devkiran commented Oct 10, 2022

What does this PR do?

Fixes #4880

Environment: Staging(main branch) / Production

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 10, 2022

@devkiran is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Oct 10, 2022

Socket Security Report

👍 No new dependency issues detected in pull request

Socket.dev scan summary
Issue Status
Did you mean? ✅ no new possible package typos
Install scripts ✅ no new install scripts
Telemetry ✅ no new telemetry
Troll package ✅ no new troll packages
Malware ✅ no new malware
Native code ✅ no new native modules
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@2.4.2

Powered by socket.dev

@devkiran devkiran changed the title Feat/saml sso Reintroduce SAML SSO Oct 10, 2022
@devkiran devkiran marked this pull request as ready for review October 10, 2022 17:37
@devkiran devkiran mentioned this pull request Oct 10, 2022
5 tasks
@PeerRich PeerRich enabled auto-merge (squash) October 10, 2022 20:37
@zomars zomars requested review from a team and deepakprabhakara October 10, 2022 23:32
auto-merge was automatically disabled October 14, 2022 10:05

Head branch was pushed to by a user without write access

@devkiran
Copy link
Copy Markdown
Contributor Author

@deepakprabhakara @PeerRich

Self-hosted

Added the "Single Sign-On" menu under the tab Settings > Security. The application hides this menu on the hosted version of the Cal. Since this is an enterprise feature, CALCOM_LICENSE_KEY is required to access this feature, and only the SAML admin (SAML_ADMINS) can access the page. A message instructing the user to set the values will be displayed if the SAML_DATABASE_URL or SAML_ADMINS is empty.

Hosted

Added the "Single Sign-On" menu under each team. I have considered the following cases during the implementation into the team. Please let me know if I have covered every case. This menu is only visible on the hosted version and will redirect to /404 if the user tries accessing it on the self-hosted version. At the moment, only a user with a PRO plan can access the page, and the member should either ADMIN or OWNER of the team.

};
};

export const canAccess = async (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This method has been altered to send back appropriate messages in each case. This message will be displayed on the UI when TRPC throws an error https://github.com/calcom/cal.com/pull/4938/files#diff-015067416d87bbb0a3405527c31019007de06a40b377883a98b6e32623c2d0e5R25

@PeerRich
Copy link
Copy Markdown
Member

hey @devkiran, thank you for the update. would you mind fixing the last merge conflict and we'll then review & merge 🙏

# Conflicts:
#	apps/web/pages/settings/security/sso.tsx
#	apps/web/pages/settings/teams/[id]/sso.tsx
#	apps/web/pages/v2/auth/login.tsx
#	apps/web/public/static/locales/en/common.json
#	yarn.lock
Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Simplified api endpoints and made some file organization fixes. Code LGTM testing on staging.

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 18, 2022

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

Name Status Preview Updated
cal ✅ Ready (Inspect) Visit Preview Oct 18, 2022 at 8:36PM (UTC)

@devkiran
Copy link
Copy Markdown
Contributor Author

@zomars thanks for helping me out with the merge and conflict.

@devkiran devkiran deleted the feat/saml-sso branch October 19, 2022 04:00
haffla pushed a commit to tourlane/cal.com that referenced this pull request Nov 22, 2022
* wip reintroduce SAML SSO

* Fix the imports

* wip

* Some tweaks

* Fix the type

* Reduce the textarea height

* Cleanup

* Fix the access issues

* Make the SAML SSO active on the sidebar

* Add SP's instructions

* Remove the console.log

* Add the condition to check SAML SSO is enabled

* Replace SAML SSO with Single Sign-On

* Update to SAML feature

* Upgrade the @boxyhq/saml-jackson

* Fix the SAML part and other cleanup

* Tweaks to SAML SSO setup

* Fix the type

* Fix the import path

* Remove samlLoginUrl

* Import fixes

* Simplifies endpoints

Co-authored-by: zomars <zomars@me.com>
haffla pushed a commit to tourlane/cal.com that referenced this pull request Nov 22, 2022
* wip reintroduce SAML SSO

* Fix the imports

* wip

* Some tweaks

* Fix the type

* Reduce the textarea height

* Cleanup

* Fix the access issues

* Make the SAML SSO active on the sidebar

* Add SP's instructions

* Remove the console.log

* Add the condition to check SAML SSO is enabled

* Replace SAML SSO with Single Sign-On

* Update to SAML feature

* Upgrade the @boxyhq/saml-jackson

* Fix the SAML part and other cleanup

* Tweaks to SAML SSO setup

* Fix the type

* Fix the import path

* Remove samlLoginUrl

* Import fixes

* Simplifies endpoints

Co-authored-by: zomars <zomars@me.com>
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.

reintroduce SAML SSO

3 participants