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

[backend] add 'unauthorized' in event scope filter values (#8414) #8417

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

Archidoit
Copy link
Member

Proposed changes

Add the 'unauthorized' value in event scope files (in Settings > Activity)

Related issues

#8414

@Archidoit Archidoit added the filigran team use to identify PR from the Filigran team label Sep 19, 2024
@Archidoit Archidoit self-assigned this Sep 19, 2024
@Archidoit Archidoit linked an issue Sep 19, 2024 that may be closed by this pull request
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.19%. Comparing base (1f099b8) to head (a9e61e0).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8417      +/-   ##
==========================================
+ Coverage   66.13%   66.19%   +0.06%     
==========================================
  Files         597      597              
  Lines       60382    60387       +5     
  Branches     6192     6193       +1     
==========================================
+ Hits        39935    39975      +40     
+ Misses      20447    20412      -35     

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

@@ -31,7 +31,7 @@ const HistoryDefinition: AttributeDefinition[] = [
{ name: 'event_type', label: 'Event type', type: 'string', format: 'enum', values: ['authentication', 'read', 'mutation', 'file', 'command'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: true },
{ name: 'event_status', label: 'Event status', type: 'string', format: 'enum', values: ['error', 'success'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: false },
{ name: 'event_access', label: 'Event access', type: 'string', format: 'enum', values: ['extended', 'administration'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: false },
{ name: 'event_scope', label: 'Event scope', type: 'string', format: 'enum', values: ['create', 'update', 'delete', 'read', 'search', 'enrich', 'download', 'import', 'export', 'login', 'logout'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: true },
{ name: 'event_scope', label: 'Event scope', type: 'string', format: 'enum', values: ['create', 'update', 'delete', 'read', 'search', 'enrich', 'download', 'import', 'export', 'login', 'logout', 'unauthorized'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: true },
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I didn't know we had to list the values like this in the attribute definition for static enums. I guess it will fix this specific issue, but I wonder if we shouldn't think of another approach to make sure we maintain correctly this list.

Copy link
Member

Choose a reason for hiding this comment

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

at least put it in a constant EVENT_SCOPE_VALUES = [..] ?

Copy link
Member Author

Choose a reason for hiding this comment

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

if so, it means we put every enum filters in constants.... (event access, event type, event status, maximum retention unit, file scope etc)

@Archidoit Archidoit merged commit f2285e7 into master Sep 20, 2024
6 checks passed
@Archidoit Archidoit deleted the issue/8414 branch September 20, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Activity log - Filter] Missing value in Activity log filters
3 participants