Skip to content

Add Node.js part to Outbound Authentication#2596

Open
vkozyura wants to merge 12 commits into
mainfrom
outbound-auth-node
Open

Add Node.js part to Outbound Authentication#2596
vkozyura wants to merge 12 commits into
mainfrom
outbound-auth-node

Conversation

@vkozyura

Copy link
Copy Markdown
Contributor

No description provided.

@vkozyura vkozyura requested a review from renejeglinsky as a code owner May 28, 2026 08:27
@vkozyura vkozyura marked this pull request as draft May 28, 2026 08:27
@vkozyura vkozyura marked this pull request as ready for review June 5, 2026 13:13
@PDT42 PDT42 self-requested a review June 15, 2026 08:39

@PDT42 PDT42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this guide should use the Java / Node.js switch, if that is still a thing? The examples and required steps seem pretty disconnected.

Comment thread guides/security/remote-authentication.md Outdated
Comment on lines +142 to +149
::: details Node.js configuration explained

The `kind` property activates the protocol for exchanging business data (same as `type` in Java).
The key in `cds.requires` must match the fully qualified CDS service name (e.g., `sap.capire.flights.data`), which is the same name used in `cds.connect.to()`.
The `credentials.url` provides the full endpoint URL including the service path `/hcql/data`.
The `forwardAuthToken: true` enables direct forwarding of the incoming JWT token to the provider service - this is suitable for co-located services that share the same identity instance, as the token is already valid for the provider.

:::

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


::: tip
On behalf of `systemUser` works both in pure single tenant and in pure multitenant scenarios.
On behalf of `systemUser` (Java) works both in pure single tenant and in pure multitenant scenarios.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the updated structure, this jump back to Java systemUser is very disconnected. What is the / Is there an equivalent in Node.js?


Additionally, to establish the co-located setup, the microservice needs to share the same identity instance:
Additionally, to establish the co-located setup, the microservice needs to share the same identity instance.
This is configured in the MTA deployment descriptor (applies to both Java and Node.js):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"applied to both Java and Node.js" should be the default for any shared guide. IMO, only the opposite should be noted.

Comment thread guides/security/remote-authentication.md
Comment thread guides/security/remote-authentication.md
Comment on lines +478 to +482
**3. Authentication type depends on use case:**
- **OAuth2ClientCredentials**: For technical user scenarios (no user context)
- **OAuth2JWTBearer**: For user propagation (requires user token from authorization_code flow)

Both support `tokenService.body.resource` for IAS App-2-App scoping.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these two listed, but none of the other auth types?

Comment on lines +465 to +466
| Client ID | Consumer IAS client ID |
| Client Secret | Consumer IAS client secret |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do people get these?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info added

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually, should the destination be using the creds from the service binding or a dedicated service key?

Comment thread guides/security/remote-authentication.md Outdated
Comment thread guides/security/remote-authentication.md Outdated
@renejeglinsky

Copy link
Copy Markdown
Contributor

Perhaps this guide should use the Java / Node.js switch, if that is still a thing?

It's not a thing anymore. But code groups that have Java/Node are now remembered by selection without the toggle.

@vkozyura vkozyura requested a review from danjoa as a code owner June 16, 2026 08:42
@vkozyura vkozyura requested a review from PDT42 June 16, 2026 08:44
service-plan: lite
```

**Note:** MTA cannot resolve cross-service credential references like `${generated>xtravels-ias/clientid}`. The destination must be created manually in BTP Cockpit or via Destination Service API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps: Move this to the beginning of "2. BTP Destination" or right before "Client ID and Client Secret are obtained from the consumer's ..."? Provide the reason for what should be done, before doing it?

@PDT42 PDT42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still having trouble with the structure: I think intermixing the Java and Node.js guides like this doesn't provide much benefit and is at least a bit confusing ... However, the documented process (without trying to go through it myself) makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants