on 09-23-2022 5:01 PM
Hi colleagues, could you please help me with the hybrid profile setup on Trial account?
I currently have next .cdsrc-private.json:
{
"requires":{
"[hybrid]":{
"db":{
"binding":{
"type":"cf",
"apiEndpoint":"https://api.cf.us10-001.hana.ondemand.com",
"org":"fcd0e122trial_fcd0e122trial",
"space":"dev",
"instance":"hana",
"key":"hana-key",
"resolved":false
},
"kind":"hana-cloud",
"pool":{
"acquireTimeoutMillis":5000,
"min":0,
"max":100,
"fifo":true
},
"vcap":{
"name":"db"
}
}
}
}
}<br>
also next package.json:
{
...,
"cds":{
"requires":{
"[development]":{
"db":{
"kind":"sqlite",
"credentials":{
"database":"sqlite.db"
}
},
"auth":{
"kind":"basic-auth",
"users":{
"login":{
"password":"password",
"roles":[
"Approver",
"Commiter"
]
}
}
}
},
"db":{
"kind":"hana-cloud",
"deploy-format":"hdbtable"
},
"auth":{
"kind":"xsuaa",
"pool":{
"acquireTimeoutMillis":5000,
"min":0,
"max":100,
"fifo":true
}
},
"approuter":{
"kind":"cloudfoundry"
},
"workflowService":{
"kind":"rest",
"credentials":{
"destination":"bpmworkflowruntime"
}
}
}
}, ...
}
so when I try to launch the hybrid scenario it goes through the basic authentication, but then on first query to Hana it fails on the next source code with the last throw:
node_modules/hdb/lib/protocol/auth/Manager.js
function Manager(options) {
options = options || {};
this.user = options.user || '';
this._authMethod = undefined;
this._authMethods = [];
if (options.assertion || (!options.user && options.password && options.password.toString().startsWith("<"))) {
this._authMethods.push(new SAML(options));
}
if (options.token || (!options.user && options.password && options.password.toString().startsWith("ey"))) {
this._authMethods.push(new JWT(options));
}
if (options.sessionCookie) {
this._authMethods.push(new SessionCookie(options));
}
if (options.user && options.password) {
this._authMethods.push(new SCRAMSHA256(options, true)); // with PBKDF2
this._authMethods.push(new SCRAMSHA256(options, false)); // no PBKDF2
}
if (!this._authMethods.length) {
throw noAuthMethodFound();
}
}
the "options" variable contains next structure:
{
"fetchSize":1024,
"holdCursorsOverCommit":true,
"scrollableCursor":true,
"database":"sqlite.db",
"certificate":"",
"driver":"com.sap.db.jdbc.Driver",
"host":"...",
"port":"443",
"uaa":{
"bindingid":"someguid",
"clientid":"...",
"clientsecret":"...",
"identityzone":"f...trial",
"identityzoneid":"...",
"tags":[
"xsuaa"
],
"tenantid":"...",
"uaadomain":"authentication.us10.hana.ondemand.com",
"url":"https://fcd0e122trial.authentication.us10.hana.ondemand.com",
"verificationkey":"..."
},
"url":"jdbc:sap://someguid.hana.trial-us10.hanacloud.ondemand.com:443?encrypt=true&validateCertificate=true",
"ca":"...",
"useCesu8":true
}
The versions are:
cds -v
@sap/cds: 6.1.3
@sap/cds-compiler: 3.1.2
@sap/cds-dk: 6.1.1
@sap/cds-dk (global): 6.1.1
@sap/cds-foss: 4.0.0
@sap/cds-mtx: -- missing --
@sap/xssec: 3.2.13
Node.js: v16.17.0<br>
Thank you.
From a comment in this Blog,
I was able to do,
cds bind --profile hybrid --exec npm run test
and then it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a future: the issue caused by binding hana instance directly instead of binding related HDI instance. It works fine with HDI.
Though the hybrid environment is unfortunatelly not allowed to be used with the cds.test which was the goal of my investigation. So it looks like the only way to automatically test something in the cloud is still postman-like tools / request collections.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.