* 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>
* 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>
* 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>
* `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>
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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>
* display the message there are no more results to display when paginating
* Update colspan value
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
* 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
* 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>
* 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>