* 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
* 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>
* 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>
* 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>
* 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>
* Default should be true, opt-in via JacksonOption
* Add new env to example file
* Omit profile scope if opted out
* Type update
* Service env processing
* Sync package locks
* Add unit tests
* 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>
* `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>
* WIP
* Support OIDC connections
* update connection using project revision
* working connections
* look up product config if boxyhqHosted
* fixed function return
* lint fix
* crash fix
* tweak name of org
* updated package-lock
* isEnabled is private
---------
Co-authored-by: Aswin V <vaswin91@gmail.com>
* 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
* Add Google Group API
* Restructure the Group interface
* Rename the methods
* wip
* temp change
* Revert the changes
* Fix the groups from Google
* wip fetch users
* Skip directory check
* Convert to SCIM schema
* Updates to users sync
* Fix the unit test
* Rename folder and merge the files
* add raw to the user payload
* Fix the unit tests
* Optimize the Group sync create ops
* Reorder import
* Remove unused imports
* Add type safety to SCIM Schema
* Fix the users and groups update
* try fixing unit tests
* Fix the file extension
* Delete groups that are not in the directory anymore
* Fix the group update
* Compare and find the delete users
* Add and update group members
* cleanup the test
* Fix the test (temp)
* dont throw error
* Add secondary index if the directory type is `google`
* Rename the file
* wip
* Export functions inline
* Hide the SCIM endpoint and token for non-scim provider
* Update the `dsync` option key to allow multiple providers
* Restructure the folders
* Update folder structure
* Cleanup
* Revert the callback changes
* Fix the type
* Fix the type
* Fix existing unit tests
* add callback
* Fix the internal callback
* Fix the method call
* merge the type files
* add console.info for testing
* Fix the Google OAuth client usage
* Reactor the update method
* Handle no users or group cases
* Refactor the sync method
* Fix the pagination
* Cleanup
* Finish the pagination
* Fix the unit tests
* Fix the lint errors
* Fix the build issues
* Pass directory id to the method
* Pass directoryId while fetching
* apply changes to the UI
* display the Google auth URL
* Fix the type
* add unit tests
* add unit test for syncing users
* add unit tests
* Pass operation to SCIM payload
* unit tests wip 1
* updated
* Test the events deleted
* Test group.user_added events
* Finish the tests
* Revert and cleanup
* update map.js
* Revert
* update the e2e test
* Cleanup
* Revert
* label tweak
* Remove unused import
* Protect the cron job using apiKey
---------
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
* add support to activate and deactivate SSO connections
* add unit tests for sso.deactivated and sso.activated
* prevent sso login with deactivated connection
* add deactivate key for directory sync
* update the Badge component to extend react-daisyui
* restructure the status toggle button
* update the connection toggle for directory connection
* wip
* tweak variables
* wip
* cleanup
* delete the connection after each test
* ask for confirmation before sending the request
* use PATCH method
* fix the default value for toggle
* stop sending webhook if connection is disabled
* add the key deactivated to connection object
* fix the unit test
* attempt to fix the test
* update
* allow passing data-testid to ConfirmationModal
* revert the changes
* cleanup
* remove the console.log
* remove unused imports
* sync the state after the status change
* Sync lock file
---------
Co-authored-by: Aswin V <vaswin91@gmail.com>
* 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>
* 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>
* `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
* Support `metadata` in `OIDCSSORecord`
* Helper to create oidc issuer instance
* Use helper to create `Issuer`
* Sync lock file
* Support `oidcMetadata` in pre-loaded connections
* Augment typings for OIDC SSO Connections
* Use helper and pass metadata
* Update validation to consider metadata
* Support for OIDC metadata
* Test fixes for types and error message
* Fix swagger array type
* Update swagger spec
* Util to transform OIDC metadata JSON
* Fix typings
* Augment validation for oidc metadata fields
* Add `oidcMetadataParse` to admin apis
* Add `oidcMetadataParse` to setup link apis
* Remove previously set discoveryUrl or metadata
if any
* Type updates admin portal
* initialState seeding for `object` type
* Add and place at bottom of the form
* Type the catalog list
* use to set the fields for the object type
* Type updates
* Gaurd against parentKey value
* Add missing guard to `formatForDisplay`
* Link like button
* Support for fallback field
* Util function to check if value is `{}`
* Fix premature setting of metadata
* Exclude fallback from form display
Activate fallback on switch interaction
* Fix settings view state setting
* Sync lock file
* Tweak error message
* Add e2e for SSO connection add via metadata
* Tweak switch
* Refactor - Parameterize the e2e test
* Cleanup
* text tweaks
* fixed test
* Update comments
* Use `data-testid` instead of button name
* Source `data-testid`s from catalog
* Refactor `hidden` className setting
* Switch from `locator` to `getByTestId`
* Apply hidden className to checkbox input
---------
Co-authored-by: Kiran K <kiran@boxyhq.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
* SAML Idp login using credentials provider
* Use idp login path as defaultRedirectUrl
* Whitelist idp-login route
* Logout from magic link before sign in
* Cleanup
* Set `callbackUrl` for signIn
* Sync lock file
---------
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
* Update config
* add the test cases for /api/v1/connections
* Fix the strategyChecker, add metadataUrl to the condition
* add the test cases for /api/v1/connections
* update /api/v1/connections
* Update the SSO connections tests
* Rename the test file
* update the tests
* should be able to check if a connection exists
* add the tests for directory sync APIs
* rstructure the tests folder
* add tests wip
* Fix the API tests
* Fix the sso connections tests
* Refactor the connections list
* restructure the /api/v1/connections APIs
* restructure the /api/v1/directory-sync tests
* add the tests for /api/scim/v2.0/
* update the tests
* wip
* fixes the api testing
* allow adding multiple directory connections for the same tenant and product
* update the tests
* update the unit tests
* improved the integration tests
* cleanup the api tests
* add tests for SCIM APIs
* fix the globalSetup
* update the tests for SCIM endpoints
* add the remaining tests
* fix the bug with fetching resource by invalid ID
* cleanup
* fix the tests
* update the tenant name
* typescript types cleanup
* directory sync API updates
* standardize the /api/v1/directory-sync
* update the directories.test.ts
* remove unused methods
* filter the users and groups by directoryId
* improve the SCIM request handling
* fix the e2e tests
* fix the e2e tests
* attempt to fix the api tests
* fix the api testing
* move the files to helpers
* add pagination for directory groups
* API - delete a directory by id
* delete the directory after the tests
* remove the members array from the group info
* env, login button & translations
* added setting in sidebar
Added login with sso button
Added connection create form in settings
* added new pages for Self SSO connection CRUD
* Fixed Self SSO issue
* Use @boxyhq/react-ui component for SSO
* `await` on method instead of class
* Fix import
* Set fields to non-editable for settings view
* Tweak for settings view
* Add link for settings in sidebar
* Take in admin SSO defaults from env
* Tweak edit page for settings view
* Remove `NEXT_PUBLIC` prefix
* Switch back to getSSP from getStaticProps
* Sync lock file
* Set defaults in env
* Filter out admin sso tenant/product
* Load admin SSO tenant/product
* Update heading
* Fix back link
* Use latest published version
* Set `clientId` to dummy in provider init
* Use the defaults from env
* Fix redirectUrl after savingConnection for settingsView
* Use `isLoading` from SWR
* Fix settings view url for mutation and redirect in Edit
* Replace api route path
* Use rewrite instead of router.push and other tweaks
* Reuse `ConnectionList` for settings
* Use pagination query params in settings api
* Import styles from sdk
* Fix failing build
* Use latest version
* - Display badge for system sso connections
- Reuse admin connection for retrieving system sso
connections
* Tweak styling
* Construct profile in updateUser as done previously
* Update react-ui
* Remove extra truthy check
* Hide pagination buttons for settings view
* Install @boxyhq/react-ui as symlink to local
* Tweak badge size
* Rename admin portal sso envs
* Fix the edit redirection for system sso
Co-authored-by: ukrocks007 <ukrocks.mehta@gmail.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
Co-authored-by: Kiran K <kiran@boxyhq.com>
* 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>
* pagination related changes for audit logs projects
* fixed the colSpan
useProject signature fixes
* used toast component instead of ErrorMessage
Changes in the api to send correct error messages
* response fixes