on 02-02-2023 2:05 AM
I have a program that I have been iteratively deploying to BTP for months now, and today the update of the XSUAA service stopped working. I keep getting the following exception:
Error creating application cma-dev!t128205 (Error parsing xs-security.json data: Unrecognized field "role-template-reference"
I am at a loss; if I try to create the xsuaa service directly using the same xs-security.json file, the creation succeeds. But I would prefer deploying the MTA, since the deployment also creates a service key for the service, binds the service to my app, and undoubtedly other things behind the scenes that I am unaware of that ensure everything is nice and neat. Why would this error occur now?
This is a bare-bones xs-security.json and is copied below. The file is essentially identical to the one used in the end-to-end tutorial here.
Any hints are greatly appreciated. Alternatively, a list of everything that is being done (creation of service, service key, binding, and whatever else) that I can do manually if necessary.
{
"xsappname": "cma",
"tenant-mode": "dedicated",
"scopes": [
{
"name": "$XSAPPNAME.TakebackOrderViewer",
"description": "TakebackOrderViewer"
},
{
"name": "$XSAPPNAME.TakebackOrderManager",
"description": "TakebackOrderManager"
},
{
"name": "$XSAPPNAME.CMAnalyzerViewer",
"description": "CMAnalyzerViewer"
},
{
"name": "$XSAPPNAME.CMAnalyzerManager",
"description": "CMAnalyzerManager"
}
],
"attributes": [],
"role-templates": [
{
"name": "TakebackOrderViewer",
"description": "generated",
"scope-references": [
"$XSAPPNAME.TakebackOrderViewer"
],
"attribute-references": []
},
{
"name": "TakebackOrderManager",
"description": "generated",
"scope-references": [
"$XSAPPNAME.TakebackOrderManager"
],
"attribute-references": []
},
{
"name": "CMAnalyzerViewer",
"description": "generated",
"scope-references": [
"$XSAPPNAME.CMAnalyzerViewer"
],
"attribute-references": []
},
{
"name": "CMAnalyzerManager",
"description": "generated",
"scope-references": [
"$XSAPPNAME.CMAnalyzerManager"
],
"attribute-references": []
}
]
}
Hi James,
I was able to create a XSUAA service instance based on the provided xs-security.json. The error message indicates that the field "role-template-reference" is not supported.
According to the documentation there is a field called "role-template-references". Thus, I would assume that the passed security descriptor was indeed incorrect. Not sure whether the final one is generated by mta but in the best case only an "s" is missing.
-Torsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Torsten,
Thanks for looking at this; the link was most helpful. The problem was in the mta.yaml file: I had the following:
- description: View Circular Manufacturing Analysis
name: CMAnalyzerViewer-${space}
role-template-references:
- $XSAPPNAME.CMAnalyzerViewer
- description: Manage Product Takeback Orders
name: TakebackOrderManager-${space}
role-template-reference: # should be role-template-references
- $XSAPPNAME.TakebackOrderManager
The new role collection was missing the "s" in the role-template-references configuration for the role-collections. Your link helped me understand the link between the mta.yaml file that I have been updating and the actual expectations of BTP.
Thanks,
James
Hi Gregor,
sure, sorry for this. The documentation is of course also available at help.sap.com.
Best regards
Torsten
User | Count |
---|---|
75 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.