最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

SAP HANA Node.js client - How to authenticate using SAML? - Stack Overflow

programmeradmin4浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

The 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.

发布评论

评论列表(0)

  1. 暂无评论