Commit Graph

8 Commits

Author SHA1 Message Date
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 18a4beae35
Switch to react-daisyui (#750)
* trying react-daisyui

* build fix

* switched Link to LinkPrimary and Button

* created Pagination component (TODO: Need to align Paginate and Pagination components

* switched from <button> to Button

* added LinkOutline

* more instances where LinkOutline can be used

* created ButtonBack and LinkBack components

* switched to ButtonOutline, ButtonPrimary and ButtonDanger

* Button -> ButtonBase

* <button> -> ButtonPrimary

* reuse props for button and link

* switched react-hot-toast with daisyui toast

* standardised an IconButton

* tweaks to hover

* switched from ButtonBack to LinkBack
2022-12-20 17:18:58 +00:00
Kiran K 7287a6bb37
Federated SAML (#685)
* Add alert component

* Add a loading state component

* Now Emptystate accept an optional prop description

* SAML federation create app controller

* Add the UI to create and list SAML federation apps

* Create SAML federation app and metadata

* wip

* wip

* wip

* Cleanup

* Fix the return values

* Delete the session after the SAML response is sent to the user

* wip

* Revert the changes to the ConnectionAPIController

* wip - IdP selection, session fixes

* Fix the flow

* Refactor

* Refactor

* wip

* Refactor the idp selection page - wip

* Refactor

* Refactor the resolve connection

* Refactor the idp selection

* Refactor the idp/app selection and other fixes

* wip

* Refactor

* Refactor the SAML response handling to merge the logic

* Rename the methods

* Move the saml federation to /ee folder

* Fix the imported types

* wip

* wip /ee

* Move the federated SAML UI to /ee

* Move to /ee folder

* wip admin portal

* Delete the SAML federation app

* Rename the controllers

* Add the translation

* Add the proper license check

* Add the unit tests

* tweaks to test

* tweaks to test

* Changes to the controller and other cleanup

* Fix API routes headers

* Use new toast

* Add button to download cert

* Tweaks

* log cleanup

* saml federation is part of enterprise sso

* entityID now contains the unique hash needed for each tenant + product combination

* cleanup

* cleanup

* we don't need a unique entityID

* text tweaks

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-12-16 15:38:59 +00:00
Deepak Prabhakara ded2163078 misc tweaks 2022-11-04 23:11:15 +00:00
Kiran K 45d116ddf5
Add a web page to display SP's Config details (#422)
* Merged

* Revert the changes

* Update package-lock.json

* Add the web page to display the SP's Config

* Commit changes to package-lock.json

* rewrite route so the path is `/.well-known/saml-configuration`

* added back @opentelemetry/api

* downgraded @opentelemetry/resources

* pin "@opentelemetry/resources": "1.0.1"

* Replace the getStaticProps with getServerSideProps

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-09-07 15:20:06 +01:00
Kiran K b892fafdea
Replace the Supabase UI with Daisy UI and few other improvements to the UI (#409)
* Merged

* Revert the changes

* wip

* wip

* wip

* UI improvements

* wip

* Text changes

* Add the cta

* Code cleanup

* Fixes

* Fixing the tests

* Fixing the tests

* Fixing the tests

* Fix the issues with package-lock

* Fix the issues with package-lock

* updated package-lock

* try reverting e2e test changes

* add menu text inside a div so it can be found by e2e tests

* one more attempt

* remove hidden class

* package-lock.json

* Make the test fails

* Fix the e2e test

* Adjust the layout loading

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-08-04 08:45:22 +01:00
Aswin V 58b9769373
Error pages for Jackson browser based flows (#134)
* Add cookie serialization/parse utils

* Escape hatch for error page

* Draft impl for error page

* Error page redirect for /saml

* Const for cookie name and delete cookie once read

* Error page layout

* Uncomment code

* Render nothing if statusCode is null

* Minor formatting fix

* Remove cookie npm dependency

* Remove types for cookie npm

* Remove deleteCookie op

* Simplify error page layout

* Move hooks to lib/ui

* Sort class name

* Separate ui/server utils

* Use setErrorCookie & getErrorCookie

* updated package-lock.json

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-03-29 16:33:51 +01:00
Aswin V bd44c3479c
Admin interface for Jackson (#71)
* NextAuth + users providers

* Add a temporary fix for verification token - don't use it in production

* Admin ui files

* Admin controller

* getAll db apis

* IdP provider page and api route

* Fix padding

* Style fixes

* middleware to check session

* Loading state handling

* fetcher better response handling

* Add new provider form and api route

* Tab panel in client add form

* Tab switching plus new fields

* Flowbite config

* darkMode with flowbite

* Save config

* Update route path to saml

* Reusable component for add/edit

* cleanup

* Set Secret in NextAuth options

* Prettier lint changes

* Support for delete operation

* Link update

* PopUp Modal reusable component

* Popup confirm before delete

* disable SWR revalidation on focus

* Display IdP metadata, clientID,secret

* Header fixed positioning and style fixes

* Filter raw XML in edit mode

* Add name field to config

* - Edit/New form delta
- Split by newline
- Route back after POST

* Remove flowbite

* Remove flowbite [cleanup]

* Add description field

* updateConfig implementation

* Route PATCH to updateConfig

* Naming change

* Naming Client -> Connection

* AddEdit component updates

* Omit provider, returns full config

* Destructure session first

* Change to domain ACL

* Delete unused component

* Support glob and list of emails for ACL

* Delete unused CSS

* Update package lock

* Remove flowbite from content source

* Redirect to admin route

* Check session in Layout and redirect to login

* Logout in dropdown

* vertical alignment

* Show status message on save (edit)

* Consolidate fields to one long vertical column

* GetAll function for SQL and Add CreationDate and Modification Date for Mongo and SQL

* Add name as header

* Styling and opacity transition for status

* Configure button style fix

* overflow for smaller viewports and rounded border

* Fallback to default behavior of useSession

* Store, use and dispose (after signIn)
verification token in db

* Remove unused class

* Rename Connections ➡ Configurations

* Handle getAll and getConfig using slug

* Better naming

* Update fetch paths

* Refactor getAllConfig ➡ getConfig (By Id)

* Better naming

* Rename saml ➡ samlconf

* Use light theme by not defaulting to system theme

* Path update /samlconf ➡ /saml/config

* Fix path

* Revert manual changes

* getall funcationality and migration  script

* message

* Updating migration file formating

* message

* Pull and fix package.json and lock file

* correcting the migration script formatting

* remove file

* add new migration files

* e2e with playwright

* Better naming

* Remove comment

* Make headless

* Run npm install from root

* Add e2e steps in workflow

* try with separate npm installs

* Move higher in the pipeline to test

* Fix quote

* Rely on npx

* fixed migration script formatting

* spelling correction

* headless for CI but false for local

* Use secret

* Type fixes for mongo

* [skip ci] Swagger annotation for getConfig

* Adding migration scriptis for all db's

* added migration script to prettierignore

* unformat migration script

* removing postgress migration files

* generate new migration files

* remove wrong migration files

* Add new migration files  for mysql and mariadb

* [skip ci] Swagger annotation for updateConfig

* Return empty for update op

* Update swagger spec

* Fix type

* Wait for mongo to start

* Fix db_engine

* Test with pg

* Test with POSTGRES_DB env to auto create db

* Swap install-deps with install

* Use prod build

* enable @ts-ignore

* Test some fixes

* Can be omitted in next-auth v4, uses secret

* Move env to playwright config

* authDbSeed script needs the db and other secrets

* Typo

* Bad typo day 😅

* Again typo

* Set NEXTAUTH_URL

* Use prod build in CI

* Prefix the env for seeding

* Try with inline

* tidying up migration scripts

* fixed migration scripts

* Set env in actions yml

* Remove comma

* Target chromium

* Prefix the env

* Try inline in playwright

* print env

* Move build to action step

* Remove console log

* Let env sit on the job level

* Add ACL

* Fix attribute check

* Add name field

* add name in metadata preload config

* Use postgres

* Remove unneeded secret

* Remove env/options from mongo service

* Fix swagger

* Update swagger spec

* [skip ci] Fix eslint warning

* Add updateConfig test

* Add description to preloaded config

* [skip ci] cleanup

* minor fix

* Update comment

* Expose PATCH in config api

* Added missing validation for clientSecret

* Update swagger spec

* updated example postgres url, updated deps

* Redirect to saml config route

* Remove unused pages/routes

* Update in package lock

* Add primary and secondary colors to tailwind

* Swap icon

* Remove text-color and apply default theme

* Use the primary color from theme

* Reusable custom class for btn-primary

* Add link-primary reusable class

* Use primary secondary colors for main logo

* Show error status & color align with primary color

* Show product if name is absent

* Simplify required attribute setting,
'description' is not required

* Make description optional

* Fix placeholder text

* Swagger updates

* Add validation for description

* Swagger - add missing status codes & descriptions

* Update swagger artifact

* Fix styling for status message

* revalidate config on successful save

* style text highlight globally

* Fix cancel button style

* Set the main height to 100%-headerHeight,
add overflow

* removed default ACL, if someone forgets to change it then we might have Tony Stark logging into everyones instances :)

* print the arch/platform

* Collect platform info

* Disable swc and remove platform query steps

* Try with custom babel config to disable swc

* Add next.js build cache

* Refactor step

* trying swc

* Make name parameter optional

* Update form state from backend after save

* port 5000 -> 5225

* Handle empty value case for ACL

* bumped up version

Co-authored-by: Kiran <kiran@boxyhq.com>
Co-authored-by: Vishal Lodha <vishal@boxyhq.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
Co-authored-by: Utkarsh Mehta <ukrocks.mehta@gmail.com>
2022-02-22 19:03:21 +00:00