-
Notifications
You must be signed in to change notification settings - Fork 1
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
New POST
create entity endpoint - also authentication
#67
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
==========================================
- Coverage 98.22% 91.66% -6.57%
==========================================
Files 14 17 +3
Lines 508 984 +476
==========================================
+ Hits 499 902 +403
- Misses 9 82 +73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
40beaf7
to
2a4b037
Compare
Update CLI to use the POST endpoints instead of generating a MongoDB Collection to use.
Add login command to CLI
Added: - mixed-line-ending - name-tests-test (--pytest-test-first)
Use the backend users directly - do not allow creation of new users, set these up in the backend directly, not via the REST API - or the CLI.
Set it to "false" if running production target and to "true" if running the development target.
live backend.
Extend tests with the use of TestClient in CLI tests.
1c7b6b7
to
715d059
Compare
The struggle now is to make them run with a TestClient against a live MongoDB backend
@quaat I've implemented authentiation through SINTEF's GitLab here now, determining write access rights through membership of a specific group (as well as the role one has in the group) :) |
Fix docker compose. Only run *.js file when starting mongo service. Instruct developers to run the self-signed certificate creation script manually.
Wrong auth-level used for backend in create endpoint. Make all configuration options optional to (for now) reuse it in the CLI. Use the path from base_url config as the root_path for the REST API service.
Ensure pyyaml is installed together with CLI dependencies.
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.
This is a rather large review, and due to time constraints it is hard to go into every detail. However the overall structure, code, comments and clarity seems very good. As for features I think it will be good in future update to separate the uri/identity of the entity and the url of the hosting service, as we will need to host entities created elsewhere with different namespaces. Very good job, I look forward to using this.
I've opened issue #76 to follow up on this and continue any discussion on the subject matter there. |
Closes #63
Note, this is based on the work done in #55, so it depends on that being merged first.
The authentication pathway has been updated to utilize OAuth2 from SINTEF's GitLab instance.
Whether a user then has write access or not to the entities database backend depends on whether a user is a member of a particular group and has a sufficiently high role in said group.