Skip to content
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

#1858 Kibana access + changes for fully local development #2759

Closed
wants to merge 69 commits into from

Conversation

tptignor
Copy link

@tptignor tptignor commented Nov 29, 2023

  • Enables direct frontend/backend communication sans Login.gov/Cloud.gov
  • Drives off new REACT_APP_DEVAUTH env var
  • Pre-configures and disables frontend auth functionality
  • Testing based on new dev user
    • Install via web: ./manage.py generate_dev_user

How to Test

Start frontend and backend locally with REACT_APP_DEVAUTH set.
Create the dev user in a web container shell: ./manage.py generate_dev_user
Open http://localhost:3000/data-files in browser.
Submit a data file normally.
Verify with logs and postgres DB query.

raftmsohani and others added 5 commits November 25, 2023 13:58
 - Enables direct frontend/backend communication sans Login.gov/Cloud.gov
 - Drives off new DEVELOPMENT env var
 - Pre-configures and disables frontend auth functionality
 - Testing based on new dev user
   - Install via web: ./manage.py generate_dev_user
@tptignor tptignor self-assigned this Nov 29, 2023
@tptignor tptignor requested a review from jtimpe November 29, 2023 18:04
@tptignor
Copy link
Author

tptignor commented Dec 6, 2023

Looking more closely at bulk_create_records and parse_datafile_lines this morning. Eric and I were discussing performance issues committing to ES in the past. If there is a need to batch ES ops, there is a Bulk API.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-bulk.html

@tptignor tptignor changed the title Changes for fully local development #1858 Kibana access + changes for fully local development Dec 7, 2023
@tptignor tptignor requested a review from elipe17 December 7, 2023 17:41
print(f"Found {vars(user)}")
except User.DoesNotExist:
group = Group.objects.get(name="Developer")
user = User.objects.create(username=email,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the user be given is_superuser=True and is_staff=True? this will open up the "Admin" tab

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it certainly can work; I think a few things are different for admins; is that the normal model for dev?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi Jan, FYI - have been talking with Eric; there are a few branches outstanding now; we're now thinking to reopen this off of 1858-kibana-ofa-access

authuser = User.objects.get(username=reqname)
if authuser and requser == "undefined":
request.data["user"] = authuser.id
return (User.objects.get(username=reqname), True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even after manually running python manage.py generate_dev_user, i get forbidden errors from the backend endpoints and can't upload data files
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you didn't go through DevAuthentication. Did you copy REACT_APP_DEVAUTH=1 into your .env and rebuild?

@elipe17 elipe17 closed this Jan 12, 2024
@andrew-jameson andrew-jameson deleted the local-front-and-back branch July 26, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants