Skip to content

Commit

Permalink
Remove deprecated dependency: `org.springframework.security.oauth:spr…
Browse files Browse the repository at this point in the history
…ing-security-oauth2`

Tests that use the dependency are also deleted.
  • Loading branch information
corneil committed Apr 5, 2022
1 parent 5f2d40c commit 0c44c3d
Show file tree
Hide file tree
Showing 20 changed files with 7 additions and 2,398 deletions.
8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@

<spring-cloud-task.version>2.4.1</spring-cloud-task.version>

<!-- Only used for tests -->
<spring-security-oauth2.version>2.3.7.RELEASE</spring-security-oauth2.version>

<spring-cloud-common-security-config.version>1.8.0-SNAPSHOT</spring-cloud-common-security-config.version>

<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
Expand Down Expand Up @@ -214,11 +211,6 @@
<artifactId>props2yaml</artifactId>
<version>${codearte-props2yml.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>${spring-security-oauth2.version}</version>
</dependency>
<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
<artifactId>json-unit-assertj</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,35 +581,12 @@ uaac user get <username>

For local testing and development, you may also use the Resource and Authorization
Server support provided by
https://projects.spring.io/spring-security-oauth/[Spring Security OAuth]. It
allows you to easily create your own (very basic) OAuth2 Server with the following simple annotations:
https://spring.io/projects/spring-security/[Spring Security]. It
allows you to easily create your own OAuth2 Server by configuring the SecurityFilterChain.

* `@EnableResourceServer`
* `@EnableAuthorizationServer`
Samples can be found at:
https://docs.spring.io/spring-security/reference/samples.html[Spring Security Samples]

NOTE: In fact the UAA uses Spring Security OAuth2 under the covers, thus the basic endpoints
are the same.

A working example application can be found at:
https://github.com/ghillert/oauth-test-server/[https://github.com/ghillert/oauth-test-server/]

Clone the project and configure Spring Cloud Data Flow with the respective Client ID and Client Secret:

[source,yaml]
----
security:
oauth2:
client:
client-id: myclient
client-secret: mysecret
access-token-uri: http://127.0.0.1:9999/oauth/token
user-authorization-uri: http://127.0.0.1:9999/oauth/authorize
resource:
user-info-uri: http://127.0.0.1:9999/me
token-info-uri: http://127.0.0.1:9999/oauth/check_token
----

IMPORTANT: This sample application is not intended for production use

[[configuration-security-shell-authentication]]
==== Data Flow Shell Authentication
Expand Down
10 changes: 3 additions & 7 deletions spring-cloud-starter-dataflow-server/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
Expand Down Expand Up @@ -49,12 +51,6 @@
<artifactId>spring-cloud-dataflow-rest-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>${spring-security-oauth2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

1 comment on commit 0c44c3d

@corneil
Copy link
Contributor Author

@corneil corneil commented on 0c44c3d Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolves #4875

Please sign in to comment.