Commit Graph

56 Commits

Author SHA1 Message Date
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 59a80772e0
use lib/api defaultHandler (#2640)
* use lib/api defaultHandler

* cleanup
2024-05-07 12:49:32 +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 0be094d76d fixed default primaryColor 2024-04-27 23:13:27 +01:00
Utkarsh Mehta a5f4e8e730
chore: Delete product config api (#2611)
chore: Add DELETE handler for product API endpoint
2024-04-23 21:33:30 +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
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 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
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
Deepak Prabhakara 27a43cb778
Clean/unused (#2373)
* updated deployment

* cleanup unused code

* more cleanup

* revert back to old import of styles
2024-03-02 23:46:56 +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
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
Kiran K 48ccaa24c5
`HTTP-POST` binding support for SAML Federation sso endpoint (#2261)
* wip

* Support http post binding

* wip

* cleanup

* Format

* Fix package-lock

* RelayState is not mandatory

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-02-09 13:36:17 +00:00
Deepak Prabhakara 0d1349d866
Feat/mappings (#2273)
* add mappings for attributes

* apply mappings before creating SAML response

* build fix

* changed mappings to an array of objects

* updated sagger spec
2024-02-07 12:29:59 +00:00
Kiran K ee270bddc4
Proper error handling for SAML Federated route (#2271)
* Fix SAML Federated request handling

* Cleanup

* use optional chaining
2024-02-06 15:42:27 +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
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 705e26b19d
SAML Federation - Generate unique SP entity id (#2233)
* SAML Federation - Generate unique SP entity id

* Refactor EntityId component

* Refactor EntityId component and add generateEntityId function

* Fix the placeholder
2024-02-01 09:52:51 +00:00
Deepak Prabhakara 1a28a98ac9 fixed addOnBlur 2024-01-31 23:30:07 +00:00
Deepak Prabhakara 05658a47f3
added onBlur to TagsInput (#2232)
* added onBlur to TagsInput

* updated text
2024-01-31 22:59:28 +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
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
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 bec851ac7c
Prevent updating the `entityId` of the SAML federation app. (#2095)
* 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
2023-12-28 12:03:39 +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
Kiran K f32ac6aecb
Store product config (#1952)
* Store product config

* Handle Product not found.

* Product id is required

* Cleanup

* Refactor API route validation in middleware.ts

* Show friendly product name instead of id

* Refactor product fetching
2023-11-24 16:35:20 +00:00
Kiran K 5cde18c6f9
Enhance SAML federation flow (#1743)
* Enhance saml federation flow

* redirectUrl -> redirect_url

* request -> requested

* add client_id to session

* responseForm -> response_form

* Cleanup

* Fix unit test

* fixed typo

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-10-10 14:22:11 +01:00
Deepak Prabhakara 6e59de8d8b
Fixed redirect requests (#1732)
* fixed redirect becoming a post request

* fixed redirect becoming a post request
2023-10-07 21:38:49 +01:00
Kiran K 446dde1709
Refactor: Move license check to getServerSideProps for Admin Pages (#1726) 2023-10-06 14:25:19 +05:30
Kiran K 3944f99081
Updates to SAML federation (#1724)
* Add unit test cases

* Fix displaying the branding

* Remove the license check on the metadata

* Fix the endpoint

* Add e2e

* Fix the tests

* Fix the tests

* Remove unused imports

* Improve the tests

* add BOXYHQ_LICENSE_KEY

* Fix the test
2023-10-05 17:47:20 +01:00
Kiran K 24a2927346
Add `/api/v1/federated-saml` endpoints (#1671)
* Get Federated SAML apps by product

* move to /ee

* Rename method

* Fix APIs

* delete app by tenant + product

* get app by tenant and product

* Fix the params

* Fix the params

* Change API path to /saml-federation

* Update the paths

* use /federated-saml

* Revert

* Add swagger specs

* Fix tests
2023-10-04 13:07:46 +01:00
Deepak Prabhakara fa5f7c96fd
added missing awaits (#1291)
* added missing awaits
* avoid returning a value
2023-07-05 10:08:49 +05:30
Kiran K 731ced5ecb
Correct License Verification for EE Feature Controllers (#1141) 2023-05-15 20:58:03 +05:30
Deepak Prabhakara 9154d3a7af
Dynamodb support (#980)
* added dynamodb-local to docker-compose

* [WIP] Add DynamoDB data source (#947)

wip

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>

* WIP

* fixed put, get and delete

* store secondary index

* implemented getAll and delete

* revert changes to test file

* revert test script changes

* added dynamodb-local for testing

* WIP: pagination for DynamoDB

* dynamodb pagination cannot take offset and limit

* fixes for the change from Array to Records type so we can handle pageToken for DynamoDB

* fixed github actions

* trying options instead of command

* try default dynamodb-local command

* lint

* region for dynamodb

* added dummy aws creds

* lint

* getAll can be paginated using pageLimit

* tweaked comments

* Track `pageToken` with `pageOffset`.

* Track the (next)pageToken with offset

* Use the pageToken (from prev page) to get the connection list

* Comment

* Pass along the pageToken

* Type fix

* Relay the `pageToken` header to the response

* Update type for SWR ApiSuccess data

* Remove `marshall`

* Support pageToken for DS

* Support pageToken for SAML Fed

* Fix test

* Support pageToken for SAML Tracer

* Fix test

* Fix test for tracer

* Remove `marshall` in getByIndex

* Support `pageToken` for SetupLinks

* added dynamodb dev script

* move dynamodb options to it's own namespace

* added config for read/write capacity units

---------

Co-authored-by: Michael McDermott <michael.g.mcdermott@gmail.com>
Co-authored-by: Aswin V <vaswin91@gmail.com>
2023-03-16 21:42:36 +00:00
Kiran K 224358df28
Ability to customize the branding of Setup Link pages and the IdP selection pages (ee) (#965)
* display toast and adjust the width of the content

* customize the branding for setup links

* use the branding in setup links page

* Admin Branding WIP

* Update settings

* Move to ee folder

* If the licence is not valid, return the default branding

* update translation

* Add logo to the idp selection page

* add license check to the API

* read default branding from a common place

* add LicenseRequired

* cleanup

* Add License check to NPM

* Fix

* Add --pf css variable

* fix the idp selection page

* use default branding if value is not set

* Fixes

* Improved the store and keys

* Infer the return type

* Whitelabeling the IdP selection screen per tenant and product

* Fix the param type

* Fix the unit tests

* Fix mismatch in server/client rendering

* Switch to radio button look and feel

* Use rounded border only for textual inputs

* Cleanup import

* Move routing to `useEffect`

* Fix server render mismatch

* fixed merge conflict

* fixed merge conflict

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-03-09 14:50:25 +00:00
Aswin V c8fb34823b
SAML Tracer (#945)
* `SAMLTracer` bootstrap

* Pass `db` handle

* Expect `null` when license is void

* Skeleton - WIP

* Add `Trace` type

* Hook into `samlTracer`

* Secondary index and other changes

* Remove secondary index, support pagination

* Remove TTL on tracer store, add secondary indices

* Add `traceId` alongside payload value

* Implement `cleanUpStaleTraces`

* Trace any error in response parsing stage

* Move `setInterval` to constructor, also run at start

* Use arithmetic

* Make method `public`

* `await` on delete op

* Fix logic: store `concat` result in `traces`

* Unit tests

* Switch `randomUUID` to `generateMnemonic`

* Tweak const name

* Typo fix

* SAML Tracer to the sidebar

* Api routes and pages

* i18n

* SAML Tracer instance and type updates

* Page and api route for admin portal

* Update comment

* Rename variable

* Enhance types, make `timestamp` optional

* prefix `traceId` to error_description

* Assert traceId pattern and return value

* Add translations for traces list table

* Updates for SAML Tracer viewer

* Format the `error_description`

* Implement `getByTraceId`

* keycheck instead of falsiness check

* Use status `403` and minor tweaks

* Api route for getting single trace by `traceId`

* Trace Inspector view

* Move SAMLTracer out of `ee`

* Remove license check

* Placeholder for parsing rawResponse

* Trace inspect page

* Tweak description

* Wrap `samlResponse` in try catch

* Refactor and style changes, display more context

* Rethrow error for SAMLFederation without
redirecting

* Add `issuer`,`profile` to context

* Switch to `<span>` inside `<p>`

* Format profile display and fix issuer term

* Add TODO comment

* Use empty string if `issuer` turns out to be empty

* Package lock changes

* Tweak the comment

* Handle error with no op within saveTrace

* Wrap SAML error points in `authorize` with tracer

* Sync lock file

* Redirect to jackson error page for federated sso

* Pass `samlTracer` to Federated SSO class

* Trace the error and rethrow to caller

* Refactor

* Expand `context` type

* Gaurd for absent context fields

* Disable word-wrap for timestamp

* Display additional context

* `await` to catch errors inside promise

* Use tenant/product from app instead of connection

* Use translation and minor fix

* More translations

* More translations

* Remove "unlikely request" capturing

* Copy to clipboard button

* `await` inside try catch block

* cleanup

* Expand `try` to include jackson init

* Add `requestedOIDCFlow`

* Filter out empty indices

* Make `samlTracer` internal to jackson

* Use `AdminController` to get trace data

* Default to 0 for pagination

* Add comment

* Add IdP login flag to context

* Move the assignment before IdP flow check to populate context

* Add `relayState` to context

* Add `redirectUri` to context
2023-03-07 22:36:13 +00:00
Kiran K 43ea311067
fix: display toast and adjust the width of the content (#859)
display toast and adjust the width of the content
2023-01-20 00:28:12 +00:00
Kiran K eb80fb5297
Use middleware to validate the API requests (#792)
* Update

* Validate the API routes in the middleware

* Validate the setuplink token by calling the API

* Tweaks

* unAuthorizedResponse method now accept a message

* Update middleware

* Cleanup

* Update message

* Removed CheckSession - Not needed anymore

* Updates to API authentication middleware

* Updates to API authentication middleware

* Remove the use of checkSession from retraced admin APIs

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-01-06 23:37:08 +00:00
Deepak Prabhakara e40de748d1 added ee readme 2023-01-05 20:54:43 +00:00
Kiran K 656bd8712b
Use the new `isLoading` state from `useSWR` to show the loading indicator (#805)
* Update

* Use the new isLoading state from useSWR 2.0 to show a loading indicator

* fixed Allow headers

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-01-05 01:28:21 +00:00
Kiran K b2c7bf8c37
display the message when there is no more results to display when paginating (#808)
* display the message there are no more results to display when paginating

* Update colspan value

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-01-05 00:59:51 +00:00
Deepak Prabhakara fbe328b1eb better hover color for icon buttons 2022-12-29 23:46:05 +00:00
Kiran K 4e10d501ea
Standardize the setup link feature (#784)
* Tweaks to NewSetupLink

* Standardize the setup link feature

* Fix the connection APIs

* Standardize the Setup Link + Directory sync

* Tweaks to components

* Move the directory listing to a components

* Tweaks to connectons

* Updates connections page

* Make variable naming consistent

* Standardize the page export

* Remove unnecessary named export from API handler
2022-12-29 19:01:50 +05:30
Kiran K da7fffdafd
Fix pagination and other UI issues (#781)
* Update

* Fix the sidebar active state

* Add back button to the missing pages

* Use the translation keys

* Fix the type

* Remove old pagination component

* Fix the pagination for SSO connections

* Change the extension to .ts

* Add pagination to the directories listing

* Add the space between the buttons

* Add pagination for SAML Federation Apps

* Add missing pagination

* Fix the back buttons

* Add the pagination for webhook events

* Tweaks

* Fix the issue

* Fix the tests

* Fix the failing tests

* Fix the failing tests

* added hover state for table rows

* aligned SAML federation page with rest

* optimised imports from heroicons

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-12-28 16:29:45 +00:00
Kiran K b2bf1f9aec
Prevent sending multiple Allow headers in the response. (#780)
* Update

* Fix the Allow headers values in the API routes
2022-12-27 16:59:44 +05:30
Kiran K 86838115b6
Standardize "copy to clipboard" button (#768)
* Standardize copy to clipboard button

* Add copy button to SCIM endpoint and token

* Fix the clipboard button

* Add missing translation

* Cleanup

* Fix the property

* Tweaks

* Fix: update the defaultValue on state changes

* tweaks to links

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-12-27 00:26:58 +00:00
Kiran K fb1c504222
Tweaks to well-known links listing page (#765)
* wip

* Move the links to /well-known and update the UI

* Infer the props type

* localised strings

* switched to LinkOutline

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-12-23 22:43:04 +00:00
Aswin V 49b7a5f32f
Fix styling for links (#763)
* Style link for hover state

* aria-hidden attribute for icon

* Style signout

* Style link in ee
2022-12-22 17:26:05 +00:00