Skip to content

Commit

Permalink
Clean up unnecssary codes
Browse files Browse the repository at this point in the history
- Removed SamlExtensionUrlForwardingFilter. Just commented out for now in case we need it later.
- Removed unneeded comments in test code.

[#186986697]

Co-authored-by: Duane May <duane.may@broadcom.com>
  • Loading branch information
hsinn0 and duanemay committed Apr 30, 2024
1 parent 3740582 commit 6272b69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions uaa/src/main/webapp/WEB-INF/spring-servlet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@
key="#{T(org.cloudfoundry.identity.uaa.security.web.SecurityFilterChainPostProcessor.FilterPosition).after(T(org.cloudfoundry.identity.uaa.scim.DisableUserManagementSecurityFilter))}"/>
<entry value-ref="sessionResetFilter"
key="#{T(org.cloudfoundry.identity.uaa.security.web.SecurityFilterChainPostProcessor.FilterPosition).position(102)}"/>
<entry value-ref="SamlExtensionUrlForwardingFilter"
key="#{T(org.cloudfoundry.identity.uaa.security.web.SecurityFilterChainPostProcessor.FilterPosition).before(@oauth2TokenParseFilter)}"/>
<!-- <entry value-ref="SamlExtensionUrlForwardingFilter"-->
<!-- key="#{T(org.cloudfoundry.identity.uaa.security.web.SecurityFilterChainPostProcessor.FilterPosition).before(@oauth2TokenParseFilter)}"/>-->
</map>
</property>
</bean>
Expand Down Expand Up @@ -520,6 +520,6 @@
@config['uaa']['limitedFunctionality']['whitelist']['methods']}"/>
</bean>

<bean id="SamlExtensionUrlForwardingFilter" class="org.cloudfoundry.identity.uaa.provider.saml.SamlExtensionUrlForwardingFilter"></bean>
<!-- <bean id="SamlExtensionUrlForwardingFilter" class="org.cloudfoundry.identity.uaa.provider.saml.SamlExtensionUrlForwardingFilter"></bean>-->

</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.net.URI;

import org.junit.jupiter.api.Disabled;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.test.context.TestPropertySource;
Expand Down Expand Up @@ -35,21 +34,18 @@ void testSamlMetadataRootWithEndingSlash() throws Exception {
}

@Test
// @Disabled("SAML test fails (is /saml/metadata/example working a product requirement?)")
void testSamlMetadataDefaultNoEndingSlash() throws Exception {
mockMvc.perform(get(new URI("/saml/metadata/example")))
.andExpect(status().isOk());
}

@Test
// @Disabled("SAML test fails (is /saml/metadata/example/ working a product requirement?)")
void testSamlMetadataDefaultWithEndingSlash() throws Exception {
mockMvc.perform(get(new URI("/saml/metadata/example/")))
.andExpect(status().isOk());
}

@Test
// @Disabled("SAML test fails (though the endpoint works in real life, so it's a test issue)")
void testSamlMetadataXMLValidation() throws Exception {

mockMvc.perform(get(new URI("/saml/metadata")))
Expand All @@ -74,7 +70,6 @@ class SamlMetadataAlternativeConfigsMockMvcTests {
private MockMvc mockMvc;

@Test
// @Disabled("SAML test fails (though the endpoint works in real life, so it's a test issue)")
void testSamlMetadataAuthnRequestsSignedIsFalse() throws Exception {
mockMvc.perform(get(new URI("/saml/metadata")))
.andDo(print())
Expand Down

0 comments on commit 6272b69

Please sign in to comment.