Version 3.0.0
Baseline changes
cloud-security-services-integration-library
requires
- Java 17
- Spring Boot 3.0.x
- Spring security 6.0.x
Breaking Changes
- Identity service configurations need to provide domains via String array in JSON key 'identity.credentials.domains'. Providing String values under key 'identity.credentials.domain' is not supported anymore. IAS configurations from service bindings have been generated like this for a long time already. This should only affect old configuration files manually written for testing.
Removed modules
spring-xsuaa-mock
→ use java-security-test instead
Removed deprecated classes and interfaces
- [api]
XSPrincipal
,XSUserInfoException
→ not needed anymore with new Token interface
- [env]
CFEnvironment
,K8sEnvironment
→ use insteadServiceBindingEnvironment
CFConstants
,K8sConstants
→ use insteadServiceConstants
- [java-security]
XSUserInfo
,XSUserInfoAdapter
→ use instead Token interface andToken#getClaimAsString
with TokenClaims.XSUAA constants to access XSUAA-specific claims.SAPOfflineTokenServicesCloud
→ use instead [spring-security] module
- [spring-xsuaa]
XSTokenRequest
,TokenBroker
,UaaTokenBroker
→ use instead token-client module to fetch XSUAA tokens via XsuaaTokenFlowsTokenBrokerResolver
,AuthenticaionMethod
→ No longer provided. Seespring-security-basic-auth
sample how to write your own implementation.IasXsuaaExchangeBroker
→ Exchange is not supported by XSUAA service anymore.TokenUrlUtils
→ use insteadOAuth2ServiceEndpointsProvider
XsuaaServicesParser
→ use insteadEnvironments#getCurrent
ornew ServiceBindingEnvironment(new SapVcapServicesServiceBindingAccessor(any -> xsuaaConfigJson))
OAuth2AuthenticationConverter
→ Not supported anymore because deprecated by Spring Security: https://github.com/spring-projects/spring-security/wiki/OAuth-2.0-Migration-Guide
- [token-client]
UserTokenFlow
→ use insteadJwtBearerTokenFlow
Removed deprecated methods
- [java-security]
OAuth2TokenKeyServiceWithCache#withCacheTime
,OAuth2TokenKeyServiceWithCache#withCacheSize
→ use insteadOAuth2TokenKeyServiceWithCache#withCacheConfiguration
SAPOfflineTokenServicesCloud#SAPOfflineTokenServicesCloud(OAuth2ServiceConfiguration)
→
- [java-security-test]
SecurityTestRule#getConfigurationBuilderFromFile
→ use insteadSecurityTestRule#getOAuth2ServiceConfigurationBuilderFromFile
SecurityTestRule#getWireMockRule
→ use insteadSecurityTestRule#getWireMockServer
- [spring-xsuaa]
Token#getExpirationDate
→ use insteadToken#getExpiration
- [spring-xsuaa-test]
Base64JwtDecoder#Base64JwtDecoder
→ use insteadBase64JwtDecoder#getInstance
- [token-client]
XsuaaTokenFlows#userTokenFlow
→ use insteadXsuaaTokenFlows#jwtBearerTokenFlow
OAuth2TokenService#retrieveAccessTokenViaUserTokenGrant
→ use insteadOAuth2TokenService#retrieveAccessTokenViaJwtBearerTokenGrant
OAuth2TokenService#retrieveAccessTokenViaClientCredentialsGrant(URI, ClientIdentity, String, Map, boolean)
→ use instead OAuth2TokenService#retrieveAccessTokenViaClientCredentialsGrant with null for argumentsubdomain
DefaultOAuth2TokenService#DefaultOAuth2TokenService
→ use insteadDefaultOAuth2TokenService#DefaultOAuth2TokenService(CloseableHttpClient)
XsuaaOAuth2TokenService#XsuaaOAuth2TokenService
→ use insteadXsuaaOAuth2TokenService#XsuaaOAuth2TokenService(CloseableHttpClient)
DefaultOAuth2TokenService#DefaultOAuth2TokenService(TokenCacheConfiguration)
→ use insteadDefaultOAuth2TokenService#DefaultOAuth2TokenService(CloseableHttpClient, TokenCacheConfiguration)
XsuaaOAuth2TokenService#XsuaaOAuth2TokenService(TokenCacheConfiguration)
→ use insteadXsuaaOAuth2TokenService#XsuaaOAuth2TokenService(CloseableHttpClient, TokenCacheConfiguration)
XsuaaDefaultEndpoints#XsuaaDefaultEndpoints(URI)
,XsuaaDefaultEndpoints#XsuaaDefaultEndpoints(String)
→ use insteadXsuaaDefaultEndpoints#XsuaaDefaultEndpoints(String, String)
OAuth2TokenResponse#getExpiredAtDate
→ use insteadOAuth2TokenResponse#getExpiredAt
Base64JwtDecoder#Base64JwtDecoder
→ use insteadBase64JwtDecoder#getInstance
Removed deprecated fields
- [java-api]
GrantType#USER_TOKEN
→ use insteadGrantType#JWT_BEARER
- [token-client]
OAuth2TokenServiceConstants#GRANT_TYPE_USER_TOKEN
→ use insteadGrantType#JWT_BEARER
- [spring-xsuaa]
Token#GRANTTYPE_CLIENTCREDENTIAL
→ use insteadGrantType#CLIENT_CREDENTIALS