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(artifacts): authenticate against AuthenticatedRequest.getSpinnakerUser in S3ArtifactStoreGetter #1180

Conversation

dbyron-sf
Copy link
Contributor

@dbyron-sf dbyron-sf commented Apr 27, 2024

instead of SecurityContextHolder.getContext() which might be null. Previously hasAuthorization would only user userId for logging. Now it's used for authentication too. This fixes the bug that #1178 demonstrates.

depends on spinnaker/fiat#1155

The same amount that github actions uses, to avoid errors like:

Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted

FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon has been stopped: JVM garbage collector thrashing and after running out of JVM memory and after running out of JVM memory
…rUser in S3ArtifactStoreGetter

instead of SecurityContextHolder.getContext() which might be null.  Previously
hasAuthorization would only user userId for logging.  Now it's used for authentication
too.  This fixes the bug that spinnaker#1178 demonstrates.
@dbyron-sf dbyron-sf marked this pull request as draft April 27, 2024 01:53
@dbyron-sf dbyron-sf marked this pull request as ready for review April 27, 2024 19:49
Copy link
Contributor

@xibz xibz left a comment

Choose a reason for hiding this comment

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

Looks good!

@dbyron-sf dbyron-sf merged commit 97ea0d3 into spinnaker:master Apr 28, 2024
3 checks passed
@dbyron-sf dbyron-sf deleted the use-UserPermissionEvaluator-in-S3ArtifactStoreGetter branch April 28, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants