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

feat(schemas,core,console): add SAML application type #6766

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

darcyYe
Copy link
Contributor

@darcyYe darcyYe commented Nov 4, 2024

Summary

add SAML application type, with following changes:

  1. add SAML to enum application type
  2. can not create/update SAML apps with POST /applications and PATCH /applications/:id API, also filtered SAML apps from GET /applications(/:id)? APIs
  3. update the type in @logto/console as well to prevent build errors resulted by adding possible SAML value to application.type type.

Testing

Should be covered by integration tests.

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

Copy link

github-actions bot commented Nov 4, 2024

COMPARE TO master

Total Size Diff 📈 +7.98 KB

Diff by File
Name Diff
packages/console/src/assets/docs/guides/types.ts 📈 +29 Bytes
packages/console/src/components/ApplicationCreation/CreateForm/Footer/index.tsx 📈 +83 Bytes
packages/console/src/components/ApplicationCreation/CreateForm/index.tsx 📈 +66 Bytes
packages/console/src/components/ApplicationCreation/index.tsx 📈 +39 Bytes
packages/console/src/components/ApplicationIcon/index.tsx 📈 +47 Bytes
packages/console/src/components/AuditLogTable/index.tsx 📈 +44 Bytes
packages/console/src/components/EntitiesTransfer/components/EntityItem/index.tsx 📈 +39 Bytes
packages/console/src/components/Guide/index.tsx 📈 +6 Bytes
packages/console/src/components/ItemPreview/ApplicationPreview.tsx 📈 +6 Bytes
packages/console/src/consts/applications.ts 📈 +83 Bytes
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/GuideDrawer/index.tsx 📈 +6 Bytes
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/RefreshTokenSettings.tsx 📈 +39 Bytes
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Settings.tsx 📈 +6 Bytes
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx 📈 +32 Bytes
packages/console/src/pages/ApplicationDetails/GuideModal/index.tsx 📈 +6 Bytes
packages/console/src/pages/ApplicationDetails/components/AppGuide/index.tsx 📈 +6 Bytes
packages/console/src/pages/ApplicationDetails/index.tsx 📈 +39 Bytes
packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx 📈 +39 Bytes
packages/console/src/pages/Applications/components/TypeDescription/index.tsx 📈 +28 Bytes
packages/console/src/pages/Applications/hooks/use-application-data.ts 📈 +6 Bytes
packages/console/src/pages/EnterpriseSsoDetails/IdpInitiatedAuth/ConfigForm.tsx 📈 +814 Bytes
packages/console/src/pages/EnterpriseSsoDetails/IdpInitiatedAuth/index.tsx 📈 +39 Bytes
packages/console/src/pages/EnterpriseSsoDetails/IdpInitiatedAuth/utils.ts 📈 +38 Bytes
packages/console/src/pages/GetStarted/index.tsx 📈 +39 Bytes
packages/console/src/pages/OrganizationDetails/MachineToMachine/AddAppsToOrganization.tsx 📈 +39 Bytes
packages/console/src/pages/OrganizationDetails/MachineToMachine/index.tsx 📈 +572 Bytes
packages/console/src/pages/RoleDetails/RoleApplications/index.tsx 📈 +39 Bytes
packages/console/src/pages/Roles/components/AssignRoleModal/index.tsx 📈 +39 Bytes
packages/console/src/types/applications.ts 📈 +547 Bytes
packages/core/src/routes/applications/application.ts 📈 +967 Bytes
packages/core/src/routes/applications/types.ts 📈 +744 Bytes
packages/integration-tests/src/tests/api/application/application.secrets.test.ts 📈 +113 Bytes
packages/integration-tests/src/tests/api/application/application.test.ts 📈 +654 Bytes
packages/integration-tests/src/tests/console/applications/constants.ts 📈 +69 Bytes
packages/phrases/src/locales/en/errors/application.ts 📈 +88 Bytes
packages/schemas/alterations/next-1731900596-add-saml-application-type.ts 📈 +1.88 KB
packages/schemas/alterations/next-1731900631-add-saml-app-third-party-consistency-check.ts 📈 +569 Bytes
packages/schemas/src/utils/application.ts 📈 +93 Bytes
packages/schemas/tables/applications.sql 📈 +137 Bytes

@github-actions github-actions bot added feature Cool stuff size/s labels Nov 4, 2024
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch 3 times, most recently from b5bb11c to 81b6722 Compare November 7, 2024 08:59
@github-actions github-actions bot added size/m and removed size/s labels Nov 7, 2024
@darcyYe darcyYe changed the title feat(schemas): add isVisible to applications table feat(schemas): add SAML application type Nov 7, 2024
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch 2 times, most recently from 87d77d1 to d70989d Compare November 7, 2024 18:38
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch from f2bec19 to 18837d3 Compare November 8, 2024 04:43
@darcyYe darcyYe marked this pull request as ready for review November 8, 2024 06:18
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch from 18837d3 to 71193e0 Compare November 8, 2024 10:02
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch from 71193e0 to f604112 Compare November 18, 2024 03:31
packages/console/src/components/ApplicationIcon/index.tsx Outdated Show resolved Hide resolved
packages/core/src/routes/applications/application.ts Outdated Show resolved Hide resolved
Comment on lines +270 to +279
if (pendingUpdateApplication.type === ApplicationType.SAML) {
throw new RequestError('application.use_saml_app_api');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

How about saml_app_read_only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the offline discussions, we are now disabling the GET /applications(/:id)? API for SAML apps. When we need to modify the console, we will then allow the GET /applications/(:id)? API, and at that time, we can change it to saml_app_read_only.

@github-actions github-actions bot added size/l and removed size/m labels Nov 18, 2024
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch 2 times, most recently from fde0600 to d5c8533 Compare November 18, 2024 10:47
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch from d5c8533 to 8ede93b Compare November 18, 2024 11:01
@darcyYe darcyYe changed the title feat(schemas): add SAML application type feat(schemas,core,console): add SAML application type Nov 18, 2024
@darcyYe darcyYe force-pushed the yemq-log-10133-add-isVisible-to-applications-table branch from 8ede93b to 3a47e75 Compare November 20, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants