I want to connect to a Hana DB with the Hana Node.js Client using SAML to authenticate. The app will be hosted on Azure, outside any Hana server, e.g. XS Classic App server, Hana Cloud, etc...
How can I achieve this ? Thanks for any pointers :-)
I want to connect to a Hana DB with the Hana Node.js Client using SAML to authenticate. The app will be hosted on Azure, outside any Hana server, e.g. XS Classic App server, Hana Cloud, etc...
How can I achieve this ? Thanks for any pointers :-)
Share Improve this question asked Jan 20 at 16:21 Claus HarbachClaus Harbach 311 silver badge6 bronze badges1 Answer
Reset to default 0The github page for the hdb-node project has an example for how to establish connections with a SAML-assertion.
Instead of user and password you have to provide a SAML assertion:
client.connect({ assertion: '<Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" > ...>...</Assertion>' },function (err) { if (err) { return console.error('Error:', err); } console.log('User:', client.get('user')); console.log('SessionCookie:', client.get('SessionCookie')); });
For this to work, your application has to implement calling the SAML provider, i.e. triggering the login-flow, retrieving the provider's response and, if the authentication was succesful, sign and include the assertion XML into the client.connect
method.
Before this, however, the SAP HANA database must be configured for SAML authentication. See Single Sign-On Using SAML 2.0 for details on how to do that.