jackson/internal-ui/src/sso-tracer/SSOTracerInfo.tsx

220 lines
7.2 KiB
TypeScript
Raw Normal View History

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
import useSWR from 'swr';
import { useTranslation } from 'next-i18next';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter/dist/cjs';
import { materialOceanic } from 'react-syntax-highlighter/dist/cjs/styles/prism';
import { fetcher } from '../utils';
import type { SSOTrace } from '../types';
import { Loading, Error, PageHeader, Badge } from '../shared';
import { CopyToClipboardButton } from '../shared/InputWithCopyButton';
const ListItem = ({ term, value }: { term: string; value: string | JSX.Element }) => (
<div className='grid grid-cols-3 py-3'>
<dt className='text-sm font-medium text-gray-500'>{term}</dt>
<dd className='text-sm text-gray-900 overflow-auto col-span-2'>{value}</dd>
</div>
);
export const SSOTracerInfo = ({ urls }: { urls: { getTracer: string } }) => {
const { t } = useTranslation('common');
const { data, isLoading, error } = useSWR<{ data: SSOTrace & { traceId: string } }>(
urls.getTracer,
fetcher
);
if (isLoading) {
return <Loading />;
}
if (error) {
return <Error message={error.message} />;
}
if (!data) {
return null;
}
const trace = data.data;
const assertionType = trace.context.samlResponse ? 'Response' : trace.context.samlRequest ? 'Request' : '-';
let badgeText = '';
if (trace.context.isOIDCFederated) {
if (trace.context.requestedOIDCFlow) {
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
badgeText = t('bui-shared-oidc-federation');
} else {
badgeText = t('bui-tracer-oauth2-federation');
}
} else if (trace.context.isSAMLFederated) {
badgeText = t('bui-tracer-saml-federation');
} else if (trace.context.isIdPFlow) {
badgeText = t('bui-tracer-idp-login');
} else if (trace.context.requestedOIDCFlow) {
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
badgeText = t('bui-shared-oidc');
} else {
badgeText = t('bui-tracer-oauth2');
}
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
return (
<div className='space-y-3'>
<PageHeader title={t('bui-tracer-title')} />
<dl className='divide-y'>
<ListItem term={t('bui-tracer-id')} value={trace.traceId} />
<ListItem term={t('bui-tracer-assertion-type')} value={assertionType} />
<ListItem
term={t('bui-tracer-sp-protocol')}
value={
<Badge
color='primary'
size='md'
className='font-mono uppercase text-white'
aria-label={t('bui-tracer-sp-protocol')!}>
{badgeText}
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
</Badge>
}
/>
{typeof trace.timestamp === 'number' && (
<ListItem term={t('bui-tracer-timestamp')} value={new Date(trace.timestamp).toLocaleString()} />
)}
<ListItem term={t('bui-tracer-error')} value={trace.error} />
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
{trace.context.tenant && <ListItem term={t('bui-shared-tenant')} value={trace.context.tenant} />}
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
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
{trace.context.product && <ListItem term={t('bui-shared-product')} value={trace.context.product} />}
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
{trace.context.relayState && (
<ListItem term={t('bui-tracer-relay-state')} value={trace.context.relayState} />
)}
{trace.context.redirectUri && (
<ListItem
term={
trace.context.isIdPFlow ? t('bui-tracer-default-redirect-url') : t('bui-tracer-redirect-uri')
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
}
value={trace.context.redirectUri}
/>
)}
{trace.context.clientID && (
<ListItem term={t('bui-tracer-sso-connection-client-id')} value={trace.context.clientID} />
)}
{trace.context.issuer && <ListItem term={t('bui-tracer-issuer')} value={trace.context.issuer} />}
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
{trace.context.acsUrl && <ListItem term={t('bui-shared-acs-url')} value={trace.context.acsUrl} />}
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
{trace.context.entityId && (
<ListItem term={t('bui-tracer-entity-id')} value={trace.context.entityId} />
)}
{trace.context.providerName && (
<ListItem term={t('bui-tracer-provider')} value={trace.context.providerName} />
)}
{assertionType === 'Response' && trace.context.samlResponse && (
<ListItem
term={t('bui-tracer-saml-response')}
value={
<>
<CopyToClipboardButton text={trace.context.samlResponse}></CopyToClipboardButton>
<SyntaxHighlighter language='xml' style={materialOceanic}>
{trace.context.samlResponse}
</SyntaxHighlighter>
</>
}
/>
)}
{assertionType === 'Request' && trace.context.samlRequest && (
<ListItem
term={t('bui-tracer-saml-request')}
value={
<>
<CopyToClipboardButton text={trace.context.samlRequest}></CopyToClipboardButton>
<SyntaxHighlighter language='xml' style={materialOceanic}>
{trace.context.samlRequest}
</SyntaxHighlighter>
</>
}
/>
)}
{typeof trace.context.profile === 'object' && trace.context.profile && (
<ListItem
term={t('bui-tracer-profile')}
value={
<SyntaxHighlighter language='json' style={materialOceanic}>
{JSON.stringify(trace.context.profile)}
</SyntaxHighlighter>
}
/>
)}
{trace.context.error_description && (
<ListItem
term={t('bui-tracer-error-description-from-oidc-idp')}
value={trace.context.error_description}
/>
)}
{trace.context.error_uri && (
<ListItem term={t('bui-tracer-error-uri')} value={trace.context.error_uri} />
)}
{trace.context.oidcTokenSet?.id_token && (
<ListItem
term={t('bui-tracer-id-token-from-oidc-idp')}
value={
<>
<CopyToClipboardButton text={trace.context.oidcTokenSet.id_token}></CopyToClipboardButton>
<SyntaxHighlighter language='shell' style={materialOceanic}>
{trace.context.oidcTokenSet.id_token}
</SyntaxHighlighter>
</>
}
/>
)}
{trace.context.oidcTokenSet?.access_token && (
<ListItem
term={t('bui-tracer-access-token-from-oidc-idp')}
value={
<>
<CopyToClipboardButton text={trace.context.oidcTokenSet.access_token}></CopyToClipboardButton>
<SyntaxHighlighter language='shell' style={materialOceanic}>
{trace.context.oidcTokenSet.access_token}
</SyntaxHighlighter>
</>
}
/>
)}
{trace.context.stack && (
<ListItem
term={t('bui-tracer-stack-trace')}
value={
<SyntaxHighlighter language='shell' style={materialOceanic}>
{trace.context.stack}
</SyntaxHighlighter>
}
/>
)}
{trace.context.session_state_from_op_error && (
<ListItem
term={t('bui-tracer-session-state-from-oidc-idp')}
value={trace.context.session_state_from_op_error}
/>
)}
{trace.context.scope_from_op_error && (
<ListItem term={t('bui-tracer-scope-from-op-error')} value={trace.context.scope_from_op_error} />
)}
</dl>
</div>
);
};