Skip to content
Snippets Groups Projects
Commit a7fe6e08 authored by harshit aggarwal's avatar harshit aggarwal
Browse files

Merge branch 'master' into users/komakkar/core_it_changes

parents 8fb371e5 a7e31835
No related branches found
No related tags found
1 merge request!33Core change: Making topic name configurable in ITs.
Pipeline #14327 failed
...@@ -3,6 +3,9 @@ variables: ...@@ -3,6 +3,9 @@ variables:
AWS_TEST_SUBDIR: testing/register-test-aws AWS_TEST_SUBDIR: testing/register-test-aws
AWS_SERVICE: register AWS_SERVICE: register
AWS_ENVIRONMENT: dev AWS_ENVIRONMENT: dev
IBM_BUILD_SUBDIR: provider/register-ibm
IBM_INT_TEST_SUBDIR: testing/register-test-ibm
include: include:
- project: "osdu/platform/ci-cd-pipelines" - project: "osdu/platform/ci-cd-pipelines"
...@@ -20,6 +23,8 @@ include: ...@@ -20,6 +23,8 @@ include:
- project: 'osdu/platform/ci-cd-pipelines' - project: 'osdu/platform/ci-cd-pipelines'
file: 'cloud-providers/aws.yml' file: 'cloud-providers/aws.yml'
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/ibm.yml"
- project: "osdu/platform/ci-cd-pipelines" - project: "osdu/platform/ci-cd-pipelines"
file: "scanners/gitlab-ultimate.yml" file: "scanners/gitlab-ultimate.yml"
......
...@@ -25,10 +25,16 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur ...@@ -25,10 +25,16 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
@EnableGlobalMethodSecurity(prePostEnabled = true) @EnableGlobalMethodSecurity(prePostEnabled = true)
public class IBMSecurityConfig extends WebSecurityConfigurerAdapter { public class IBMSecurityConfig extends WebSecurityConfigurerAdapter {
@Override @Override
protected void configure(HttpSecurity httpSecurity) throws Exception { protected void configure(HttpSecurity http) throws Exception {
httpSecurity http.csrf().disable()
.httpBasic().disable() .authorizeRequests()
.csrf().disable(); //disable default authN. AuthN handled by endpoints proxy .antMatchers("/test/**","/v1/api-docs",
} "/configuration/ui",
"/swagger-resources/**",
"/configuration/security",
"/swagger-ui.html",
"/webjars/**").permitAll()
.anyRequest().authenticated().and().oauth2ResourceServer().jwt();
}
} }
\ No newline at end of file
...@@ -20,6 +20,8 @@ import static org.junit.Assert.assertEquals; ...@@ -20,6 +20,8 @@ import static org.junit.Assert.assertEquals;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.opengroup.osdu.register.util.IBMTestUtils; import org.opengroup.osdu.register.util.IBMTestUtils;
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.ClientResponse;
...@@ -42,5 +44,32 @@ public class TestRetrieveActionApi extends RetrieveActionApiTest { ...@@ -42,5 +44,32 @@ public class TestRetrieveActionApi extends RetrieveActionApiTest {
public void should_return400_when_makingHttpRequestWithoutToken() throws Exception { public void should_return400_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), ""); ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 401, response.getStatus()); assertEquals(error(response.getEntity(String.class)), 401, response.getStatus());
}
@Override
@Ignore
@Test
public void should_return401_when_noAccessOnCustomerTenantOps() throws Exception {
// TODO Check data partition validation also check cached Action controller Exception
super.should_return401_when_noAccessOnCustomerTenantOps();
}
@Override
@Ignore
@Test
public void should_return401_when_noAccessOnCustomerTenantAdm() throws Exception {
// TODO // TODO Check data partition validation also check cached Action controller Exception
super.should_return401_when_noAccessOnCustomerTenantAdm();
}
@Override
@Ignore
@Test
public void should_return401_when_noAccessOnCustomerTenantEditor() throws Exception {
// TODO // TODO Check data partition validation also check cached Action controller Exception
super.should_return401_when_noAccessOnCustomerTenantEditor();
} }
} }
...@@ -20,6 +20,8 @@ import static org.junit.Assert.assertEquals; ...@@ -20,6 +20,8 @@ import static org.junit.Assert.assertEquals;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.opengroup.osdu.register.util.IBMTestUtils; import org.opengroup.osdu.register.util.IBMTestUtils;
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.ClientResponse;
...@@ -43,4 +45,30 @@ public class TestListTopicsApi extends ListTopicsApiTest { ...@@ -43,4 +45,30 @@ public class TestListTopicsApi extends ListTopicsApiTest {
ClientResponse response = descriptor.run(getId(), ""); ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 401, response.getStatus()); assertEquals(error(response.getEntity(String.class)), 401, response.getStatus());
} }
@Override
@Ignore
@Test
public void should_return401_when_noAccessOnCustomerTenantOps() throws Exception {
// TODO could add data partition validation as this api impl in core module
super.should_return401_when_noAccessOnCustomerTenantOps();
}
@Override
@Ignore
@Test
public void should_return401_when_noAccessOnCustomerTenantAdm() throws Exception {
// TODO could add data partition validation as this api impl in core module
super.should_return401_when_noAccessOnCustomerTenantAdm();
}
@Override
@Ignore
@Test
public void should_return401_when_noAccessOnCustomerTenantEditor() throws Exception {
// TODO could add data partition validation as this api impl in core module
super.should_return401_when_noAccessOnCustomerTenantEditor();
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment