Skip to content

Commit

Permalink
Fix danswer credential generation (#8)
Browse files Browse the repository at this point in the history
* Use deterministic dummy creds

* Bump tags for testing

* Add comments

* Bump to stable chart & image tags
  • Loading branch information
sd109 authored Sep 6, 2024
1 parent 7a3b026 commit 3b49098
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deployment/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ home: https://www.danswer.ai/
sources:
- "https://github.com/danswer-ai/danswer"
type: application
version: 0.2.1
version: 0.2.2
appVersion: v0.5.10
dependencies:
- name: postgresql
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appVersionOverride: # e.g "v0.3.93"
# tags to refer to downstream StackHPC-modified images.
# The full image ref will be:
# {{ image-name }}:{{ image-tag or appVersion }}-{{ tagSuffix }}
tagSuffix: stackhpc.3
tagSuffix: stackhpc.4

zenithClient:
iconUrl: https://raw.githubusercontent.com/danswer-ai/danswer/1fabd9372d66cd54238847197c33f091a724803b/Danswer.png
Expand Down
5 changes: 3 additions & 2 deletions web/src/app/auth/login/HeaderLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { basicLogin, basicSignup } from "@/lib/user";
import { useRouter } from "next/navigation";
import { useEffect } from "react";
import { Spinner } from "@/components/Spinner";
import { v4 as uuidv4 } from 'uuid';

export function HeaderLoginLoading({
user, groups
Expand All @@ -17,8 +16,10 @@ export function HeaderLoginLoading({

const router = useRouter();
const { popup, setPopup } = usePopup();
// NOTE: As long as Danswer is only ever exposed
// via Zenith then these credentials are irrelevant.
const email = `${user}@default.com`;
const password = `not-used-${uuidv4()}`
const password = `not-used-${user}`
const role = groups.includes("/admins") ? "admin" : "basic"

async function tryLogin() {
Expand Down
1 change: 1 addition & 0 deletions web/src/app/auth/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const Page = async ({
/>
</>
)}
{/* TODO: Make header login it's own auth type */}
{authTypeMetadata?.authType === "basic" && (
(userHeader && groupsHeader) ?
<HeaderLoginLoading user={userHeader} groups={groupsHeader.split(',')} /> : (
Expand Down

0 comments on commit 3b49098

Please sign in to comment.