-
Notifications
You must be signed in to change notification settings - Fork 4
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
Proof of Concept TDP Based Kibana Auth #2775
Conversation
A note for @ADPennington, deploying this to QASP will not deploy kibana. You will only be able to test this proof of concept locally. The full deployment of kibana will be available in this PR. |
"""Handle get request and verify user is authorized to access kibana.""" | ||
user = request.user | ||
|
||
user_in_valid_group = user.is_ofa_sys_admin or user.is_ofa_admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elipe17 given this:
All users who can access Kibana will be able to read/write any index in Elastic.
we want to lock this down to sys admin role, as this seems like privileged access.
I'm also now wondering what this permission group will have access to in the way of parsed data:
- Might there be a feasible way for sys admins to pass parsed data to members of this less privileged group?
- I also thought we might have some queries pre-built in Kibana that would enable users with access to it to quickly generate extracts (e.g. .csv or .json format) of parsed data (e.g. all T1 records for FY2024, Q1), which might help mitigate risks of changing anything in the db.
I'm mostly thinking aloud here...maybe we have to get creative given the limitations of working with this wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating so that OFA System Admin are the only users who can access Kibana. Until we get more control over our cloud resources Kibana's access is all or nothing. Users who can access admin will have admin privileges in Kibana. However, if the users delete data/documents/indices in Kibana, that will not affect Postgres and no data will be truly lost. We can recover the data in Elastic/Kibana by rebuilding the search indices with elastic_search_dsl manage.py command.
Tickets will be written to have pre-canned dashboards and queries so that Kibana is just ready when deployed versus having to do manual configuration.
@@ -31,6 +31,13 @@ const SiteMap = ({ user }) => { | |||
link={`${process.env.REACT_APP_BACKEND_HOST}/admin/`} | |||
/> | |||
)} | |||
|
|||
{userIsAdmin && ( | |||
<SiteMap.Link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding the kibana tab to the sitemap :) cc: @ttran-hub
…elastic-bulk-doc-creation
…ech/TANF-app into 1858-kibana-ofa-access
…r is Dev or Sys Admin
…1858-kibana-ofa-access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work @elipe17 🚀
- verified that only developer and sys admin roles can see the kibana tab and a kibana tab in site map
- kibana endpoint is accessible when bypass = "yes"; else it redirects to frontend
My testing notes are saved here: https://hackmd.io/ro2G3T9yTF-w31gAbeXWlQ?view
@ADPennington are we able to merge this now or is there something blocking? cc @andrew-jameson |
I defer to @andrew-jameson. i approved this. is it needed for local development? |
Ok, I recall we wanted to pause this pending the pen test results and deployment related issues. Since we're moving ahead on Kibana, I'll merge this and #2805 will follow soon pending QASP review. |
Summary of Changes
Pull request closes Spike: Secure OFA staff access to Kibana #1858
Considerations
How to Test
List the steps to test the PR
These steps are generic, please adjust as necessary.
BYPASS_KIBANA_AUTH="yes"
to your backend.env
file, browse to /kibana and verify you can see the Kibana home page.Deliverables
More details on how deliverables herein are assessed included here.
Deliverable 1: Accepted Features
Checklist of ACs:
Deliverable 2: Tested Code
CodeCov Report
comment in PR)CodeCov Report
comment in PR)Deliverable 3: Properly Styled Code
Deliverable 4: Accessible
iamjolly
andttran-hub
using Accessibility Insights reveal any errors introduced in this PR?Deliverable 5: Deployed
Deliverable 6: Documented
Deliverable 7: Secure
Deliverable 8: User Research
Research product(s) clearly articulate(s):