Skip to content

fix: hide OIDC and Github auth settings when they are disabled #9447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tweak security settings too
  • Loading branch information
aslilac committed Aug 30, 2023
commit bbd1341db6b6fe042487fd6ac5f097333c3c04cb
Original file line number Diff line number Diff line change
Expand Up @@ -23,66 +23,70 @@ export const SecuritySettingsPageView = ({
options: options,
featureAuditLogEnabled,
featureBrowserOnlyEnabled,
}: SecuritySettingsPageViewProps): JSX.Element => (
<>
<Stack direction="column" spacing={6}>
<div>
<Header
title="Security"
description="Ensure your Coder deployment is secure."
/>
}: SecuritySettingsPageViewProps): JSX.Element => {
const tlsOptions = options.filter((o) =>
deploymentGroupHasParent(o.group, "TLS"),
)

<OptionsTable
options={useDeploymentOptions(
options,
"SSH Keygen Algorithm",
"Secure Auth Cookie",
"Disable Owner Workspace Access",
)}
/>
</div>
return (
<>
<Stack direction="column" spacing={6}>
<div>
<Header
title="Security"
description="Ensure your Coder deployment is secure."
/>

<div>
<Header
title="Audit Logging"
secondary
description="Allow auditors to monitor user operations in your deployment."
docsHref={docs("/admin/audit-logs")}
/>
<OptionsTable
options={useDeploymentOptions(
options,
"SSH Keygen Algorithm",
"Secure Auth Cookie",
"Disable Owner Workspace Access",
)}
/>
</div>

<Badges>
{featureAuditLogEnabled ? <EnabledBadge /> : <DisabledBadge />}
<EnterpriseBadge />
</Badges>
</div>
<div>
<Header
title="Audit Logging"
secondary
description="Allow auditors to monitor user operations in your deployment."
docsHref={docs("/admin/audit-logs")}
/>

<div>
<Header
title="Browser Only Connections"
secondary
description="Block all workspace access via SSH, port forward, and other non-browser connections."
docsHref={docs("/networking#browser-only-connections-enterprise")}
/>
<Badges>
{featureAuditLogEnabled ? <EnabledBadge /> : <DisabledBadge />}
<EnterpriseBadge />
</Badges>
</div>

<Badges>
{featureBrowserOnlyEnabled ? <EnabledBadge /> : <DisabledBadge />}
<EnterpriseBadge />
</Badges>
</div>
<div>
<Header
title="Browser Only Connections"
secondary
description="Block all workspace access via SSH, port forward, and other non-browser connections."
docsHref={docs("/networking#browser-only-connections-enterprise")}
/>

<div>
<Header
title="TLS"
secondary
description="Ensure TLS is properly configured for your Coder deployment."
/>
<Badges>
{featureBrowserOnlyEnabled ? <EnabledBadge /> : <DisabledBadge />}
<EnterpriseBadge />
</Badges>
</div>

<OptionsTable
options={options.filter((o) =>
deploymentGroupHasParent(o.group, "TLS"),
)}
/>
</div>
</Stack>
</>
)
{tlsOptions.length > 0 && (
<div>
<Header
title="TLS"
secondary
description="Ensure TLS is properly configured for your Coder deployment."
/>

<OptionsTable options={tlsOptions} />
</div>
)}
</Stack>
</>
)
}