-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service plan "reference-instance" unknown by java-security client #1279
Comments
Hi @lholthof, thanks for bringing this up, I wasn't aware that there's another service plan for Xsuaa available. Is there a documentation available describing this plan, which I could refer to? Cheers, |
Hi @liga-oz, I learned about this in this internal how-to and I can confirm it is working for for us except the client is not aware of this plan. Regards, Lukas |
@liga-oz : This is not a plan coming from xsuaa. It is a plan generated by service manager for sharing service instances within a subaccount. Looks like the original plan gets lost in this case. This should be discussed with colleagues. |
We are also facing the same issue in java springboot 3.x with the error bean exception of reference-instance:
|
I just want to give you a quick update: we are currently discussing how to handle this problem with the colleagues responsible for the creation of that service plan. As it is not an official service plan, we do not support it in the client libraries. |
@finkmanAtSap , do you have another update for us? |
Sorry for the long delay. We have found a solution that should hopefully work for you. After discussing whether this should be changed by Service Manager or inside the client libraries, we have decided to treat it is an edge case that we do not code against as it is not an official XSUAA service plan. However, we want to enable consumers of the lib to still use the lib with reference-instance. The problematic parts come from a part of the lib that decides for you which service configuration it uses based on the service plan. You can get around that in java-security by explicitly specifying which service configuration the library should use. Here is a two-step guide for this: 1. Accessing the reference-instance service configuration By default, you can call Environments.getCurrent() to get an Environment implementation on which you can call the method. Follow the documentation at https://github.com/SAP/cloud-security-services-integration-library/tree/main/java-security#oauth2serviceserviceconfiguration-usage to pass your custom configuration to XsuaaTokenAuthenticator.
|
Currently, we not see why the spring modules of this lib would crash when reference-instance is present in the environment.
|
Thank you for the detailed answer. The suggested workaround works fine for me. |
Closing as we do not expect the spring modules to require a workaround. |
In SAP BTP there is the feature to share the xsuaa instance which we consume to make an xsuaa instance available across different Kyma namespaces. It leads to xsuaa reference-instances of plan "reference-instance". The java-security client lib is not aware of this service plan, see ServiceBindingEnvironment and hence it logs a warning with message: "There is no xsuaa service configuration: no local scope check possible." in class HybridTokenFactory.
I understand that this leads to the situation that the appId is not validated. We are looking for this validation to happen as well as part of java-security library for instances of plan "reference-instance".
The text was updated successfully, but these errors were encountered: