Skip to content

[backend] feat(audit-logging): avoid fetching user to improv performance (#5480)#5921

Open
RomuDeuxfois wants to merge 1 commit into
mainfrom
issue/5480-introduce-email-in-principal
Open

[backend] feat(audit-logging): avoid fetching user to improv performance (#5480)#5921
RomuDeuxfois wants to merge 1 commit into
mainfrom
issue/5480-introduce-email-in-principal

Conversation

@RomuDeuxfois
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 24, 2026 18:47
@github-actions github-actions Bot added the filigran team use to identify PR from the Filigran team label May 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the OpenAEVPrincipal abstraction to expose the authenticated user’s email directly from the security principal, which supports avoiding additional User fetches in downstream concerns like audit logging.

Changes:

  • Add getEmail() to OpenAEVPrincipal.
  • Implement getEmail() across SAML/OIDC/OAuth2 principals and DefaultOpenAEVPrincipal.
  • Extend DefaultOpenAEVPrincipal to carry the email value.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
openaev-api/src/main/java/io/openaev/config/OpenAEVSaml2User.java Delegate getEmail() to underlying User.
openaev-api/src/main/java/io/openaev/config/OpenAEVPrincipal.java Add getEmail() to the principal contract.
openaev-api/src/main/java/io/openaev/config/OpenAEVOidcUser.java Delegate getEmail() to underlying User.
openaev-api/src/main/java/io/openaev/config/OpenAEVOAuth2User.java Delegate getEmail() to underlying User.
openaev-api/src/main/java/io/openaev/config/OpenAEVAnonymous.java Implement getEmail() for anonymous principal (currently returns null).
openaev-api/src/main/java/io/openaev/config/DefaultOpenAEVPrincipal.java Store email and expose it via getEmail(); constructor signature updated.

Comment thread openaev-api/src/main/java/io/openaev/config/OpenAEVPrincipal.java
Comment thread openaev-api/src/main/java/io/openaev/config/OpenAEVAnonymous.java Outdated
@RomuDeuxfois RomuDeuxfois force-pushed the issue/5480-introduce-email-in-principal branch from 783fc66 to bd31ea9 Compare May 24, 2026 20:39
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.

2 participants