Skip to content

Commit 2c6f46b

Browse files
fix: Correct token exchange logic for App2App flows in DefaultIdTokenExtension (#1931)
The isAccessToken() method had inverted logic that prevented proper token exchange for App2App scenarios. Tokens with a single audience different from the client ID (aud != azp) now correctly trigger token exchange, while internal tokens (aud == azp) are properly recognized and skip exchange. This fixes scenarios where App2App access tokens were incorrectly treated as ID tokens and bypassed the necessary exchange flow. Version bumped to 3.6.9 for bugfix release.
1 parent dbd78a8 commit 2c6f46b

35 files changed

Lines changed: 50 additions & 46 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 3.6.9
5+
6+
- Fix token exchange logic in `DefaultIdTokenExtension` to correctly identify App2App tokens that require exchange (where `aud` contains a single audience different from `azp`)
7+
48
## 3.6.8
59

610
- Fix hybrid authentication issue where IAS Configuration was incorrectly used for XSUAA token exchange instead of XSUAA Configuration in `HybridIdentityServicesAutoConfiguration`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ The SAP Cloud Security Services Integration is published to maven central: https
220220
<dependency>
221221
<groupId>com.sap.cloud.security</groupId>
222222
<artifactId>java-bom</artifactId>
223-
<version>3.6.8</version>
223+
<version>3.6.9</version>
224224
<scope>import</scope>
225225
<type>pom</type>
226226
</dependency>

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<groupId>com.sap.cloud.security</groupId>
1010
<artifactId>java-bom</artifactId>
11-
<version>3.6.8</version>
11+
<version>3.6.9</version>
1212
<packaging>pom</packaging>
1313
<name>java-bom</name>
1414

env/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<groupId>com.sap.cloud.security.xsuaa</groupId>
1111
<artifactId>parent</artifactId>
12-
<version>3.6.8</version>
12+
<version>3.6.9</version>
1313
</parent>
1414

1515
<groupId>com.sap.cloud.security</groupId>

java-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<dependency>
66
<groupId>com.sap.cloud.security</groupId>
77
<artifactId>java-api</artifactId>
8-
<version>3.6.8</version>
8+
<version>3.6.9</version>
99
</dependency>
1010
```

java-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<groupId>com.sap.cloud.security.xsuaa</groupId>
1111
<artifactId>parent</artifactId>
12-
<version>3.6.8</version>
12+
<version>3.6.9</version>
1313
</parent>
1414

1515
<groupId>com.sap.cloud.security</groupId>

java-security-it/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<artifactId>parent</artifactId>
1111
<groupId>com.sap.cloud.security.xsuaa</groupId>
12-
<version>3.6.8</version>
12+
<version>3.6.9</version>
1313
</parent>
1414

1515
<artifactId>java-security-it</artifactId>

java-security-test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ It is pre-configured with a security filter that only accepts valid tokens. Furt
4040
<dependency>
4141
<groupId>com.sap.cloud.security</groupId>
4242
<artifactId>java-security-test</artifactId>
43-
<version>3.6.8</version>
43+
<version>3.6.9</version>
4444
<scope>test</scope>
4545
</dependency>
4646
```

java-security-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<groupId>com.sap.cloud.security.xsuaa</groupId>
1111
<artifactId>parent</artifactId>
12-
<version>3.6.8</version>
12+
<version>3.6.9</version>
1313
</parent>
1414

1515
<groupId>com.sap.cloud.security</groupId>

java-security/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Since it requires the Tomcat 10 runtime, it needs to be deployed using the [SAP
6969
<dependency>
7070
<groupId>com.sap.cloud.security</groupId>
7171
<artifactId>java-security</artifactId>
72-
<version>3.6.8</version>
72+
<version>3.6.9</version>
7373
</dependency>
7474
<dependency>
7575
<groupId>org.apache.httpcomponents</groupId>

0 commit comments

Comments
 (0)