Commit Graph

182 Commits

Author SHA1 Message Date
Deepak Prabhakara c703b9dfea
Terminus json model (#2612)
* WIP

* tweaks

* lint fix

* fixed roles casing

* cleanup
2024-05-13 23:49:44 +01:00
Deepak Prabhakara 5eb106e5c4
Rename saml fed and sso tracer (#2693)
* rename

* more rename

* samlFed -> idFed
2024-05-11 13:35:32 +01:00
Deepak Prabhakara 6bfb89a74e
Renaming routes for Identity Federation (#2618)
* WIP

* updated swagger file

* renamed routes

* renamed test folder

* separate section for Identity Federation

* sso-tracer -> sso-traces

* don't change ACS url for SAML federation

* SAMLFederation -> IdentityFederation

* SAMLFederation -> IdentityFederation

* keep api/federated-saml but move to api/identity-federation

* test old route as well

* fixed test

* fixed test

* retry tests 3 times

* updated deployment

* WIP create SAML Fed app

(cherry picked from commit 3d15b20a2d)

* Add Admin Portal SSO via SAML Fed

* Minor tweaks

* Use fixture and login using federated connection

* Cleanup SAML fed connection after test, disable failing assertion for now

* Remove only

* Use MockSAML endpoint from env

* Cleanup SSO connections mapped to SAML Fed

* OIDC Fed spec

* Try with higher timeout

* Mutate on page load

* Put back assertion

* Remove assertion and mutate for now

* SAML Fed App + 2 SAML Providers

* Take in optional tenant/product for fixture method

* SAML Fed + 2 OIDC providers

* SAML Fed test cases for single provider

* Tweak title

* Replace swr with fetch

* Remove only

* Bump up timeout to 100s

* Add more test cases for OIDC Fed

* Refactor fetch with hooks

* locale tweaks

* Also try with the other provider

* Fixture support SAML add via raw metadata

* Add second SAML connection using raw metadata

* Revert "Add second SAML connection using raw metadata"

* Revert "Fixture support SAML add via raw metadata"

---------

Co-authored-by: ukrocks007 <ukrocks.mehta@gmail.com>
Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-05-10 11:41:23 +01:00
Deepak Prabhakara def9239d1a
cleanup of preLoadedConfig (#2689) 2024-05-09 20:05:25 +01:00
Deepak Prabhakara 59a80772e0
use lib/api defaultHandler (#2640)
* use lib/api defaultHandler

* cleanup
2024-05-07 12:49:32 +01:00
Deepak Prabhakara 668a1ba499
Stats for Identity Federation Apps (#2671)
rename
2024-05-06 00:13:25 +01:00
Utkarsh Mehta b98ccc68bc
feat: Stats route changes to return count of setup link & saml federations apps (#2627)
* feat: stats route updates to respond count of setup link & saml federations apps

* chore: Remove unused getCountByProductService method from SetupLinkController

* feat: Add validation for development mode connection limits

* chore: Update import path for validateDevelopmentModeLimits in directory-sync and sso-connection APIs

* refactor: update development mode limits validation in directory-sync and connections APIs

* feat: Update development mode limits validation in directory-sync and connections APIs
2024-04-29 14:40:01 +01:00
Deepak Prabhakara 663eca577f
fixed wrong response in dsync events (#2619) 2024-04-25 17:40:30 +01:00
Utkarsh Mehta 50aa00aec2
feat: Add deleteTracesByProduct method to AdminController (#2617)
* feat: Add deleteTracesByProduct method to AdminController

This commit adds a new method, deleteTracesByProduct, to the AdminController class in the npm/src/controller/admin.ts file. This method allows for the deletion of traces by product. It uses the getTracesByProduct method to retrieve traces in batches of 50 and deletes them using the tracerStore. The method is also implemented in the pages/api/v1/sso-traces/product.ts file as a DELETE handler.

* chore: Add DELETE handler for product API endpoint in product.ts file

* chore: Add DELETE handler for product API endpoint in product.ts file

* feat: Add countByProduct method to SSOTracer

This commit adds a new method, countByProduct, to the SSOTracer class in the npm/src/sso-tracer/index.ts file. This method allows for counting the number of traces by product. It uses the tracerStore's getCount method to retrieve the count based on the product name. The method is also implemented in the pages/api/v1/sso-traces/product/count.ts file as a GET handler.
2024-04-25 14:59:39 +01:00
Aswin V fde514123b
Pagination View fixes for DSync User/Group Lists (#2572)
* Handle pagination query params correctly and set response header for pageToken

* Support for pageToken

* Revert tokenmap change for and add comment

* Exclude `log_webhook_events` checkbox while creating

* `pageToken` handling for WebhookLogs

* `pageToken` handling in API route

* Fix unit tests

* Fix test

* Update tokenmap using effect
2024-04-15 11:01:32 +01:00
Deepak Prabhakara 742f9b0676
Cleanup duplicate locale and components (#2493)
* Tweak sdk style import order

* WIP

* Override SDK styles

* Cleanup and pass props to component

* Cleanup setup link related code as it's handled via setup-link instructions

* Cleanup locale

* Fix e2e tests

* Fix selectors in e2e test

* Add select dropdown style override

* Use component from SDK

* Cleanup locale

* Use Edit DSync from SDK

* Remove default webhook props from setup token page

* Ability to set default webhook secret

* Tweak header text

* Revert sdk style import order - app styles should be latest

* Override default SDK focus style

* Update locale

* Use Edit component from SDK

* Allow patching oidcMetadata fields

* Tweak return data format

* Route change on edit success and other fixes

* Fix button styles

* Fix data access from API

* Fix focus styling for error btn

* Sync lock file

* Cleanup unused files

* Set `displayInfo` to false for setup link and fix exclude fields for SAML under setup link

* Allow forceAuthn in setup links

* Only update forceAuthn if its a boolean value coming from body

* Cleanup and hideSave only for setup link

* Update UI SDK

* Cleanup locales

* Fix failing e2e

* cleaned up dups

* cleaned up dups

* cleanup of components

* more cleanup

* cleanup

* locale cleanup

* dup cleanup

* Reuse styles

* Set min value for expiry field to 1

* Validate expiry before using

* Update SDK and set idpMetadata display to true

* cleaned up unused code, added formik as dep

* clean unused locale strings

* cleaned up ErrorMessage component

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-28 13:21:59 +00:00
Aswin V 67f111711a
Use UI SDK (#2464)
* Tweak sdk style import order

* WIP

* Override SDK styles

* Cleanup and pass props to component

* Cleanup setup link related code as it's handled via setup-link instructions

* Cleanup locale

* Fix e2e tests

* Fix selectors in e2e test

* Add select dropdown style override

* Use component from SDK

* Cleanup locale

* Use Edit DSync from SDK

* Remove default webhook props from setup token page

* Ability to set default webhook secret

* Tweak header text

* Revert sdk style import order - app styles should be latest

* Override default SDK focus style

* Update locale

* Use Edit component from SDK

* Allow patching oidcMetadata fields

* Tweak return data format

* Route change on edit success and other fixes

* Fix button styles

* Fix data access from API

* Fix focus styling for error btn

* Sync lock file

* Cleanup unused files

* Set `displayInfo` to false for setup link and fix exclude fields for SAML under setup link

* Allow forceAuthn in setup links

* Only update forceAuthn if its a boolean value coming from body

* Cleanup and hideSave only for setup link

* Update UI SDK

* Cleanup locales

* Fix failing e2e

* Reuse styles

* Set min value for expiry field to 1

* Validate expiry before using

* Update SDK and set idpMetadata display to true

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-03-28 01:05:55 +00:00
Deepak Prabhakara ece4a4fca6
Verify client id and secret in OIDC Federation pkce flow (#2492)
* verify client id and secret for fed id

* support client_secret_basic

* tweaked edit saml fed app to hide and show client secret
2024-03-26 21:55:24 +00:00
Kiran K e1602858f4
Cron jobs support (#2430)
* Use random id instead of os.hostname

* Remove unused import

* add eventLockKey

* add eventLockKey

* Check for expiry when acquiring lock (wip)

* Add cron interval config

* Add timeout functionality to process events

* Fix index value overwrite

* Fix bulk delete

* Remove console.log

* directory sync add cron

* Refactor event processing and add cron scheduling

* Remove await

* Refactor directory sync worker

* Remove unused import statement

* Fix lockKey initialization in EventProcessor constructor

* cleanup

* take a callback for DSync as NPM option (WIP)

* Fix the unit test

* Fix the webhooks test

* Remove unused import statement

* Fix type

* fixed cron, cleaned up x-access-token. TODO: Fix webhooks batch cron

* grouped dsync index names in one place

* ensure the cron ticks regularly, use setInterval instead of setTimeout

* do the renewal inside EventLock

* lint fix

* improved locking and added check for lock in Google dsync cron

* locking per cron

* refactor

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-03-22 11:49:23 +00:00
Utkarsh Mehta 6806d7893d
New API for getStats (#2480)
* Refactor API handler to support POST method in stats endpoint

* Refactor API handler to validate products in stats endpoint

* Refactor API handler to improve counting logic in stats endpoint

* Refactor API handlers for stats endpoint
2024-03-22 11:49:12 +00:00
Kiran K f7cf763cbc
Request handler middleware for API routes (#2403)
* Add error class and update API handlers

* Refactor admin API handlers

* Fix error constructor parameter order

* Add defaultHandler to API endpoints

* Keep the handler name

* Fix error status code in defaultHandler and ApiError

* Fix the status code

* Improve conditional logic

* Small tweak

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-14 14:51:16 +00:00
Aswin V 6a6438d73b
[Dsync setup link api response] Add google_authorization_url in response (#2437)
Add missing item in object response
2024-03-13 09:39:29 +00:00
Aswin V 73b9d8a65d
Google SCIM Authorize tweaks (#2421)
* Update google SCIM authz options

* Sync lock file

* Remove the old option support, should reflect in typings

* Fix failing test

* Sync lock file

* Include google_authorization_url in directory response

* Update internal-ui to use url from directory config

* Update component usage in Jackson UI

* Cleanup example env

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-03-12 19:22:11 +00:00
Kiran K f7b03a4666
Add API endpoint for retrieving group members (#2402)
* Add API endpoints for retrieving group members

* Format

* Fix the type
2024-03-07 17:40:21 +00:00
Aswin V 1188dd6396
Pagination fixes (#2347)
* `offset` -> `pageOffset`, `limit`-> `pageLimit`

* Be backward compatible in API

* Cleanup types and handle pagination qs

* Cleanup unused code

* Import type

* Cleanup and fix lint error

* Align params for sso-tracer

* Move parsing to a common util function

* pageLimit shouldn't be optional

* Cap pageLimit to max value, split the boolean

* Revert typings and assert non null

* Refactor var name

* Use util function to normalize pagination params across getAll and getByIndex

* Normalize offset/limit for dynamo/mongo

* Update query params in `FederatedSAMLApps`

* Cap to max limit if passed limit is 0

* Sync lock file

* Add a 3rd record and supply opts.pageLimit

* Normalize offset/limit for mem/redis

* Save the 3rd record in the store

* Fix getAll tests

* Give precedence to standard params over legacy

* Use util function

* Parse using util function

* Refactor

* Standardise pagination for `api/v1/dsync/events`

* Standardise pagination for api/admin/connections

* Standardise pagination for api/admin/directory-sync

* Standardise pagination for `api/v1/dsync/groups`

* Standardise pagination for `v1/dsync/users`, `v1/dsync/product`

* Standardise pagination in fetchByProduct APIs

* Update swagger for groups

* Fix pagination params definition, add the params for users api

* More swagger updates

* Swagger spec update for dsync events

* Add pagination params to apis fetching by product

* Update qs in internal-ui

* Remove type assertion

* [Swagger WIP] Fix response format for paginated APIs

* Add dsync events to swagger spec

* Fix swagger spec for sso tracer

* Fix swagger spec for federated-saml apps of a product

* Update pageLimit to 50

* Use pageLimit value from internal-ui

* Update UI SDK

* Cleanup local pagination component

* Update swagger version

* Remove unused keys from locale

* Fix tag for trace api spec

* Fix param name for swagger

* Fix swagger tag for trace

* updated package-lock

* updated package-lock

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-03-06 20:14:14 +00:00
Kiran K 06c7d38b37
Hide the connection info from the setup link UI (#2383)
* For dsync

* For sso

* Refactor EditConnection component to hide certain fields in setup view

* Refactor EditConnection

* Refactor directory-sync and sso-connection API handlers

* Fix lint issue

* wip

* Fix updates

* Fix authorization check and error message

* Optimize

* Sync lock files

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-03-06 20:03:50 +00:00
Deepak Prabhakara a473b360ef
New OIDC fed (#2336)
* add WellKnownURLs

* Fix translation keys

* Update dependencies and add IdP Configuration

* Update common.json with new translations

* wip

* Update @boxyhq/internal-ui version to 0.0.5

* add internal ui folder

* Fix imports and build

* Refactor internal-ui package structure

* wip shared UI

* Fix the build

* WIP

* Add new components and hooks for directory sync

* WIP

* lint fix

* updated swr

* WIP

* users

* Refactor shared components and fix API endpoints***

***Update directory user page and add new federated SAML app

* Fix lint

* wip

* Add new files and update existing files

* Refactor DirectoryGroups and DirectoryInfo components

* Update localization strings for directory UI

* Update Google Auth URL description in common.json

* Refactor directory tab and add delete functionality to webhook logs

* IdP selection screen changes

* Delete unused files and update dependencies

* Fix column declaration

* Add internal-ui/dist to .gitignore

* Update page limit and add new dependencies

* wip

* Refactor directory search in user API endpoint

* wip

* Refactor directory retrieval logic in user and group API handlers

* Add API endpoints for retrieving webhook events

* check app's redirectUrl, TODO: save app info into session to read later

* Add query parameters to API URLs in DirectoryGroups

* working saml login via IdP select. TODO: oidc login via IdP select and saml + oidc login with 1 connection

* oidc IdP working with selection

* working oidc fed -> saml flow

* Add Google authorization status badge and handle pagination in FederatedSAMLApps

* Add router prop to AppsList component and update page header titles

* UI changes

* updated peer-deps

* Add new files and export functions

* Remove unused router prop

* Add PencilIcon to FederatedSAMLApps

* updated federated app creation page

* updated federated app edit page

* Refactor FederatedSAMLApps and NewFederatedSAMLApp components

* lint fix

* lint fix

* updated package-lock

* add jose npm to dev dep

* added missing strings

* added missing strings

* locale strings fix

* locale strings cleanup

* tweaks to icon imports

* replaced textarea with list of inputs for Federated Apps redirect url

* update package-lock

* Add prepublish step

* Build and publish npm and internal ui

* Refactor install step

* Run npm install (for local) inside internal ui automatically using prepare

* Remove eslint setup for internal-ui

* updated package-lock

* Add `--legacy-peer-deps` to prevent installing peer dependencies

* Fix the types import path

* wip

* wip

* Fix the types

* Format

* Update package-lock

* Cleanup

* Try adding jose library version 5.2.2

* allow selective subdomain globbing

* removed duplicate jose lib

* updated package-lock

* updated swagger doc

* SAML Federation -> Identity Federation

* fixed locale strings

* turn off autocomplete for tags input

---------

Co-authored-by: Kiran K <mailtokirankk@gmail.com>
Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-05 16:57:02 +00:00
Kiran K a6ef0ddddb
Internal UI : Setup Link & SSO Tracer (#2354)
* add WellKnownURLs

* Fix translation keys

* Update dependencies and add IdP Configuration

* Update common.json with new translations

* wip

* Update @boxyhq/internal-ui version to 0.0.5

* add internal ui folder

* Fix imports and build

* Refactor internal-ui package structure

* wip shared UI

* Fix the build

* Add new components and hooks for directory sync

* lint fix

* updated swr

* users

* Refactor shared components and fix API endpoints***

***Update directory user page and add new federated SAML app

* Fix lint

* wip

* Add new files and update existing files

* Refactor DirectoryGroups and DirectoryInfo components

* Update localization strings for directory UI

* Update Google Auth URL description in common.json

* Refactor directory tab and add delete functionality to webhook logs

* Delete unused files and update dependencies

* Fix column declaration

* Add internal-ui/dist to .gitignore

* Update page limit and add new dependencies

* wip

* Refactor directory search in user API endpoint

* wip

* Refactor directory retrieval logic in user and group API handlers

* Add API endpoints for retrieving webhook events

* Add query parameters to API URLs in DirectoryGroups

* Add Google authorization status badge and handle pagination in FederatedSAMLApps

* Add router prop to AppsList component and update page header titles

* UI changes

* Add new files and export functions

* Remove unused router prop

* Add PencilIcon to FederatedSAMLApps

* Refactor FederatedSAMLApps and NewFederatedSAMLApp components

* lint fix

* add jose npm to dev dep

* added missing strings

* locale strings fix

* locale strings cleanup

* update package-lock

* Add prepublish step

* Build and publish npm and internal ui

* Refactor install step

* Run npm install (for local) inside internal ui automatically using prepare

* Remove eslint setup for internal-ui

* wip

* Add `--legacy-peer-deps` to prevent installing peer dependencies

* wip

* Fix the types import path

* wip

* wip

* Fix the types

* Format

* Update package-lock

* Cleanup

* Try adding jose library version 5.2.2

* Add new dependencies for @next/swc package

* Fix translation keys and import types

* Update SSOTracers component and common.json localization

* COPY internal-ui before npm install

* COPY internal-ui in builder stage

* fixed sort order for jose

* wip

* wip setuplink

* Add delete link

* Add exclusion for node_modules in files.exclude

* Add error handling and additional functionality to SetupLinks component

* Refactor SetupLinks component and add missing translations

* Add missing translations and update setup link messages

* Remove comment

* update localization strings

* Remove unused key

* Update SSOTracerInfo component title

* Refactor ConfirmationModal component button styling

* Update package.json and ConfirmationModal.tsx

* Update dep

* Refactor setup links API and UI to use query parameters for pagination

* Refactor deleteLink API endpoint and SetupLinks component

* Update package.json paths

* Update dep

* Refactor setup link forms and add new fields

* Update dep

* Update import paths and add new setup links tests

* wip

* Refactor CreateDirectory and DirectoryInfo components

* Add new fields to setup link and directory sync APIs

* Cleanup

* Update package-lock

* Fix link regeneration

* updated package-lock

* Fix and add e2e tests

* Update API documentation with new parameters for setup link creation and update

* Revert

* Update postcss.config.js and SSOForm.tsx

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-01 17:00:38 +00:00
Kiran K 952bfe360f
Display the Google dsync auth button on Setup Link (#2361)
* Display the Google auth button

* Delete DirectoryInfo and DirectoryTab components
2024-02-29 11:45:37 +00:00
Deepak Prabhakara bb7b856191
run planetscale test on local mysql db (#2353)
* run planetscale test on local mysql db

* run planetscale test on local mysql db

* run planetscale migration before test, ignore eslint warnings
2024-02-28 00:20:01 +00:00
Kiran K 734de64c4d
Add `@boxyhq/internal-ui` (#2305)
* add WellKnownURLs

* Fix translation keys

* Update dependencies and add IdP Configuration

* Update common.json with new translations

* wip

* Update @boxyhq/internal-ui version to 0.0.5

* add internal ui folder

* Fix imports and build

* Refactor internal-ui package structure

* wip shared UI

* Fix the build

* Add new components and hooks for directory sync

* lint fix

* updated swr

* users

* Refactor shared components and fix API endpoints***

***Update directory user page and add new federated SAML app

* Fix lint

* wip

* Add new files and update existing files

* Refactor DirectoryGroups and DirectoryInfo components

* Update localization strings for directory UI

* Update Google Auth URL description in common.json

* Refactor directory tab and add delete functionality to webhook logs

* Delete unused files and update dependencies

* Fix column declaration

* Add internal-ui/dist to .gitignore

* Update page limit and add new dependencies

* wip

* Refactor directory search in user API endpoint

* wip

* Refactor directory retrieval logic in user and group API handlers

* Add API endpoints for retrieving webhook events

* Add query parameters to API URLs in DirectoryGroups

* Add Google authorization status badge and handle pagination in FederatedSAMLApps

* Add router prop to AppsList component and update page header titles

* UI changes

* Add new files and export functions

* Remove unused router prop

* Add PencilIcon to FederatedSAMLApps

* Refactor FederatedSAMLApps and NewFederatedSAMLApp components

* lint fix

* add jose npm to dev dep

* added missing strings

* locale strings fix

* locale strings cleanup

* update package-lock

* Add prepublish step

* Build and publish npm and internal ui

* Refactor install step

* Run npm install (for local) inside internal ui automatically using prepare

* Remove eslint setup for internal-ui

* Add `--legacy-peer-deps` to prevent installing peer dependencies

* Fix the types import path

* wip

* wip

* Fix the types

* Format

* Update package-lock

* Cleanup

* Try adding jose library version 5.2.2

* COPY internal-ui before npm install

* COPY internal-ui in builder stage

* fixed sort order for jose

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
Kiran K 99cfb1b732
Add API endpoints for retrieving webhook events (#2331)
* Refactor directory search in user API endpoint

* Refactor directory retrieval logic in user and group API handlers

* Add API endpoints for retrieving webhook events

* Add DELETE method to handle webhook event deletion
2024-02-22 20:12:58 +00:00
Aswin V b54463e45a
Switch to UI SDK for SSO (#2299)
* WIP Connection List SDK component usage

* Cleanup

* Align response data format with v1

* Cleanup and auto route to new connection creation for setup link

* Minor formatting

* Switch to SDK component for DSync list

* Fix query param in API

* Disable pagination for setup link view

* Update SDK

* [e2e test] Locate by label

* Sync lock file

* Disable pagination for settings view also

* cleanup

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-02-22 11:26:47 +05:30
Deepak Prabhakara 2e6fa98888 locale strings cleanup 2024-02-21 18:32:09 +00:00
Deepak Prabhakara 150c049c10 locale strings fix 2024-02-21 18:04:24 +00:00
Deepak Prabhakara 776b015f2c
Fix for adminPortalSSODefaults to be read correctly at build time (#2318)
Fixes https://github.com/boxyhq/jackson/issues/2317
2024-02-16 20:40:24 +00:00
Deepak Prabhakara 264b724ad8
Table component (#2288)
* tweaks to align with SaaS app

* tweaks

* tweaked table to avoid overflow of long text (long name still messes the layout)

* wrap around for long words

* aligned SSO Tracer with SaaS app

* aligned SSO Tracer with SaaS app

* added Table component

* moved Traces to shared Table component

* moved FedApps to shared Table component

* moved SetupLinks to shared Table component

* fixed setup links pagination

* format fix

* moved Retraced projects to shared Table component

* fixed check to avoid empty div and span
2024-02-15 11:32:31 +00:00
Deepak Prabhakara 5c79b94906
tweaks to align with SaaS app (#2287)
* tweaks to align with SaaS app

* tweaks

* tweaked table to avoid overflow of long text (long name still messes the layout)

* wrap around for long words

* aligned SSO Tracer with SaaS app

* aligned SSO Tracer with SaaS app

---------

Co-authored-by: Kiran K <kiran@boxyhq.com>
2024-02-12 10:23:12 +05:30
Deepak Prabhakara 6f66742cf4
fixed setup links pagination (#2289) 2024-02-12 10:06:19 +05:30
Kiran K 1a9af89110
Add `sortOrder` to sso connection to control the order of connections (#2231)
* Control the order of connections in the IdP selection list

* Remove unused import statement

* Fix the sortOrder

* Type fix

* Fix TS error

* Fix build

* Update API version and add sortOrder parameter

* Update swagger specs

* Update swagger

* Add tests

* Add `sortOrder` to GET spec

* Refactor connection retrieval logic and add sorting option

* Fix connection sorting issue

* Fix connection sorting issue

* Update the validation

* Fix the tests

* Filter out connections that are not enabled

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-02-08 15:14:14 +00:00
Deepak Prabhakara 35c7052cd9
make ory optional, add default for samlAudience, don't force entityID… (#2250)
make ory optional, add default for samlAudience, don't force entityID to be a url
2024-02-02 23:03:55 +00:00
Aswin V c8d7d1418d
OIDC tracing improvements (#2239)
* `error_description` is optional for OAuth error response

* Capture OPError attributes

* Trace the original `Error.message`

* Expand trace `context` members to include OIDC error params

* Attach token response to trace context

* Rename context param to be specific to oidc

* Display additional context specific to OIDC SSO

* Add translations

* Better grouping of the oidc errors and be more specific with title

* Fix table title
2024-02-01 17:02:20 +05:30
Kiran K 6901783d3b
Read entityId prefix value from env (#2240)
Read entityId value from env
2024-02-01 11:25:48 +00:00
Kiran K 7103d61967
Add support for associating multiple tenants in SAML federated apps (#2214)
* Add support for associating multiple tenants in SAML federated apps

* Add tenants input field to edit and new pages

* Refactor

* Add support for filtering connections by multiple tenants

* Update global CSS styles for react-tagsinput

* Update border-radius for react-tagsinput

* Refactor CSS styles for react-tagsinput

* Update the tenants array

* Cleanup tenants assignment
2024-01-31 09:11:46 +00:00
Deepak Prabhakara bf480486da
Admin stats (#2215)
* added stats api to get counts of sso and dsync connections

* tweak

* lint fix
2024-01-29 23:50:13 +00:00
Aswin V b81e9218f1
Trace OIDC response path (#2179)
* [typings] OIDC provider clientId/secret is non optional

* try/catch and trace the errors ...

* Fix error message inside `resolveConnection`

* Default for error_description, trace error should be either error or fallback to description

* Attach traceId to OAuth error response

* Add more context to the traces

* [fed-saml] Add relayState to trace context

* Tenant/product can be traced from session.request in case connection is not resolved

* Minor change

* [npm] Rename `saml-tracer` -> `sso-tracer`

* [Admin UI/API] Rename `saml-tracer` -> `sso-tracer`

* [v1 API] Rename `saml-traces` -> `sso-traces` with alias to old path

* Fix assertion type display with fallback to `-`

* Update swagger spec

* Scroll in case text overflows
2024-01-23 22:35:17 +00:00
Kiran K a8556e8020
SAML Federation support OIDC connections (#2178)
* rename saml-handler -> sso-handler

* samlHandler -> ssoHandler

* add oidc support

* Refactor OAuth and SSO handler code

* Refactor SAMLHandler to SSOHandler

* Refactor

* Sync lock

* Fix console.log

* Refactor

* Fix typo

* remove scope filter

* Typo fix

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-01-19 15:59:31 +00:00
Aswin V c0bd0b5eb0
Tweak branding logo rendering (#2171)
* Remove width/height and set max-height

* Sync lock file

* Increase max-height for idp select

* Tweak branding_logo_url_alt

* Minor text tweak

* text tweak

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-01-18 21:24:52 +00:00
Aswin V 4194d2dad3
Rfc9207 support for OIDC connections (#2135)
* Align expected type with oidc

* Pass through all params to openid-client

* Remove error handling, will be handled by openid-client

* Use `CallbackParamsType` from openid-implementation, cleanup previous type

* Sync lock files

* Fix test type

* Pass `checks.state`

* Remove obsolete type

* Forward `error/error_description` from OIDC provider response

* Fix tests

* Sync lock file
2024-01-09 22:44:26 +05:30
Kiran K 4a719ee911
Make Setup Link Expiry Time Configurable (#2112)
* Make Setup Link Expiry Time Configurable

* Update setup link expiry variable

* Fixes

* Add tests
2024-01-03 12:30:13 +00:00
Kiran K 70abbc8ee4
Support product branding (EE) (#2110)
* Make entity ID read-only

* Update swagger.json

* Add validation to check if an app with the same tenant and product already exists

* Fix error message for duplicate app creation

* Update API handler to use PATCH method instead of POST

* Add product branding support

* Refactor product controller

* Refactor branding and product fetching logic

* Update setup link branding

* Revert

* Fix ProductConfig interface
2024-01-02 15:00:41 +00:00
Kiran K fde4e59fa6
Add missing translations (#2089)
* Add missing translations

* Add eslint-plugin-i18next plugin

* Add missing translation

* Update translations

* Update ESLint rules and improve UI text

* Update WellKnownURLs locales

* Add server-side translations in SetupLinkIndexPage
2023-12-27 12:21:53 +00:00
Deepak Prabhakara 1525035092
updated daisyui (#2088)
* updated daisyui

* Update color conversion function

* Update color conversion function

---------

Co-authored-by: Kiran K <mailtokirankk@gmail.com>
2023-12-26 12:07:34 +00:00
Aswin V 8189d50cd0
Tweak well known tab structure (#2049)
* IdP tab is now the first one

* IdP-config should be the default selected

* Fix styling for link

* Add OpenID SP route, tweak well known list to include the same
2023-12-13 18:23:37 +00:00
Kiran K 260597e2e7
Replace apiKey query params with Authorization header for cron endpoints (#1979)
Use Authorization header auth for cron endpoints
2023-11-27 15:00:45 +00:00