Releases: SAP/cloud-security-services-integration-library
Releases · SAP/cloud-security-services-integration-library
Version 2.8.3
- [java-api]
AccessToken
exposes 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 avoidServiceLoader
issues, 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.3
together 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]
UserTokenFlow
enhances request withX-zid
header that corresponds to zone id.
Version 2.8.2
2.8.2
- [java-security]
- HOTFIX for
2.8.1
version. - 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.minidev
withorg.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 toToken
interface.getClientId()
method should be used instead ofgetClaimAsString(TokenClaims.XSUAA.CLIENT_ID)
.TokenClaims.XSUAA.CLIENT_ID
is deprecated.- Supports IAS token validation.
IAS_SERVICE_NAME
has not be provided any longer. You can find a sample here.
- [java-security-test] In case you like to overwrite the client id using
JwtGenerator
usingwithClaimValue()
orwithClaimValues()
method, it's recommended to set theazp
claim instead usingwithClaimValue(TokenClaims.AUTHORIZATION_PARTY, "T000310")
. - [spring-xsuaa]
getClientId()
method implementation ofToken
interface has been changed. Usingazp
and as fallbackaud
andcid
claims to obtain client id.
⚠️ backward incompatible change: usage of deprecated org.springframework.security.oauth:spring-security-oauth2 dependency inOAuth2AuthenticationConverter
was removed.
OAuth2AuthenticationConverter.convert()
method return type has changed fromorg.springframework.security.oauth2.provider.OAuth2Authentication
toorg.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 expectsOAuth2Authentication
class instead ofBearerTokenAuthentication
when 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
,IasExtension
andSecurityTestExtension
as 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]
SecurityTest
andSecurityTestRule
provides 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 aString
list. 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
SAPOfflineTokenServicesCloud
that caused theremoteUser
of theHttpServletRequest
to 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 theremoteUser
now returns either theuser_name
claim of the token for user tokens or the value of the client idcid
claim 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]
AcessToken
providesgetAttributeFromClaimAsString(String claimName, String attributeName)
to access for exampleext_attr
values such assubaccountid
getAttributeFromClaimAsStringList(String claimName, String attributeName)
to access for examplexs.user.attributes
values 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
Version 2.7.4
2.7.4
- [java-security] Audience Validation validates to true when the derived
client_id
of broker-clone token matches the trusted client. This is relevant to support tokens of grant typeuser_token
that contains no scopes.
Version 2.7.3
2.7.3
- [java-security]
- Audience Validation is skipped when
client_id
of token matches the trusted client. This is relevant to support tokens of grant typeuser_token
that contains no scopes. - provides the subaccount identifier from the
ext_attr
claim.
- Audience Validation is skipped when
- [spring-xsuaa] provides the subaccount identifier from the
ext_attr
claim.