All notable changes to this project will be documented in this file.
- Deleted package
com.sap.xs2.security.container
in order to avoid Class Loader issues, when an application makes use of SAP-libraries using the SAP-internal container lib like CAP.- As already mentioned use
SpringSecurityContext
class instead ofSecurityContext
class.
- As already mentioned use
- Removed deprecated methods:
XsuaaServiceConfiguration.getTokenUrl()
XsuaaToken.getClaimAccessor()
is not required anymore asXsuaa
itself implementsJwtClaimAccessor
.
- Deprecated
TokenBroker
interface and its implementationUaaTokenBroker
, as this is going to be replaced with theOAuth2TokenService
interface which is provided by the newtoken-client
library. If you wish to configure / pass yourRestTemplate
you can pass an instance ofOAuth2TokenService
:
new TokenBrokerResolver(
<<your configuration>>,
<<your cache>>,
new XsuaaOAuth2TokenService(<<your restTemplate>>),
<<your authenticationInformationExtractor>>);
TokenUlrUtils
class is now package protected and will be deleted with version.token-client
library supports basically Password-Grant Access Tokens.
-
We now provide a new slim
token-client
library with aXsuaaTokenFlows
class, which serves as a factory for the different flows (user, refresh and client-credentials). This deprecates the existingToken.requestToken(XSTokenRequest)
API.- The
token-client
library can be used by plain Java applications. - Auto-configuration is provided for Spring Boot applications only, when using XSUAA Spring Boot Starter.
- The
-
ANNOUNCEMENT: Please be aware that with version
2.0.0
we want to get rid of packagecom.sap.xs2.security.container
in order to avoid Class Loader issues, when an application makes use of SAP-libraries using the SAP-internal container lib.
- Provides spring starter for spring-xsuaa, which enables auto-configuration
- Supports reactive ServerHttpSecurity (Spring webflux). Have a look at the (webflux sample application)[samples/spring-webflux-security-xsuaa-usage/README.md]
- Some enhancements for XSUAA integration
- To make sure that the Spring SecurityContext is always initialized with a validated token use
SpringSecurityContext.init()
method as documented here - Use
SpringSecurityContext
instead ofSecurityContext
, which gets deprecated in this version.
- As of version
1.6.0
you need to make use of XSUAA Spring Boot Starter in order to leverage auto-configuration (see "Troubleshoot" section here)
- Supports
jku
URI which is provided as part of the JSON Web Signature (JWS). Thejku
of the Jwt token header references the public key URI of the Xsuaa OAuth Authorization Server, and needs to match to thexsuaa.uaadomain
. - Completely customizable auto-configurations so that apps can override the spring-xsuaa defaults:
- Uses apache slf4j Logger for better log analysis on Cloud Foundry. This is provided with org.springframework.boot:spring-boot-starter-logging.
- Improves and enhances sample application.
- Renames class
TokenImpl
toXsuaaToken
. Furthermore for convenienceXsuaaToken
subclassesorg.springframework.security.oauth2.jwt.Jwt
. - Subclassing of
TokenAuthenticationConverter
is no longer allowed, insteadTokenAuthenticationConverter
can be configured with your ownAuthoritiesExtractor
implementation (an example can be found here). - Please note that the port of the mock web server that is provided with the xsuaa mock library had to be defined statically. It runs now always on port 33195.
- Find more complex examples here: https://github.com/SAP/cloud-application-security-sample
- API method to query token validity
- Bugfix in basic authentication support: allow usage of JWT token or basic authentication with one configuration
- Allows overwrite / enhancement of XSUAA jwt token validators
- Allow applications to initialize of Spring SecurityContext for non HTTP requests. As documented here
- Broker plan validation failed due to incorrect audience validation
- JwtGenerator offers enhancement options: custom claims and audience
- Test framework support for multi tenancy
- Eases enhancement of TokenAuthenticationConverter (issue 23)
- Makes XsuaaAudienceValidator more robust (issue 21)
- XSTokenRequest accepts custom RestTemplate (issue 25)
- Provides spring-xsuaa-test library with JWTGenerator (issue 29)
- Provides spring-xsuaa-mock library with XSUAA authentication mock web server for offline token key validation (issue 30)
- Spring-Security 5 integration libraries. Added AudienceValidator
- Spring-Security 5 Support for basic authentication
- Initial version including spring-security 5 integration libraries
- Initial version of the api for SAP Java Buildpack