-
Notifications
You must be signed in to change notification settings - Fork 10
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
Op-21881:CVE-fixes with java-17 and spring-boot upgrade-v4.0 #466
Conversation
… along with CVE fixes-v4.0
… along with CVE fixes-v4.0
gate-core/src/main/groovy/com/netflix/spinnaker/gate/security/anonymous/AnonymousConfig.groovy
Outdated
Show resolved
Hide resolved
gate-core/src/main/groovy/com/netflix/spinnaker/gate/security/anonymous/AnonymousConfig.groovy
Outdated
Show resolved
Hide resolved
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.
remove commented out code
also we have to fix the bean creation here properly.
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.
remove commented out code
also, we have to fix the bean creation here properly.
@Bean | ||
public AuthenticationManager authenticationManager( | ||
AuthenticationConfiguration authConfig) throws Exception { | ||
return authConfig.getAuthenticationManager(); |
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.
do we have getAuthenticationManager
defined in AuthConfig
? but why do we need to have the bean declaration then?
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.
No, it is not defined in AuthConfig
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.
than why it used here authConfig.getAuthenticationManager();
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.
will remove it
gate-ldap/src/main/groovy/com/netflix/spinnaker/gate/security/ldap/LdapSsoConfig.groovy
Show resolved
Hide resolved
import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetails; | ||
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken; | ||
|
||
public class BearerTokenExtractor { |
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.
Attach a java doc explaining where this is needed
SamlAuthTokenUpdateFilter authTokenUpdateFilter = new SamlAuthTokenUpdateFilter() | ||
http.addFilterAfter(authTokenUpdateFilter, | ||
BasicAuthenticationFilter.class) | ||
// saml.init(http) |
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.
cleanup
gate-saml/src/main/groovy/com/netflix/spinnaker/gate/security/saml/SamlSsoConfig.groovy
Show resolved
Hide resolved
|
||
@Slf4j | ||
@ControllerAdvice(basePackageClasses = [OpsmxSaporPolicyController.class, OpsmxAutopilotController.class, | ||
OpsmxAuditClientServiceController.class, OpsmxDashboardController.class, OpsmxPlatformController.class, |
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.
why OpsmxDashboardController has been removed?
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.
will add back
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.
@emanipravallika overall good work, highly appreciated.
Did you test swagger after this upgrade?
Did you test saml config? what was the outcome?
What other auth configs you tested other than ldap?
There are a lot of places where cleanup is needed. I have pointed most of them but you too review them and remove.
@@ -94,60 +96,54 @@ public void authorizeUserForApplicationId( | |||
|
|||
log.debug("authorizing the endpoint : {}", endpointUrl); | |||
|
|||
switch (method) { |
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.
why the switch has been replaced by if-else?
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.
if switch case is used - encountered this error{Incompatible types. Found: 'org.springframework.http.HttpMethod', required: 'char, byte, short, int, Character, Byte, Short, Integer, String, or an enum'}, SO, I replaced with if-else
@@ -182,64 +178,59 @@ public void authorizeUserForServiceId(String username, String endpointUrl, Strin | |||
|
|||
log.info("authorizing the endpoint for service Id : {}", endpointUrl); | |||
|
|||
switch (method) { |
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.
same here
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.
if switch case is used - encountered this error{Incompatible types. Found: 'org.springframework.http.HttpMethod', required: 'char, byte, short, int, Character, Byte, Short, Integer, String, or an enum'}, SO, I replaced with if-else
@@ -13,6 +13,8 @@ | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
//file:noinspection GroovyAssignabilityCheck | |||
//file:noinspection GroovyAccessibility |
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.
cleanup needed??
org.gradle.parallel=true | ||
spinnakerGradleVersion=8.25.0 | ||
targetJava11=true | ||
spinnakerGradleVersion=1-0-SNAPSHOT |
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.
from where did we pick these versions?
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.
From spinnaker gate-oes
gradle.properties
Outdated
spinnakerGradleVersion=8.25.0 | ||
targetJava11=true | ||
spinnakerGradleVersion=1-0-SNAPSHOT | ||
#targetJava11=true |
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.
cleanup needed??
@@ -21,3 +21,4 @@ targetJava11=true | |||
# | |||
#fiatComposite=true | |||
#korkComposite=true | |||
org.gradle.jvmargs=-Xmx6g -Xms6g |
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.
why are we passing JVM args in props? do these shouldn't be part of the run command? how are we sure about the values like 6g?
(https://devopsmx.atlassian.net/browse/OP-21881)