Hi, I am Denys van Kempen from SAP’s Partner Innovation Lab and the SAP HANA Academy.
In this video tutorial series, we are going to cover the security aspects of the HANA
Academy app generator, authentication and authorization.
This video was recorded in May 2021.
For the latest video tutorials on the topic, please check the playlist.
I am connected here to the Business Technology Platform
using the BTP cockpit.
This is the trial environment.
Navigate to Instances and Subscriptions.
For our sample app we need a cloud foundry runtime to host the application.
We need an instance of SAP HANA Cloud and a service instance of SAP HANA Schemas
and HDI containers, plan hdi-shared.
To create the app we are going to use the SAP Business Application Studio but mpt to
write much code as will be using a code generator to scaffold the app.
Launch app studio.
Create a new dev space.
Give it a name.
Select SAP HANA Native Application.
This will add the calculation view editor, the HANA and MTA tools to build the app as
extensions.
Create Dev Space Takes a few minutes.
Then via the View menu, Find command Explore and Install Generators,
search for saphana and install the generator-saphanaacademy-cap,
the Yeoman generator to jump-start Full-Stack Cloud Applications.
Back to the View menu, Find command Open Template Wizard
select SAP HANA Academy CAP and click start.
We need to provide some information, project name,
new directory or not display name,
description, we can leave this all as-is
we are not using an existing SAP HANA Cloud schema
we are not accessing any external HDI containers, so we can leave both fields blank
we are going to create an entity with HANA Cloud persistence,
use native SAP HANA Cloud artifacts, a calculation view to be precise,
no need to enable external access to the container we also not going to work with external API’s
in this example, so we can focus on the basics
then let’s first generate an app without authentication and without authorization,
of course, when we disable authentication, authorization is gone as well,
we can leave OData v2 support off Keep the user interface
no need for a repository, no need for custom domains,
these topics are all covered in other video tutorial series,
no messaging no CI/CD
no logging, and just generate the template.
The files have been generated.
Open Folder projects
and here we have our app.
Quick runthrough, three modules:
app db
service front-end, persistence, back-end
app package.json references the Node.js approuter module
the router is configured via the xs-app.json file
authentication method = none we can freely access dynamic content via the
service destination and static content via a local directory
generic approuter configuration, a topic covered in other video tutorials,
in this video we will focus on the security aspects.
For persistence, we have a CDS, which generates some data, a table, and calcuation
view for the service, another CDS,
we will see this in action in a minute and then the package.json for the app,
with the dependencies and the MTA, to build the app.
No references to any security-related settings.
Make sure your SAP HANA Cloud instance is up and running.
Build the MTA project.
Takes a minute or so, fast forwarding here, an mta archive will have been generated.
You might get a few warnings but you should see no errors.
Next, deploy the MTAR.
You will be prompted to connect app studio to your cloud foundry org and space,
authenticate with your BTP user, couple more minutes, fast forward
and the app has been deployed.
To access the app, let’s return to the BTP Cockpit,
Cloud Foundry environment dev space
Applications.
The database deployer will be stopped, it is only started to deploy objects.
The back-end, app-service, application route,
freely accessible, showing an automatically generated page
and we can select the links to access either the database directly
or through a calculation view.
We can also go through the front door, via the app router,
choosing an HTML5 view, select sales for direct access
or sales by region for the calc view, same thing
but, again, no authentication, no authorization.
Alternatively, we could access the data through a Fiori UI
and query the data this way.
Okay, this should give us a rough idea about our business app.
You could use the SAP HANA database explorer to take a closer look at the data,
the tables, the calculation view, a topic covered in other videos of this series.
In the next video, we will start with securing our app and add authentication.
See the description below of this video on our YouTube channel for more information.
Don’t forget to subscribe.
Denys van Kempen, SAP HANA Academy / Partner Innovation Lab.
Thanks for watching.