+
+
+
+
+
+
+
+
+ {authMethod === BEDROCK_AUTH_ACCESS_KEY ? (
+ <>
+
+
+ setAccessKeyId(event.target.value)}
+ placeholder="AKIAIOSFODNN7EXAMPLE"
+ />
+
+
+
+ setSecretAccessKey(event.target.value)}
+ placeholder="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
+ type="password"
+ />
+
+ >
+ ) : null}
+ {authMethod === BEDROCK_AUTH_LONG_TERM_API_KEY ? (
+
+
+ setBearerToken(event.target.value)}
+ placeholder="Your long-term API key"
+ type="password"
+ />
+
+ ) : null}
+ {authMethod === BEDROCK_AUTH_IAM ? (
+
+ SurfSense will use the IAM role attached to the environment it's running in to
+ authenticate.
+
+ ) : null}
+
+ Add Bedrock model IDs from the provider's settings after connecting.
+
+
+
+
+
onChange(event.target.value)}
+ placeholder={placeholder || "https://api.example.com/v1"}
+ />
+
+ Local URLs are tested from the backend container, so use host.docker.internal instead of
+ localhost.
+
+
+ );
+}
+
+interface ApiKeyFieldProps {
+ value: string;
+ onChange: (value: string) => void;
+ label?: string;
+ placeholder?: string;
+}
+
+/** Shared masked API Key input. */
+export function ApiKeyField({
+ value,
+ onChange,
+ label = "API Key",
+ placeholder = "API key",
+}: ApiKeyFieldProps) {
+ return (
+