cloud-security-services-integration-library

Integration libraries and samples for authenticating users and clients bound to XSUAA authentication and authorization service or Identity authentication service.

APACHE-2.0 License

Stars
141
Committers
45

Bot releases are hidden (Show)

cloud-security-services-integration-library - Version 3.4.1 Latest Release

Published by liga-oz 6 months ago

  • [spring-security] fixes a NPE bug introduced in the IasJwtDecoder when the incoming request does not
    contain x-forwarded-client-cert header

Dependency upgrades

  • Bumps spring.boot.version from 3.2.4 to 3.2.5.
  • Bumps slf4j.api.version from 2.0.12 to 2.0.13
  • Bumps spring.security.version from 6.2.3 to 6.2.4.
cloud-security-services-integration-library - Version 2.17.5

Published by liga-oz 6 months ago

Dependency upgrades

  • bump spring-core version to 5.3.34
  • bump spring-security version to 5.8.12
cloud-security-services-integration-library - Version 2.17.4

Published by liga-oz 6 months ago

Dependency Upgrades

  • bump spring-core version to 5.3.33
  • bump spring-security version to 5.8.11
  • bump og4j2.version to 2.23.1
  • bump commons io version to 2.16.1
  • bump org.json.version to 20240303
  • bump sap.cloud.env.servicebinding.version to 0.10.4
cloud-security-services-integration-library - Version 3.4.0

Published by liga-oz 6 months ago

  • [java-api] SecurityContext has been extended with a thread local storage for Service
    Plans. setServicePlans(), getServicePlans(), clearServicePlans() methods have been added.
  • [java-security]
    • added support for Identity Service Proof Token validation. Proof Token validation can be enabled by
      calling JwtValidatorBuilder.enableProofTokenCheck(). Once enabled, it will forward the X509 client certificate from the
      request header x-fowarded-client-cert as x-client_cert header to the /oauth2/token_keys endpoint.
    • DefaultOAuth2TokenKeyService saves the service plans from response header x-osb_plan (identity broker service plan)
      in the new SecurityContext thread local storage for Service Plans. The header should be available when proof token validation is enabled.
      In this case, a x-client_cert is sent in the request to /oauth2/token_keys which should trigger the x-osb_plan response header.
  • [spring-security] fixes a bug in ReactiveHybridJwtDecoder when parsing iat claim #1490

Dependency upgrades

  • Bump commons-io:commons-io from 2.15.1 to 2.16.1
  • Bump spring.boot.version from 3.2.2 to 3.2.4
  • Bump spring.core.version from 6.1.5 to 6.1.6
  • Bump io.projectreactor:reactor-core from 3.6.2 to 3.6.5
  • Bump com.sap.cloud.environment.servicebinding:java-bom from
    0.10.3 to 0.10.4
  • Bump spring.security.version from 6.2.1 to 6.2.3
  • Bump org.springframework:spring-web from 6.1.4 to 6.1.5
  • Bump org.json:json from 20240205 to 20240303
cloud-security-services-integration-library - Version 3.3.5

Published by liga-oz 8 months ago

  • [spring-xsuaa] fixes a NPE bug in XsuaaJwtDecoder when uaadomain value is null
  • [spring-security] reactive token validation supported with a help of ReactiveSecurityContext
    and ReactiveHybridJwtDecoder to allow more versatile use of spring-security library, also
    see spring-security ReadMe.md
  • [samples]

Dependency upgrades

  • Bump com.sap.cloud.environment.servicebinding from 0.10.2 to 0.10.3
  • Bump slf4j.api.version from 2.0.11 to 2.0.12
  • Bump org.json:json from 20231013 to 20240205
  • Bump org.apache.httpcomponents.client5:httpclient5 from 5.3 to 5.3.1
  • Bump spring.boot.version from 3.2.1 to 3.2.2
  • Bump spring.core.version from 6.1.3 to 6.1.4
cloud-security-services-integration-library - Version 2.17.3

