cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to configuring multiple XSUAA service plans application and apiaccess in MTA?

sriharsha_cr
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Community,

We have a CAP-based application in CF, that already uses XSUAA's "application" service plan. We have a use case to manage user roles from the application itself.

After updating the MTA file, by creating a new XSUAA instance with the service plan as "apiaccess" and binding it with "app-srv", we observed that the key binding succeeds, but the "app-srv" crashes while deployment.

Error in app-srv.log:

[ERROR] VError: Found 2 matching services (STDERR, APP/PROC/WEB)

Module:

 - name: app-srv
type: nodejs
path: gen/srv
requires:
- name: app-auth
- name: app-auth-api
- name: app-db
provides:
- name: srv_api
properties:
srv-url: ${default-url}

Resources:

- name: app-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
path: ./xs-security.json
service-plan: application
config:
xsappname: app-auth-${space}
tenant-mode: dedicated
- name: app-auth-api
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: apiaccess
config:
tenant-mode: dedicated
- name: app-db
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
properties:
hdi-service-name: ${service-name}

PS:

1. We are looking to create the XSUAA service instances via MTA, instead of creating the same from BTP manually.

2. We have been successful in making the UserManagement API calls, by manually creating the XSUAA service instance with "apiaccess" service-plan (without any bindings to app-srv)

Accepted Solutions (0)

Answers (1)

Answers (1)

martinfrick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi sriharsha_cr,

maybe the following approach works, specifying further details on the service binding to be used for authentication as part of your package.json / .cdsrc.json? Worked for other services like service-manager in our scenario!

"auth": {
    "[production]": {
          "kind": "xsuaa",
          "vcap": {
            "label": "xsuaa",
            "plan": "application"
} } },

All the best,

Martin

sriharsha_cr
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello martinfrick,

I did try this approach, but I was not able to get the expected result. There is a note (2760424), that states the service instance of "apiaccess" plan cannot be subscribed. I have created an internal incident on this note, to see if there are any further updates made.

Best Regards,

Harsha

sreehari_vpillai
Active Contributor
0 Kudos

sriharsha_cr Were you able to get any responses for this ?