Skip to content

Expose sv app endpoints to the minimum users - #6934

Merged
nicu-da merged 3 commits into
mainfrom
nicu/ip_whitelist/restrict_sv_app
Aug 26, 2026
Merged

Expose sv app endpoints to the minimum users#6934
nicu-da merged 3 commits into
mainfrom
nicu/ip_whitelist/restrict_sv_app

Conversation

@nicu-da

@nicu-da nicu-da commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Also extend open api so the other SVs can easily apply the same restriction

[static]

part of https://github.com/DACH-NY/canton-network-internal/issues/743 (still misses cf-docs part)

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If an upgrade test is required, comment /upgrade_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a logical synchronizer upgrade test is required (from canton-3.5), comment /lsu_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

@canton-network-da

Copy link
Copy Markdown
Contributor

[backport] Reminder

Please consider backporting to the following branches:

  • release-line-0.7.4
  • release-line-0.7.3
  • release-line-0.7.1
  • release-line-0.7.0

▶️ Please check the boxes for branches that you wish to backport to and backport PRs will
automatically be created when you merge this PR.

And your PR is currently against base branch: main.

Note: Any PR comment containing [backport] will be considered for auto-backporting upon merge,
you can always add those manually for PRs that did not get these reminders. You can also edit
this comment manually and add more branches that this should be backported to.

post:
tags: [sv]
x-jvm-package: sv_public
x-public-audience: validators

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.

my understanding is that this endpoint will go away as part of #3596

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.

Yes, this doesn't affect the current status quo

tags: [sv]
# TODO(DACH-NY/canton-network-internal#2106) Move to sv_operator
x-jvm-package: sv_public
x-public-audience: validators

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.

This endpoint should not exist IMO, and certainly is not needed by any validators. (Scan has the same one.)

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.

So how about we keep your PR here as it is but start deprecating that endpoint?

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.

Orthogonal concern, I think we should deprecate it but in another PR

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.

oh yes, totally; feel free to keep your PR as is; follow-up: #6957

post:
tags: [sv]
x-jvm-package: sv_public
x-public-audience: validators

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.

Same as /v0/onboard/validator

@martinflorian-da martinflorian-da 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.

Thanks! ...with naming comments that since this is going to be hard to change once we tell SVs about it are less nit than usual...

tags: [sv]
# TODO(DACH-NY/canton-network-internal#2106) Move to sv_operator
x-jvm-package: sv_public
x-public-audience: validators

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.

So how about we keep your PR here as it is but start deprecating that endpoint?

Comment thread docs/src/release_notes_upcoming.rst Outdated
annotation to restrict the external exposure of their SV app: only the endpoints of a
given audience need to be reachable from the corresponding networks, and endpoints with
an audience of ``none``, as well as endpoints without an ``x-public-audience``, do not
need to be exposed to external traffic at all.

@martinflorian-da martinflorian-da Aug 24, 2026

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.

Suggested change
need to be exposed to external traffic at all.
need to be exposed to external traffic at all.
Note that endpoints currently marked for exposure to validators will be phased out in the foreseeable future.

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.

Not sure how I feel about including this here. Indeed those endpoints will be removed with some release, but that will be part of the release notes for that time.

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.

Are you willing to risk some SV operator or product person asking concerned questions about "oh wait we need to make the SV app public as well?". Seems like a low-cost investment to avoid that risk.

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.

"oh wait we need to make the SV app public as well?".

But we do need to make at least one endpoint public on DevNet. Does it matter if it's devnet only? It's still a prod cluster

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.

Well sure but this is a nuance we can introduce later on :) Currently it is correct to say that the current selection of endpoints will be phased out.

Your call, but I reserve my right to say "I told you so" in case people do get confused :)

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.

Added the note and expanded saying that new endpoints will be added just for devnet.

describe('the SV OpenAPI spec', () => {
const content = fs.readFileSync(svOpenApiFile, 'utf-8');

test('declares an x-public-audience for every sv_public endpoint', () => {

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.

Nice!

Comment thread apps/sv/src/main/openapi/sv-internal.yaml Outdated
Comment thread apps/sv/src/main/openapi/sv-internal.yaml Outdated
@martinflorian-da

Copy link
Copy Markdown
Contributor

By the way, from the discussion on canton-network/cf-docs#1450 : do we want to block DevNet-only endpoints already on the istio layer somehow? Definitely nice to have, but probably not worth the effort to do in a precise way... So our guidance should probably be "sv-app exposed only on DevNet". (I'd add that to an issue not add that immediately.)

Also extend open api so the other SVs can easily apply the same restriction

[static]

Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
[static]

Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
@nicu-da
nicu-da force-pushed the nicu/ip_whitelist/restrict_sv_app branch from 3a20f9e to 4933ed6 Compare August 26, 2026 08:16
.
[static]

Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
@nicu-da

nicu-da commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

cc @pasindutennage-da you will need to add the annotation to your public endpoint as well

@nicu-da
nicu-da merged commit 738a4dc into main Aug 26, 2026
44 checks passed
@nicu-da
nicu-da deleted the nicu/ip_whitelist/restrict_sv_app branch August 26, 2026 12:03
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