Skip to content

Commit

Permalink
Revert "No permission check for token exchange with audience"
Browse files Browse the repository at this point in the history
This reverts commit 8bf5506.
  • Loading branch information
cgeorgilakis-grnet committed Jun 13, 2024
1 parent 8bf5506 commit 0b1291e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ Full Keycloak upstream jira issue can be shown if filtered by Fix version.

Our Keycloak version is working well with PostgreSQL database. For using other SQL databases, text field in database need to be evaluated.

## [Unreleased]
### Changed
- No permission check for token exchange with audience

## [18.0.1-2.17] - 2023-10-10
### Fixed
- Fix refresh flow with scope parameter problem[Feedback from CESNET about EOSC Keycloak federation support](https://trello.com/c/VTJNB9Gu/2116-feedback-from-cesnet-about-eosc-keycloak-federation-support)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<jboss.snapshots.repo.url>https://s01.oss.sonatype.org/content/repositories/snapshots/</jboss.snapshots.repo.url>

<quarkus.version>2.7.5.Final</quarkus.version>
<eosc-kc.version>${project.version}-2.18rc1</eosc-kc.version>
<eosc-kc.version>${project.version}-2.17</eosc-kc.version>

<!--
Performing a Wildfly upgrade? Run the:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ protected Response exchangeToIdentityProvider(UserModel targetUser, UserSessionM
event.error(Errors.UNKNOWN_IDENTITY_PROVIDER);
throw new CorsErrorResponseException(cors, OAuthErrorException.INVALID_REQUEST, "Issuer does not support token exchange", Response.Status.BAD_REQUEST);
}
// if (!AdminPermissions.management(session, realm).idps().canExchangeTo(client, providerModel)) {
// event.detail(Details.REASON, "client not allowed to exchange for requested_issuer");
// event.error(Errors.NOT_ALLOWED);
// throw new CorsErrorResponseException(cors, OAuthErrorException.ACCESS_DENIED, "Client not allowed to exchange", Response.Status.FORBIDDEN);
// }
if (!AdminPermissions.management(session, realm).idps().canExchangeTo(client, providerModel)) {
event.detail(Details.REASON, "client not allowed to exchange for requested_issuer");
event.error(Errors.NOT_ALLOWED);
throw new CorsErrorResponseException(cors, OAuthErrorException.ACCESS_DENIED, "Client not allowed to exchange", Response.Status.FORBIDDEN);
}
Response response = ((ExchangeTokenToIdentityProviderToken)provider).exchangeFromToken(session.getContext().getUri(), event, client, targetUserSession, targetUser, formParams);
return cors.builder(Response.fromResponse(response)).build();

Expand Down

0 comments on commit 0b1291e

Please sign in to comment.