What key words are contained in the application descriptor file (xs-app.json)? There are 2 correct answers to this question.
Correct Answer: A,D
The application descriptor file (xs-app.json) is a JSON file that defines the routing and authentication configuration for an HTML5 module in a multi-target application (MTA) project. It is located in the root folder of the HTML5 module and is used by the managed application router to dispatch requests to the appropriate destinations and to authenticate users. Some of the key words that are contained in the xs-app.json file are:
* routes: This is an array of objects that specify the rules for forwarding requests to the back-end microservices or destinations. Each route object has a source property that defines a regular expression to match the request path, and a destination property that defines the name of the destination to which the request should be forwarded. Optionally, a route object can also have other properties, such as authentication, csrfProtection, service, or scope, to further configure the routing behavior.
* authenticationMethod: This is a property that defines the authentication method to be used for the HTML5 module. It can have one of the following values: route, which means that the authentication method is defined by the route configuration; none, which means that no authentication is required; or approuter, which means that the authentication is delegated to the approuter service. The authenticationMethod property can be set at the global level for the entire HTML5 module, or at the route level for a specific route.
The following key words are not contained in the xs-app.json file, but in other files related to the MTA project:
* role-templates: This is an array of objects that define the roles and their corresponding scopes and attributes for the application. The role-templates are defined in the xs-security.json file, which is the application security descriptor file that specifies the security configuration for the application. The xs-security.json file is located in the root folder of the db module and is used by the User Account and Authentication (UAA) service to manage the authorization and trust management for the application.
* tenant-mode: This is a property that defines the tenant mode for the application. It can have one of the following values: dedicated, which means that the application runs in a dedicated schema for each tenant; shared, which means that the application runs in a shared schema for all tenants; or mixed, which means that the application runs in a mixed mode depending on the tenant context. The tenant-mode property is defined in the mta.yaml file, which is the deployment descriptor file that specifies the metadata and dependencies for the MTA project. The mta.yaml file is located in the root folder of the MTA project and is used by the Cloud Foundry environment to deploy the application.
References:
* [SAP HANA Deployment Infrastructure Reference], Chapter 5: HDI with XS Advanced, Section 5.1:
Developing with the SAP Web IDE for SAP HANA, Subsection 5.1.2: Configure Application Routing (xs-app.json), pp. 101-104.
* [SAP HANA Platform Documentation], SAP HANA Developer Guide for SAP HANA XS Advanced Model, Chapter 4: Developing HTML5 Applications, Section 4.1: Developing HTML5 Applications Using SAP Web IDE for SAP HANA, Subsection 4.1.3: Configure Application Routing (xs-app.json), pp. 77-80.