Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
Notification
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
System
Notification
Merge requests
!141
disabled spring web security
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
disabled spring web security
disable-spring-web-security-205
into
master
Overview
0
Commits
3
Pipelines
9
Changes
1
Merged
Bhushan Rade
requested to merge
disable-spring-web-security-205
into
master
3 years ago
Overview
0
Commits
3
Pipelines
9
Changes
1
Expand
0
0
Merge request reports
Compare
master
version 1
248e1d94
3 years ago
master (base)
and
latest version
latest version
1112c9dd
3 commits,
3 years ago
version 1
248e1d94
1 commit,
3 years ago
1 file
+
29
−
28
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/security/SecurityConfig.java
+
29
−
28
Options
/* Licensed Materials - Property of IBM */
/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/
package
org.opengroup.osdu.notification.provider.ibm.security
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@Configuration
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
().
authorizeRequests
()
.
antMatchers
(
"/test/challenge/**"
,
"/v1/api-docs"
,
"/configuration/ui"
,
"/swagger-resources/**"
,
"/configuration/security"
,
"/swagger-ui.html"
,
"/info"
,
"/webjars/**"
)
.
permitAll
().
anyRequest
().
authenticated
().
and
().
oauth2ResourceServer
().
jwt
();
}
}
\ No newline at end of file
/* Licensed Materials - Property of IBM */
/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/
package
org.opengroup.osdu.notification.provider.ibm.security
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@Configuration
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
();
// .authorizeRequests()
// .antMatchers("/test/challenge/**",
// "/v1/api-docs",
// "/configuration/ui",
// "/swagger-resources/**",
// "/configuration/security",
// "/swagger-ui.html",
// "/info",
// "/webjars/**")
// .permitAll().anyRequest().authenticated().and().oauth2ResourceServer().jwt();
}
}
Loading