-
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
feat: add site audit logs generator #1181
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ResultAsync.combine( | ||
repoNames.map((repoName) => { | ||
const userSessionData = new UserWithSiteSessionData({ | ||
githubId: user.githubId, |
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.
what if this doesnt exist? ie an admin that uses this form that only has email sites?
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.
It would be set to undefined, but that is not used anyway since we rely on the accessToken from TokenService.
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 confusing to me :(
if it is not needed here, why declare it? doesnt seem like a necessary key too
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.
My bad, it is defined and is needed because of this control flow:
isomercms-backend/src/classes/UserSessionData.ts
Lines 32 to 35 in 24658ec
if (this.isGithubProps(props)) { | |
this.githubId = props.githubId | |
this.accessToken = props.accessToken | |
} |
Otherwise, it would not be possible for us to set the accessToken for the request.
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.
wait this is an issue right? not all users have a github id, wouldnt this then fail for those users?
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.
Adjusted in ae8410a.
7c7ea3f
to
e2e5945
Compare
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.
only real blocking is the error messages returned to agency users
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.
only blocking is in verifying that non gh users admin users should be able to use this form to get their site's audit logs
Problem
Site audit logs are manually created using some script that we have, which brings a lot of overhead and is not an ideal long-term solution.
Solution
Breaking Changes
Features:
Tests
Deploy Notes
New environment variables:
SITE_AUDIT_LOGS_FORM_KEY
: Secret key for the site audit logs formfetch_ssm_parameters.sh
)Additional steps
/efs/audit-logs
folder on EFS.