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

Feature.authorization rbac #326

Merged

Conversation

Josephine-Rutten
Copy link
Collaborator

Add permissions to the authentication so different user roles can have different permissions

@Josephine-Rutten Josephine-Rutten self-assigned this Dec 21, 2023
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: Patch coverage is 62.31884% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 64.66%. Comparing base (34b2287) to head (db8444b).
Report is 10 commits behind head on develop.

❗ Current head db8444b differs from pull request most recent head 7172253. Consider uploading reports for the commit 7172253 to get more accurate results

Files Patch % Lines
src/cnaas_nms/tools/security.py 29.41% 24 Missing ⚠️
src/cnaas_nms/api/app.py 29.16% 17 Missing ⚠️
src/cnaas_nms/api/auth.py 46.15% 7 Missing ⚠️
src/cnaas_nms/tools/rbac/token.py 71.42% 2 Missing ⚠️
src/cnaas_nms/app_settings.py 95.45% 1 Missing ⚠️
src/cnaas_nms/tools/rbac/rbac.py 97.29% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #326      +/-   ##
===========================================
- Coverage    65.06%   64.66%   -0.41%     
===========================================
  Files           70       69       -1     
  Lines         7823     7624     -199     
===========================================
- Hits          5090     4930     -160     
+ Misses        2733     2694      -39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CAFILE: Optional[Path] = "/opt/cnaas/cacert/rootCA.crt"
CAKEYFILE: Path = "/opt/cnaas/cacert/rootCA.key"
CERTPATH: Path = "/tmp/devicecerts/"
JWT_CERT: Path = Path("./opt/cnaas/jwtcert/public.pem")
Copy link
Member

Choose a reason for hiding this comment

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

The path here has an extra . at the beginning causing integration test errors

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

Josephine-Rutten and others added 28 commits February 5, 2024 14:16
make sure to read permission_disabled setting from file before building
default rules
…to help performance a bit with two connections to the same host
…ity server for every request. This makes the API a lot more responsive
…set/sent, to be used for the /auth/refresh endpoint
the callback as well
Add /auth/refresh API endpoint to support using refresh_tokens
…e compatible with client_credentials type clients
… be needed with multiprocess integrationtests
Copy link

sonarcloud bot commented Mar 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@indy-independence indy-independence merged commit 4f504c9 into SUNET:develop Mar 12, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants