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

Fix API ABAC for access tokens without attributes #1067

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

jraddaoui
Copy link
Collaborator

Make sure we return an empty slice of attributes in the claim if no Enduro attributes are found in the token after parsing, filtering and mapping roles. A nil attributes slice is considered as ABAC disabled in the API endpoints check.

Refs #1066.

Make sure we return an empty slice of attributes in the claim if no
Enduro attributes are found in the token after parsing, filtering and
mapping roles. A nil attributes slice is considered as ABAC disabled
in the API endpoints check.
@jraddaoui jraddaoui self-assigned this Nov 14, 2024
@@ -1284,7 +1284,6 @@ func (w *ProcessingWorkflow) validatePREMIS(
XMLPath: xmlPath,
XSDPath: w.cfg.ValidatePREMIS.XSDPath,
}).Get(activityOpts, &xmlvalidateResult)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added by make lint, I didn't want to create another commit just for it ;)

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.73%. Comparing base (db2346b) to head (55f5dc4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1067      +/-   ##
==========================================
+ Coverage   54.66%   54.73%   +0.07%     
==========================================
  Files         104      104              
  Lines        7632     7631       -1     
==========================================
+ Hits         4172     4177       +5     
+ Misses       3202     3198       -4     
+ Partials      258      256       -2     

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

Copy link
Collaborator

@djjuhasz djjuhasz left a comment

Choose a reason for hiding this comment

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

LGTM @jraddaoui. 👍

@jraddaoui jraddaoui merged commit 55f5dc4 into main Nov 14, 2024
14 checks passed
@jraddaoui jraddaoui deleted the dev/issue-1066-nil-attrs branch November 14, 2024 20:07
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.

2 participants