Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Register
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Register
Commits
58425c4a
Commit
58425c4a
authored
3 years ago
by
Bhushan Rade
Browse files
Options
Downloads
Patches
Plain Diff
disabled spring web security
parent
77c76402
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!133
disabled spring web security
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
provider/register-ibm/src/main/java/org/opengroup/osdu/register/provider/ibm/security/IBMSecurityConfig.java
+27
-27
27 additions, 27 deletions
...sdu/register/provider/ibm/security/IBMSecurityConfig.java
with
27 additions
and
27 deletions
provider/register-ibm/src/main/java/org/opengroup/osdu/register/provider/ibm/security/IBMSecurityConfig.java
+
27
−
27
View file @
58425c4a
/* Licensed Materials - Property of IBM */
/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/
package
org.opengroup.osdu.register.provider.ibm.security
;
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.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@EnableWebSecurity
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
IBMSecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
()
.
authorizeRequests
()
.
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
/* Licensed Materials - Property of IBM */
/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/
package
org.opengroup.osdu.register.provider.ibm.security
;
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.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@EnableWebSecurity
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
IBMSecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
();
// .authorizeRequests()
// .antMatchers("/test/**","/v1/api-docs",
// "/configuration/ui",
// "/swagger-resources/**",
// "/configuration/security",
// "/swagger-ui.html",
// "/webjars/**").permitAll()
// .anyRequest().authenticated().and().oauth2ResourceServer().jwt();
}
}
This diff is collapsed.
Click to expand it.
Morris Estepa
@estepamo
mentioned in commit
9b6eaa9c
·
2 years ago
mentioned in commit
9b6eaa9c
mentioned in commit 9b6eaa9cabc1af6538b17b6f76382473f6467c69
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment