Releases: SAP/cloud-security-services-integration-library
Releases · SAP/cloud-security-services-integration-library
Version 2.8.5
2.8.5
- [java-security] load environment from
VCAP_SERVICESformatted json file (#471) - [java-security] performance: make sure ServiceLoader loads services only once (#467)
- [java-api] move
getAttributeFromClaimAsStringandgetAttributeFromClaimAsStringListmethods fromAccessTokento itsTokenparent interface.
Version 2.8.4
- [java-security] Make HybridTokenFactory more failure tolerant
- [spring-xsuaa-test] Prefills "ext_atr" "enhancer" with XSUAA
Update Versions
- [all]
- commons-io 2.6 --> 2.8.0
- org.apache.httpcomponents » httpclient 4.5.9 --> 4.5.13
- spring.core.version 5.3.2 --> 5.3.3
- spring.boot.version 2.4.1 --> 2.4.2
- [java-security-test]
- org.eclipse.jetty 9.4.35.v20201120 --> 9.4.36.v20210114
- [token-client]
- caffeine 2.8.6 --> 2.8.8
- org.json 20200518 --> 20201115
- [spring-xsuaa]
- caffeine 2.8.6 --> 2.8.8
- reactor-core 3.3.7.RELEASE --> 3.4.2
- log4j-to-slf4j 2.13.3 --> 2.14.0
Version 2.8.3
- [java-api]
AccessTokenexposes thegetSubaccountId()method. Further information about the usage ofgetSubaccountId()andgetZoneId()can be read here. - [java-api] [java-security] allows hybrid token creation via
Token.create(String encodedToken). The feature is available when using token authenticator. In order to avoidServiceLoaderissues, make sure that you don't mix up different versions of these client libraries. E.g., its not possible to usecom.sap.cloud.security:java-api:2.8.3together withcom.sap.cloud.security:java-security:2.8.2. See also here. - [samples/sap-java-buildpack-api-usage] uses SAP Java Buildpack BoM (sample).
- [token-client]
UserTokenFlowenhances request withX-zidheader that corresponds to zone id.
Version 2.8.2
2.8.2
- [java-security]
- HOTFIX for
2.8.1version. - Beta release of ias2xsuaa token exchange. Further information can be found here.
- HOTFIX for
Version 2.8.1
2.8.1
- [spring-xsuaa]
- Beta release of ias2xsuaa token exchange. Further information can be found here.
- Replaces dependencies to JSON Parser of
net.minidevwithorg.json(fixes #414). - The following dependencies were updated:
- spring.boot.version 2.3.5.RELEASE --> 2.4.1
- spring.core.version 5.2.10.RELEASE --> 5.3.2
- spring.security.version 5.3.5.RELEASE --> 5.4.2
Version 2.8.0
- [java-security]
getClientId()method was added toTokeninterface.getClientId()method should be used instead ofgetClaimAsString(TokenClaims.XSUAA.CLIENT_ID).TokenClaims.XSUAA.CLIENT_IDis deprecated.- Supports IAS token validation.
IAS_SERVICE_NAMEhas not be provided any longer. You can find a sample here.
- [java-security-test] In case you like to overwrite the client id using
JwtGeneratorusingwithClaimValue()orwithClaimValues()method, it's recommended to set theazpclaim instead usingwithClaimValue(TokenClaims.AUTHORIZATION_PARTY, "T000310"). - [spring-xsuaa]
getClientId()method implementation ofTokeninterface has been changed. Usingazpand as fallbackaudandcidclaims to obtain client id.
⚠️ backward incompatible change: usage of deprecated org.springframework.security.oauth:spring-security-oauth2 dependency inOAuth2AuthenticationConverterwas removed.
OAuth2AuthenticationConverter.convert()method return type has changed fromorg.springframework.security.oauth2.provider.OAuth2Authenticationtoorg.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication- Migration tips
- when necessary, org.springframework.security.oauth:spring-security-oauth2 dependency need to be provided explicitly
OAuth2WebSecurityExpressionHandler()won't work in conjunction withOAuth2AuthenticationConverter, as it expectsOAuth2Authenticationclass instead ofBearerTokenAuthenticationwhen deriving authorization claims. UsehasAuthority()orhasAnyAuthority()instead of explicitly definedexpressionHandler(new OAuth2WebSecurityExpressionHandler())andaccess()expression for authorized requests.
- Migration tips
- The following dependency was removed:
- org.springframework.security.oauth:spring-security-oauth2
- The following dependencies were updated:
- spring.boot.version 2.3.4.RELEASE --> 2.3.5.RELEASE
- spring.core.version 5.2.9.RELEASE --> 5.2.10.RELEASE
- spring.security.version 5.3.4.RELEASE --> 5.3.5.RELEASE
- caffeine.version 2.8.2 --> 2.8.6
Version 2.7.8
- [java-security-test] Supports JUnit 5 Tests with
XsuaaExtension,IasExtensionandSecurityTestExtensionas documented here. - [java-security] Does not fail in case of Xsuaa services of type:
apiacess(#382). - [spring-xsuaa-starter] Upgrade Spring versions:
- spring.boot.version: 2.3.1.RELEASE --> 2.3.4.RELEASE
- spring.core.version: 5.2.8.RELEASE --> 5.2.9.RELEASE
- The following dependencies were updated:
- Jetty 9.4.24.v20191120 --> 9.4.31.v20200723
- javax.servlet-api.version 3.0.1 --> 3.1.0
- Apache HTTP client 4.5.8 --> 4.5.9
- Wiremock 2.25.1 --> 2.27.2
Version 2.7.7
2.7.7
- [spring-xsuaa] Update Spring versions
- spring.core.version: 5.2.7.RELEASE --> 5.2.8.RELEASE
- spring.security.version: 5.3.3.RELEASE --> 5.3.4.RELEASE
- [java-security-test]
SecurityTestandSecurityTestRuleprovides a better support for integration tests with a mockserver. It is now possible to upload the configuration and the token from a json file. Take our integration tests as a sample java-security-it. - [java-security]
DefaultJsonObject.getAsStringList(propertyName)parses the JSON object for a given property and returns aStringlist. This works also in case the property is not a JSON array but a JSON String. - [java-security-it] New integration test project. Existing integration tests have been restructured and moved here. Additionally, JWT token validation performance tests have been added for java-security and spring-xsuaa.
Version 2.7.6
- [token-client] Fixes
ClientCredentialsTokenFlow.scopes()andUserTokenFlow.scopes()to support multiple scopes. The scope form parameter has to provide a space-delimited list (and not comma-delimited list). - [java-security] Improve compatibility of
SAPOfflineTokenServicesCloud- There was incompatibility in the implementation of
SAPOfflineTokenServicesCloudthat caused theremoteUserof theHttpServletRequestto always return the client id of the XSUAA service binding. This was changed so that it now works like in the old implementation. This means that theremoteUsernow returns either theuser_nameclaim of the token for user tokens or the value of the client idcidclaim of the token for all other tokens (e.g. client tokens).
- There was incompatibility in the implementation of
Version 2.7.5
2.7.5
- [java-api]
AcessTokenprovidesgetAttributeFromClaimAsString(String claimName, String attributeName)to access for exampleext_attrvalues such assubaccountidgetAttributeFromClaimAsStringList(String claimName, String attributeName)to access for examplexs.user.attributesvalues such ascustom_role
- [java-security] provide debug logs for failing token validation, see troubleshoot.
- [java-security-test] Fixed default value for jku token header to
http://localhost/token_keys - [samples] Upgraded approuter version to "^8.2.0"
- [spring-xsuaa-starter] Upgrade Spring versions:
- spring.boot.version: 2.3.0.RELEASE --> 2.3.1.RELEASE
- spring.core.version: 5.2.6.RELEASE --> 5.2.7.RELEASE
- spring.security.version: 5.3.2.RELEASE --> 5.3.3.RELEASE
- spring-security-oauth2.version: 2.4.1.RELEASE --> 2.5.0.RELEASE