diff --git a/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliers.java b/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliers.java index 13b031dc1..6af1a1c8d 100644 --- a/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliers.java +++ b/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliers.java @@ -35,7 +35,7 @@ class BtpServicePropertySuppliers { static final OAuth2PropertySupplierResolver XSUAA = - OAuth2PropertySupplierResolver.forServiceIdentifier(ServiceIdentifier.of("xsuaa"), Xsuaa::new); + OAuth2PropertySupplierResolver.forServiceIdentifier(ServiceIdentifier.XSUAA, Xsuaa::new); static final OAuth2PropertySupplierResolver DESTINATION = OAuth2PropertySupplierResolver.forServiceIdentifier(ServiceIdentifier.DESTINATION, Destination::new); @@ -43,12 +43,9 @@ class BtpServicePropertySuppliers static final OAuth2PropertySupplierResolver CONNECTIVITY = OAuth2PropertySupplierResolver.forServiceIdentifier(ServiceIdentifier.CONNECTIVITY, ConnectivityProxy::new); - /** - * {@link ServiceIdentifier#IDENTITY_AUTHENTICATION} referenced indirectly for backwards compatibility. - */ static final OAuth2PropertySupplierResolver IDENTITY_AUTHENTICATION = OAuth2PropertySupplierResolver - .forServiceIdentifier(ServiceIdentifier.of("identity"), IdentityAuthentication::new); + .forServiceIdentifier(ServiceIdentifier.IDENTITY_AUTHENTICATION, IdentityAuthentication::new); static final OAuth2PropertySupplierResolver WORKFLOW = OAuth2PropertySupplierResolver @@ -82,7 +79,7 @@ class BtpServicePropertySuppliers .withUrlKey(BusinessLoggingOptions.WRITE_API, "writeservice", REMOVE_PATH) .factory()); static final OAuth2PropertySupplierResolver AI_CORE = - OAuth2PropertySupplierResolver.forServiceIdentifier(ServiceIdentifier.of("aicore"), AiCore::new); + OAuth2PropertySupplierResolver.forServiceIdentifier(ServiceIdentifier.AI_CORE, AiCore::new); private static final List DEFAULT_SERVICE_RESOLVERS = new ArrayList<>(); diff --git a/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/IdentityAuthenticationServiceBindingDestinationLoader.java b/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/IdentityAuthenticationServiceBindingDestinationLoader.java index 9942812f4..d3fe8771b 100644 --- a/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/IdentityAuthenticationServiceBindingDestinationLoader.java +++ b/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/IdentityAuthenticationServiceBindingDestinationLoader.java @@ -106,7 +106,7 @@ public Try tryGetDestination( @Nonnull final ServiceBindingDest final ServiceBindingDestinationOptions.Builder optionsBuilder; try { - optionsBuilder = ServiceBindingDestinationOptions.forService(ServiceIdentifier.of("identity")); + optionsBuilder = ServiceBindingDestinationOptions.forService(ServiceIdentifier.IDENTITY_AUTHENTICATION); } catch( final DestinationAccessException e ) { return Try.failure(new DestinationAccessException(preparedMessage, e)); diff --git a/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2Service.java b/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2Service.java index 49c87fd58..5ef224c1c 100644 --- a/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2Service.java +++ b/cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2Service.java @@ -314,11 +314,6 @@ static class Builder { private static final String XSUAA_TOKEN_PATH = "/oauth/token"; - /** - * {@link ServiceIdentifier#IDENTITY_AUTHENTICATION} referenced indirectly for backwards compatibility. - */ - private static final ServiceIdentifier IDENTITY_AUTHENTICATION = ServiceIdentifier.of("identity"); - private URI tokenUri; private ClientIdentity identity; private OnBehalfOf onBehalfOf = OnBehalfOf.TECHNICAL_USER_CURRENT_TENANT; @@ -371,7 +366,7 @@ Builder withTenantPropagationStrategy( @Nonnull final TenantPropagationStrategy Builder withTenantPropagationStrategyFrom( @Nullable final ServiceIdentifier serviceIdentifier ) { final TenantPropagationStrategy tenantPropagationStrategy; - if( IDENTITY_AUTHENTICATION.equals(serviceIdentifier) ) { + if( ServiceIdentifier.IDENTITY_AUTHENTICATION.equals(serviceIdentifier) ) { tenantPropagationStrategy = TenantPropagationStrategy.TENANT_SUBDOMAIN; } else { tenantPropagationStrategy = TenantPropagationStrategy.ZID_HEADER; diff --git a/cloudplatform/connectivity-oauth/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliersTest.java b/cloudplatform/connectivity-oauth/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliersTest.java index d55e771fe..02d4d1507 100644 --- a/cloudplatform/connectivity-oauth/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliersTest.java +++ b/cloudplatform/connectivity-oauth/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/BtpServicePropertySuppliersTest.java @@ -108,14 +108,14 @@ class XsuaaTest private static final String PROVIDER_CERT_URL = "https://provider.cert.xsuaa.domain"; private static final ServiceBinding INSTANCE_SECRET_BINDING = bindingWithCredentials( - ServiceIdentifier.of("xsuaa"), + ServiceIdentifier.XSUAA, entry("credential-type", "instance-secret"), entry("clientid", "client-id"), entry("clientsecret", "client-secret"), entry("url", PROVIDER_URL)); private static final ServiceBinding X509_BINDING = bindingWithCredentials( - ServiceIdentifier.of("xsuaa"), + ServiceIdentifier.XSUAA, entry("credential-type", "x509_generated"), entry("clientid", "client-id"), entry("key", "key"), @@ -360,7 +360,7 @@ class AiCoreTest { final ServiceBinding binding = bindingWithCredentials( - ServiceIdentifier.of("aicore"), + ServiceIdentifier.AI_CORE, entry("serviceurls.AI_API_URL", "https://api.ai.internalprod.eu-central-1.aws.ml.hana.ondemand.com"), entry("clientid", "client-id"), entry("clientsecret", "client-secret"), diff --git a/release_notes.md b/release_notes.md index 9f94a8bcc..7d88a2676 100644 --- a/release_notes.md +++ b/release_notes.md @@ -8,6 +8,10 @@ ### 🔧 Compatibility Notes +- Minimum required versions: + - SAP BTP Security Services Integration Libraries `com.sap.cloud.security` 3.4.3 + - CAP `com.sap.cds` 2.9.3 + - SAP Java Buildpack `com.sap.cloud.sjb` 2.10.0 - Using IAS requires XSUAA version to be minimum `3.4.0`. ### ✨ New Functionality