Show protected when using mtls

This commit is contained in:
Owen
2026-10-20 15:02:07 -04:00
parent ee8724f117
commit 77c0c96823
6 changed files with 102 additions and 9 deletions
@@ -99,6 +99,7 @@ export default async function ProxyResourcesPage(
resource.pincodeId !== null ||
resource.passwordId !== null ||
resource.whitelist ||
resource.mtls ||
resource.headerAuthId
? "protected"
: "not_protected",
+2 -2
View File
@@ -19,7 +19,6 @@ import {
import { useTranslations } from "next-intl";
import CertificateStatus from "@app/components/CertificateStatus";
import { toUnicode } from "punycode";
import { build } from "@server/build";
type ResourceInfoBoxType = {};
@@ -118,7 +117,8 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
authInfo.pincode ||
authInfo.sso ||
authInfo.whitelist ||
authInfo.headerAuth ? (
authInfo.headerAuth ||
authInfo.mtls ? (
<div className="flex items-center space-x-2">
<ShieldCheck className="w-4 h-4 flex-shrink-0 text-green-500" />
<span>{t("protected")}</span>
@@ -454,15 +454,22 @@ export function PolicyAuthStackSectionEdit({
updatePolicy(policyUpdates);
// Traefik only enforces mTLS with a trusted CA and SSL.
const mtlsEnforced =
mtls.supported &&
mtls.enabled &&
mtls.hasCertificates &&
mtls.sslEnabled;
resourceContext?.updateAuthInfo(
isInferenceResource
? { sso: true }
? { sso: true, mtls: mtlsEnforced }
: {
sso: payload.sso,
whitelist: payload.emailWhitelistEnabled,
password: passcodeOnServerRef.current,
pincode: pincodeOnServerRef.current,
headerAuth: headerAuthOnServerRef.current
headerAuth: headerAuthOnServerRef.current,
mtls: mtlsEnforced
}
);
@@ -831,9 +838,12 @@ export function PolicyAuthStackSectionEdit({
resourcePolicyId={policy.resourcePolicyId}
certificates={mtls.certificates}
isLoading={mtls.isLoadingCertificates}
onMtlsDisabled={() =>
updatePolicy({ mtlsEnabled: false })
}
onMtlsDisabled={() => {
updatePolicy({ mtlsEnabled: false });
resourceContext?.updateAuthInfo({
mtls: false
});
}}
/>
)}
</SettingsSectionBody>