diff --git a/.trivyignore.yaml b/.trivyignore.yaml index 0f163d54..dbd015a4 100644 --- a/.trivyignore.yaml +++ b/.trivyignore.yaml @@ -1,4 +1,4 @@ vulnerabilities: - id: GHSA-wrw7-89jp-8q8g - expired_at: 2026-09-30 + expired_at: 2026-10-30 statement: "glib is a transitive dependency of Tauri which we cannot update ourselves. Waiting for tauri to finish migration to gtk4-rs: https://github.com/tauri-apps/tauri/issues/12563" diff --git a/new-ui/src/pages/full/OverviewPage/components/ConnectModal/ConnectModal.tsx b/new-ui/src/pages/full/OverviewPage/components/ConnectModal/ConnectModal.tsx index 01c7cadd..ac5eca07 100644 --- a/new-ui/src/pages/full/OverviewPage/components/ConnectModal/ConnectModal.tsx +++ b/new-ui/src/pages/full/OverviewPage/components/ConnectModal/ConnectModal.tsx @@ -32,13 +32,16 @@ export const ConnectModal = () => { useShallow((s) => [s.view, s.visible, s.location, s.stepIndex, s.stepPlan]), ); + const { instances } = useAppData(); + const instance = instances.find((entry) => entry.id === location?.instance_id); + const stepCount = isPresent(location) ? mfaStepCount(location) : 0; const stepMethod = stepPlan[stepIndex]; const isOnMfaStepView = isPresent(stepMethod) && view === mfaMethodToConnectModalView(stepMethod); const stepLabel = stepCount > 1 && isOnMfaStepView - ? `Step ${stepIndex + 1}/${stepCount}: ${mfaToText(stepMethod)}` + ? `Step ${stepIndex + 1}/${stepCount}: ${mfaToText(stepMethod, instance)}` : null; const isOpen = isPresent(view) && isPresent(location) && visible; diff --git a/new-ui/src/pages/full/OverviewPage/components/ConnectModal/views/ConnectModalMfaOidc/ConnectModalMfaOidc.tsx b/new-ui/src/pages/full/OverviewPage/components/ConnectModal/views/ConnectModalMfaOidc/ConnectModalMfaOidc.tsx index 2de80b46..7b4844a3 100644 --- a/new-ui/src/pages/full/OverviewPage/components/ConnectModal/views/ConnectModalMfaOidc/ConnectModalMfaOidc.tsx +++ b/new-ui/src/pages/full/OverviewPage/components/ConnectModal/views/ConnectModalMfaOidc/ConnectModalMfaOidc.tsx @@ -5,11 +5,17 @@ import { useShallow } from 'zustand/shallow'; import { Button } from '../../../../../../../shared/components/Button/Button'; import { ButtonVariant } from '../../../../../../../shared/components/Button/types'; import { Checkbox } from '../../../../../../../shared/components/Checkbox/Checkbox'; +import { ExternalProviderButton } from '../../../../../../../shared/components/ExternalProviderButton/ExternalProviderButton'; import { SizedBox } from '../../../../../../../shared/components/SizedBox/SizedBox'; +import { useAppData } from '../../../../../../../shared/providers/AppDataContext'; import { api } from '../../../../../../../shared/rust-api/api'; import { getAppConfigQueryOptions } from '../../../../../../../shared/rust-api/query'; import { ThemeSpacing } from '../../../../../../../shared/types'; import { isPresent } from '../../../../../../../shared/utils/isPresent'; +import { + findOpenIdProvider, + openIdProviderName, +} from '../../../../../../../shared/utils/mfa'; import { ConnectModalPostureCheckLoading } from '../../components/ConnectModalPostureCheckLoading/ConnectModalPostureCheckLoading'; import { ConnectModalView } from '../../hooks/types'; import { useConnectModal } from '../../hooks/useConnectModal'; @@ -22,6 +28,9 @@ export const ConnectModalMfaOidc = () => { const [perviousView, location, initAutoStart] = useConnectModal( useShallow((s) => [s.perviousView, s.location, s.autoStartOpenId]), ); + const { instances } = useAppData(); + const instance = instances.find((entry) => entry.id === location?.instance_id); + const providerName = openIdProviderName(instance); const { start, isStarting, startError, isPolling, pollError } = useConnectModalMfaOidc({ autoStart: initAutoStart, @@ -60,8 +69,7 @@ export const ConnectModalMfaOidc = () => {
- To connect to the VPN, authenticate via your OpenID provider. A browser window - will open for you to sign in. + {`To connect to the VPN, sign in with ${providerName} by clicking button below. A browser window will open and redirect you to ${providerName} for authentication.`}
)} {screen === 'polling' && ( @@ -72,9 +80,9 @@ export const ConnectModalMfaOidc = () => { {screen === 'error' &&{errorMessage}
}{mfaToText(factor)}
+{mfaToText(factor, instance)}
- To connect to the VPN, authenticate via your OpenID provider. A browser window - will open for you to sign in. + {`To connect to the VPN, sign in with ${providerName} by clicking button below. A browser window will open and redirect you to ${providerName} for authentication.`}
)} {screen === 'polling' && ( @@ -70,7 +72,7 @@ export const LocationCardMfaOidcView = () => {