diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index c68b4a0ac..6d5b84a57 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -8,7 +8,7 @@ env: GITHUB_WORKFLOW: github_actions backend-directory: ./backend working-directory: ./frontend - + jobs: startup-functional-test: runs-on: ubuntu-20.04 @@ -18,7 +18,7 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} + POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -65,7 +65,7 @@ jobs: echo DJANGO_SUPERUSER_PASSWORD=1234 >> .env echo POSTGRES_NAME=postgres >> .env echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env + echo POSTGRES_PASSWORD=postgres >> .env echo DB_HOST=localhost >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://localhost:4173 >> .env diff --git a/backend/ciso_assistant/settings.py b/backend/ciso_assistant/settings.py index c682a2237..1d6a8904a 100644 --- a/backend/ciso_assistant/settings.py +++ b/backend/ciso_assistant/settings.py @@ -202,6 +202,10 @@ def set_ciso_assistant_url(_, __, event_dict): REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"].append( "rest_framework.renderers.BrowsableAPIRenderer" ) + # Add session authentication to allow using the browsable API + REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].append( + "rest_framework.authentication.SessionAuthentication" + ) INSTALLED_APPS.append("django.contrib.staticfiles") STATIC_URL = "/static/"