import ExternalLink from 'sentry/components/links/externalLink'; import LoadingError from 'sentry/components/loadingError'; import LoadingIndicator from 'sentry/components/loadingIndicator'; import Panel from 'sentry/components/panels/panel'; import PanelBody from 'sentry/components/panels/panelBody'; import PanelHeader from 'sentry/components/panels/panelHeader'; import PreviewFeature from 'sentry/components/previewFeature'; import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; import {t, tct} from 'sentry/locale'; import {ProjectKey} from 'sentry/types'; import {useApiQuery} from 'sentry/utils/queryClient'; import routeTitleGen from 'sentry/utils/routeTitle'; import useOrganization from 'sentry/utils/useOrganization'; import {useParams} from 'sentry/utils/useParams'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; import ReportUri, { getSecurityDsn, } from 'sentry/views/settings/projectSecurityHeaders/reportUri'; function getInstructions(keyList: ProjectKey[]) { return `Expect-CT: report-uri="${getSecurityDsn(keyList)}"`; } function ProjectExpectCtReports() { const organization = useOrganization(); const {projectId} = useParams(); const { data: keyList, isLoading, isError, refetch, } = useApiQuery([`/projects/${organization.slug}/${projectId}/keys/`], { staleTime: 0, }); if (isLoading) { return ; } if (isError) { return ; } return (
{t('About')}

{tct( `[link:Certificate Transparency] (CT) is a security standard which helps track and identify valid certificates, allowing identification of maliciously issued certificates`, { link: ( ), } )}

{tct( "To configure reports in Sentry, you'll need to configure the [header] a header from your server:", { header: Expect-CT, } )}

{getInstructions(keyList)}

{tct('For more information, see [link:the article on MDN].', { link: ( ), })}

); } export default ProjectExpectCtReports;