refactor: drop PAM auth and require password for funnel

This commit is contained in:
Peter Steinberger
2025-12-23 13:13:09 +00:00
parent cd6ed79433
commit c8c807adcc
22 changed files with 47 additions and 278 deletions

View File

@@ -48,7 +48,7 @@ export type EventLogEntry = {
};
export type AppViewState = {
settings: { gatewayUrl: string; token: string; username: string; sessionKey: string };
settings: { gatewayUrl: string; token: string; sessionKey: string };
password: string;
tab: Tab;
connected: boolean;

View File

@@ -188,9 +188,6 @@ export class ClawdisApp extends LitElement {
this.client = new GatewayBrowserClient({
url: this.settings.gatewayUrl,
token: this.settings.token.trim() ? this.settings.token : undefined,
username: this.settings.username.trim()
? this.settings.username.trim()
: undefined,
password: this.password.trim() ? this.password : undefined,
clientName: "clawdis-control-ui",
mode: "webchat",

View File

@@ -30,7 +30,6 @@ type Pending = {
export type GatewayBrowserClientOptions = {
url: string;
token?: string;
username?: string;
password?: string;
clientName?: string;
clientVersion?: string;
@@ -99,10 +98,9 @@ export class GatewayBrowserClient {
private sendConnect() {
const auth =
this.opts.token || this.opts.password || this.opts.username
this.opts.token || this.opts.password
? {
token: this.opts.token,
username: this.opts.username,
password: this.opts.password,
}
: undefined;

View File

@@ -3,7 +3,6 @@ const KEY = "clawdis.control.settings.v1";
export type UiSettings = {
gatewayUrl: string;
token: string;
username: string;
sessionKey: string;
};
@@ -16,7 +15,6 @@ export function loadSettings(): UiSettings {
const defaults: UiSettings = {
gatewayUrl: defaultUrl,
token: "",
username: "",
sessionKey: "main",
};
@@ -30,8 +28,6 @@ export function loadSettings(): UiSettings {
? parsed.gatewayUrl.trim()
: defaults.gatewayUrl,
token: typeof parsed.token === "string" ? parsed.token : defaults.token,
username:
typeof parsed.username === "string" ? parsed.username : defaults.username,
sessionKey:
typeof parsed.sessionKey === "string" && parsed.sessionKey.trim()
? parsed.sessionKey.trim()

View File

@@ -59,17 +59,6 @@ export function renderOverview(props: OverviewProps) {
placeholder="CLAWDIS_GATEWAY_TOKEN"
/>
</label>
<label class="field">
<span>Username (system auth)</span>
<input
.value=${props.settings.username}
@input=${(e: Event) => {
const v = (e.target as HTMLInputElement).value;
props.onSettingsChange({ ...props.settings, username: v });
}}
placeholder="optional"
/>
</label>
<label class="field">
<span>Password (not stored)</span>
<input