Published by liga-oz 9 months ago

  • [java-security]
    • add name property of service binding as property to OAuth2ServiceConfiguration
    • reduce HybridTokenFactory logging noise - in case of missing service configuration warn message will be logged just once
  • [java-api]
    • add ServiceConstant#NAME which can be used to access that property
  • [env]
    • service plan property is no longer uppercased when building OAuth2ServiceConfiguration from service bindings of the environment
  • [spring-security]
    • fixes a bug in which a second XSUAA configuration of plan "broker" was ignored in spring-security auto-configuration for versions >= 2.16.0 and < 2.17.3
    • add setName getName, setPlan, getPlan to OAuth2ServiceConfigurationProperties, which means, the list of XsuaaServiceConfigurations can now be filtered based on these properties.
  • [token-client]
    • remove httpclient caching from DefaultHttpClientFactory (#1416)ybr

Dependency upgrades

  • bump spring-core version to 5.3.31
  • bump spring-security version to 5.8.9
  • bump commons io version to 2.15.1
cloud-security-services-integration-library - Version 3.3.4

Published by liga-oz 9 months ago

  • [env] service plan property is no longer uppercased when building OAuth2ServiceConfiguration from service bindings of the environment
  • [spring-security] fixes a bug in which a second XSUAA configuration of plan "broker" was ignored in spring-security auto-configuration for versions 3.3.2 and 3.3.3

Dependency upgrades

  • Bump io.projectreactor:reactor-core from 3.6.1 to 3.6.2
  • Bump spring.core.version from 6.1.2 to 6.1.3
  • Bump slf4j.api.version from 2.0.10 to 2.0.11
cloud-security-services-integration-library - Version 3.3.3

Published by liga-oz 10 months ago

  • [java-security]
    • reduce HybridTokenFactory logging noise - in case of missing service configuration warn message will be logged just once
    • upgrade jetty ee9 to jetty ee10
  • [java-security-test]
    • fixes version mismatch issue when jetty BoM is used
    • JwtGenerator ensures that claims are always in the same order
  • [token-client]
    • remove httpclient caching from DefaultHttpClientFactory (#1416)

Dependency upgrades

  • Bump spring.boot.version from 3.2.0 to 3.2.1
  • Bump spring.core.version from 6.0.14 to 6.1.2
  • Bump log4j2.version from 2.22.0 to 2.22.1
  • Bump slf4j.api.version from 2.0.9 to 2.0.10
cloud-security-services-integration-library - Version 3.3.2

Published by liga-oz 10 months ago

  • [java-security]
    • add name property of service binding as property to OAuth2ServiceConfiguration
  • [java-api]
    • add ServiceConstant#NAME which can be used to access that property
  • [spring-security]
    • IdentityServicesPropertySourceFactory now populates Spring properties with ALL Xsuaa configurations found in the environment instead of only one (arbitrary) configuration of service plan 'application' and one (optional, arbitrary) additional one of service plan 'broker'.
    • XsuaaServiceConfigurations#getConfigurations now contains ALL Xsuaa configurations found as a result of the previous change
    • HybridIdentityServicesAutoConfiguration was adjusted for backward compatibility to still create a JwtDecoder that uses the same XSUAA configurations as before for token validation (one of plan 'application' and an optional one of plan 'broker')
    • add setName getName, setPlan, getPlan to OAuth2ServiceConfigurationProperties, which means, the list of XsuaaServiceConfigurations can now be filtered based on these properties.
  • [java-security-test]
    • upgrade the Jetty servlet to jetty-ee9-servlet (fixes issues with the Spring Boot 3.2 upgrade)

Dependency upgrades

  • Bump spring.boot.version from 3.1.6 to 3.2.0
  • Bump spring.core.version from 6.0.14 to 6.1.2
  • Bump spring.security.version from 6.2.0 to 6.2.1
  • Bump commons-io:commons-io from 2.15.0 to 2.15.1
  • Bump org.apache.httpcomponents.client5:httpclient5 from 5.2.3 to 5.3
  • Bump log4j2.version from 2.21.1 to 2.22.0
  • Bump io.projectreactor:reactor-core from 3.5.11 to 3.6.0
  • Bump org.eclipse.jetty:jetty-bom from 11.0.18 to 12.0.5
cloud-security-services-integration-library - Version 3.3.1

Published by liga-oz 11 months ago

✅ Resolves a Breaking Change introduced in version 3.3.0. Consumers should be able to update to 3.3.1 from a version < 3.3.0 without having to adjust test credentials used in their unit tests when using java-security-test or spring-xsuaa-mock.

In version 3.3.1, when java-security-test is loaded (which should only occur during testing), credentials with localhost as the uaadomain (XSUAA) or trusted domains (IAS) can be used to validate tokens that include a port for localhost in their jku (XSUAA) or issuer (IAS). It's important to note that token validation is less strict in this case and may accept certain edge cases of malicious tokens that would not be accepted in a production environment.

Dependency upgrades

  • Bump spring.boot.version from 3.1.5 to 3.1.6
  • Bump spring.core.version from 6.0.13 to 6.0.14
  • Bump spring.security.version from 6.1.5 to 6.2.0
  • Bump apache.httpclient5.version from 5.2.1 to 5.2.3
  • Bump wiremock.version from 3.0.0-beta-10 to 3.3.1 and replace org.wiremock.wiremock-standalone with com.github.tomakehurst.wiremock
  • Bump logback-core, logback-classic from 1.4.6 to 1.4.14
cloud-security-services-integration-library - Version 2.17.2

Published by liga-oz 11 months ago

✅ Resolves a Breaking Change introduced in version 2.17.0. Consumers should be able to update to 2.17.2 from a version <= 2.16.0 without having to adjust test credentials used in their unit tests when using java-security-test or spring-xsuaa-mock.

In version 2.17.2, when java-security-test or spring-xsuaa-mock are loaded (which should only occur during testing), credentials with localhost as the uaadomain (XSUAA) or trusted domains (IAS) can be used to validate tokens that include a port for localhost in their jku (XSUAA) or issuer (IAS). It's important to note that token validation is less strict in this case and may accept certain edge cases of malicious tokens that would not be accepted in a production environment.

Dependency upgrades

  • Bump logback-core, logback-classic from 1.2.12 to 1.2.13
cloud-security-services-integration-library - Version 2.17.1

Published by liga-oz 11 months ago

Dependency upgrades

  • Bump spring.boot.version from 2.7.17 to 2.7.18
cloud-security-services-integration-library - Version 3.3.0

Published by liga-oz 11 months ago

  • [java-security-test] ⚠️ Breaking Change To validate mocked XSUAA tokens issued by java-security-test module, the uaadomain property of the service configuration must now include the port of the Wiremock server.
    Likewise for validating IAS tokens, the trusted domains array of the service configuration also needs to include the Wiremock URL including the port.
    The full wiremock URL is available via SecurityTestContext#getWireMockServer#baseUrl.

    Note: If you are building your configuration via SecurityTestContext#getOAuth2ServiceConfigurationBuilderFromFile, this will already be preconfigured correctly, but you must not overwrite these properties with only "localhost".

  • [java-security]

    • [XSUAA/IAS] Adapt optimized server API
  • [spring-xsuaa]

    • Adapt optimized server API
cloud-security-services-integration-library - Version 2.17.0

Published by liga-oz 11 months ago

⚠️ when using java-security-test module you might need to adjust the uaadomain in the service configuration with a port where the wiremock token key server is running on. e.g. it should be changed from localhost --> http://localhost:XXXX (you can access wiremock token key server address using testRule.getWiremockServer().baseUrl())

  • [java-security]
    • [XSUAA/IAS] Adapt optimized server API
  • [spring-xsuaa]
    • Adapt optimized server API
cloud-security-services-integration-library - Version 2.16.0

Published by finkmanAtSap 11 months ago

  • [env]
    • add Environment#getServiceConfigurationsAsList to retrieve all service configurations as lists mapped by service (XSUAA/IAS)
  • [spring-security]
    • IdentityServicesPropertySourceFactory now populates Spring properties with ALL Xsuaa configurations found in the environment instead of only one (arbitrary) configuration of service plan 'application' and one (optional, arbitrary) additional one of service plan 'broker'.
    • XsuaaServiceConfigurations#getConfigurations now contains ALL Xsuaa configurations found as a result of the previous change
    • HybridIdentityServicesAutoConfiguration was adjusted for backward compatibility to still create a JwtDecoder that uses the same XSUAA configurations as before for token validation (one of plan 'application' and an optional one of plan 'broker')

Dependency upgrades

  • Bump spring.security.version from 5.8.7 to 5.8.8
  • Bump spring.boot.version from 2.7.16 to 2.7.17
  • Bump log4j2 from 2.20.0 to 2.21.1
  • Bump com.sap.cloud.environment.servicebinding from 0.10.0 to 0.10.1
  • Bump commons-io from 2.14.0 to 2.15.0
cloud-security-services-integration-library - Version 2.15.0

Published by liga-oz 12 months ago

🔥 Hot fix for the CVE-2023-5072

  • [java-security]
    • add x-azp header to IAS JWKS fetching and adjust JWKS cache key
    • OAuth2TokenKeyService and OAuth2TokenKeyServiceWithCache
      • Refactor API to use generic Map instead of explicit IAS-specific parameters

Dependency upgrades

  • Bump org.json.version from 20230618 to 20231013
  • Bump spring.security.version from 5.8.6 to 5.8.7
  • Bump spring.boot.version from 2.7.15 to 2.7.16
  • Bump spring.core.version from 5.3.29 to 5.3.30
  • Bump reactor-core from 3.4.32 to 3.4.33
  • Bump com.sap.cloud.environment.servicebinding 0.9.0 to 0.10.0
  • Bump commons-io from 2.13.0 to 2.14.0
cloud-security-services-integration-library - Version 3.2.1

Published by liga-oz 12 months ago

🔥 Hot fix for the CVE-2023-5072

Dependency upgrades

  • Bump spring.boot.version from 3.1.4 to 3.1.5
  • Bump log4j2.version from 2.20.0 to 2.21.0
  • Bump spring.security.version from 6.1.4 to 6.1.5
  • Bump org.json:json from 20230618 to 20231013
cloud-security-services-integration-library - Version 3.2.0

Published by liga-oz about 1 year ago

  • [java-security]
    • add x-azp header to IAS JWKS fetching
    • adjust JWKS cache key for OAuth2TokenKeyService and OAuth2TokenKeyServiceWithCache
    • Refactor API to use generic Map instead of explicit IAS-specific parameters

Dependency upgrades

  • Bump io.projectreactor:reactor-core from 3.5.9 to 3.5.11
  • Bump spring.core.version from 6.0.11 to 6.0.13
  • Bump spring.security.version from 6.1.3 to 6.1.4
  • Bump commons-io:commons-io from 2.13.0 to 2.14.0
  • Bump com.sap.cloud.environment.servicebinding from 0.9.0 to 0.10.0
  • Bump spring.boot.version from 3.1.3 to 3.1.4
  • Bump slf4j.api.version from 2.0.7 to 2.0.9
cloud-security-services-integration-library - Version 3.1.3

Published by liga-oz about 1 year ago

  • [java-security]
    • Fixes NPE when accessing XsuaaToken.getPrincipal() and grantType is null (#1261)
  • [token-client]
    • fixes JWKs fetch from identity service issue when app_tid is not present in the token - the X-app_tid and X-client_id headers are only added when both values are available.
    • DefaultOAuth2TokenService
      • fixes issue when in case of unsuccessful token fetch OAuth2ServiceException.withHeaders() headers field were filled with only one entry containing all headers as a string
    • DefaultOAuth2TokenKeyService and SpringOAuth2TokenKeyService
      • improved error handling
        • OAuth2ServiceException that's thrown status code != 200 case doesn't get swallowed
        • fixes OAuth2ServiceException.withHeaders() semantically incorrect behavior when headers were filled with request headers instead of response headers
        • OAuth2ServiceException generated by unsuccessful JWKs fetch contains request headers as well
    • OAuth2ServiceException updated header message - contains now Response Headers instead of Headers

Dependency upgrades

  • Bump spring.security.version from 6.1.2 to 6.1.3
  • Bump spring.boot.version from 3.1.2 to 3.1.3
cloud-security-services-integration-library - Version 2.14.2

Published by liga-oz about 1 year ago

  • [java-security]
    • Fixes NPE when accessing XsuaaToken.getPrincipal() and grantType is null (#1261)
  • [token-client]
    • fixes JWKs fetch from identity service issue when app_tid is not present in the token - the X-app_tid and X-client_id headers are only added when both values are available.
    • DefaultOAuth2TokenService
      • fixes issue when in case of unsuccessful token fetch OAuth2ServiceException.withHeaders() headers field were filled with only one entry containing all headers as a string
    • DefaultOAuth2TokenKeyService and SpringOAuth2TokenKeyService
      • improved error handling
        • OAuth2ServiceException that's thrown status code != 200 case doesn't get swallowed
        • fixes OAuth2ServiceException.withHeaders() semantically incorrect behavior when headers were filled with request headers instead of response headers
        • OAuth2ServiceException generated by unsuccessful JWKs fetch contains request headers as well
    • OAuth2ServiceException updated header message - contains now Response Headers instead of Headers

Dependency upgrades

  • Bump spring.security.version from 5.8.5 to 5.8.6
  • Bump spring.boot.version from 2.7.14 to 2.7.15
  • Bump reactor-core from 3.4.31 to 3.4.32
Badges
Extracted from project README
REUSE status Maven Build main Fosstars security rating CodeQL
Related Projects