Skip to content

SV app: deprecate /v0/dso in favor of authenticated /v1/dso - #6957

Open
martinflorian-da wants to merge 13 commits into
mainfrom
martinflorian-da/cni-2106-dso-info-v2
Open

SV app: deprecate /v0/dso in favor of authenticated /v1/dso#6957
martinflorian-da wants to merge 13 commits into
mainfrom
martinflorian-da/cni-2106-dso-info-v2

Conversation

@martinflorian-da

@martinflorian-da martinflorian-da commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

...and use the scan version of that endpoint for SV onboarding.

Both upgrade and basic cluster tests worked in the end.

Main part of https://github.com/DACH-NY/canton-network-internal/issues/2106

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

/v0/dso remains available until 0.8.0 (deprecation announced in 0.5.5,
DACH-NY/canton-network-internal#2106). Joining SVs now fetch DSO info from a
configurable (sponsor) scan; without the new config they fall back to the
sponsor SV app's /v0/dso, so existing configs keep working. Preflight tests
that had no SV-app credentials read DSO info via the SV's scan instead.

Verified: apps-sv + apps-app/Test compile, helm unittest (39/39), sv-frontend
vitest (the two remaining full-suite failures reproduce on a clean tree under
sandbox load), and SvOnboardingAddlIntegrationTest against local Canton with
all joining SVs configured to fetch DSO info via sv1's scan (3/3 passed).

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
…ack [ci]

The sponsor-scan config (Helm: joinWithKeyOnboarding.sponsorScanUrl, enforced
via 'required' + values schema) must now be set by any SV whose config still
carries a join-with-key onboarding section; noted as breaking in the release
notes. Also removes the now-unused /v0/dso Scala client command and
SvConnection.getDsoInfo.

Verified: apps-sv + apps-app/Test compile, helm unittest (39/39 incl. a
missing-sponsorScanUrl failure test), SvOnboardingAddlIntegrationTest against
local Canton with the scan-client now coming from the shared test config
include (3/3 passed).

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
…operator client

DsoInfo and decodeDsoInfo now live in HttpSvOperatorAppClient, next to the
only remaining command that returns them; HttpSvPublicAppClient no longer
references DSO info at all. Verified via apps-sv + apps-app/Test compile.

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
…n helper

DsoInfo and its decoder now live in HttpScanAppClient (scan is the canonical
server of the shared GetDsoInfoResponse schema); the scan console command
decodes via the console environment's template decoder, so the preflight
tests' bespoke ResourceTemplateDecoder helper is gone and scan clients are
used directly. The raw GetDsoInfo command is kept for ScanConnection
(BFT response comparison and the validator scan-proxy need the undecoded
response).

Verified: apps-scan/apps-sv/apps-app-Test compile and ScanIntegrationTest
(incl. the retyped scan-vs-SV dso-info comparison) against local Canton,
7/7 passed.

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
…2106-dso-info-v2

[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
@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.

@martinflorian-da martinflorian-da changed the title SV app: deprecate /vo/dso in favor of authenticated /v1/dso SV app: deprecate /v0/dso in favor of authenticated /v1/dso Aug 25, 2026
…nfo, old-version reads in AppUpgrade [ci]

All four CI failures were direct consequences of this PR:
- SvOnboardingConfigIntegrationTest / SvStateManagementIntegrationTest onboarded
  sv2 without any scan running; sv1's scan is now required onboarding infra.
  The sponsor-down test also stops the scan before sv2's restart, verifying
  restarts don't need it.
- ValidatorIntegrationTest compared the scan-proxy's raw GetDsoInfoResponse
  with scan's now-typed DsoInfo; the scan-proxy console is now typed the same
  way (only the console used that command).
- AppUpgradeIntegrationTest called getDsoInfo (now /v1, authenticated) against
  sv1 while it still runs the previous release; the party comes from sv1's
  wallet instead, and the post-upgrade amuletRules read uses sv1Backend.

Verified locally against Canton: SvOnboardingConfigIntegrationTest (2/2),
the fixed SvStateManagement and ValidatorIntegrationTest cases (1/1 each);
AppUpgradeIntegrationTest needs CI's prepped release bundles.

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
…2106-dso-info-v2

[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
@martinflorian-da

Copy link
Copy Markdown
Contributor Author

/upgrade_test

@github-actions

Copy link
Copy Markdown

Deploy upgrade pipeline triggered for Commit 17e2a934a5b91191bcd52b84b7f3df8602170c43 in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/79712

…2106-dso-info-v2

[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
@martinflorian-da

martinflorian-da commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Failed because of Envoy proxy is NOT ready: config received from XDS server, but was rejected: cds updates: 1 successful, 0 rejected; lds updates: 0 successful, 1 rejected ... (so what #6962 fixes)

So let's retry on latest main:

/cluster_test

@github-actions

Copy link
Copy Markdown

Deploy cluster test triggered for Commit af5354579d9cfcbd6c8358f3baa85df316a1a805 in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/79798

The DsoPreflightIntegrationTest 403s came from the ActAsKnownParty check on
/v1/dso: the SPLICE_OAUTH_DEV_CLIENT_ID_SV* client-credentials users are not
provisioned as ledger users with the SV party as primary party (only the SV
app's own user and the onboarded UI users are), so their tokens verify but
fail authorization. PreflightAuthUtil had no prior users, so this was never
exercised before.

Since no externally available principal can read the SV apps' /v1/dso, the
preflight now probes the SV apps' public readyz endpoint for liveness and
reads SV parties from each SV's scan (added sv3Scan/svda1Scan remote client
configs). The scan cannot vouch for the SV app's sv_user (it reports its own
ledger user), so the SV-UI check now asserts the party only.

Verified: apps-app/Test compile; behavior only exercisable against a
deployed cluster.

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
…2106-dso-info-v2

[ci]

Signed-off-by: Martin Florian <martin.florian@digitalasset.com>
@martinflorian-da

Copy link
Copy Markdown
Contributor Author

/cluster_test

@github-actions

Copy link
Copy Markdown

Deploy cluster test triggered for Commit 9af44593e63cdb1bc38bdd558ab273c9e70ce180 in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/79830

@martinflorian-da

Copy link
Copy Markdown
Contributor Author

/upgrade_test

@github-actions

Copy link
Copy Markdown

Deploy upgrade pipeline triggered for Commit 9af44593e63cdb1bc38bdd558ab273c9e70ce180 in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/79838

@martinflorian-da
martinflorian-da marked this pull request as ready for review August 26, 2026 14:06

@nicu-da nicu-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!
In an ideal world we wouldn't need this and just use a scan connection in the UI but as this is the SV app it's low return on improving it.

bobValidatorWalletClient,
sv1WalletClient,
sv1Client.getDsoInfo().svParty,
PartyId.tryFromProtoPrimitive(sv1WalletClient.userStatus().party),

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 can't we use the scan connection getDsoInfo?

}

def getDsoInfo(): HttpSvPublicAppClient.DsoInfo =
def getDsoInfo(): HttpScanAppClient.DsoInfo =

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.

Nit: This doesn't seem right, referencing the scan api from the sv app client,

val sv1ScanClient = scancl("sv1Scan")

val dsoInfo = svClient.getDsoInfo()
val dsoInfo = scancl("svTestScan").getDsoInfo()

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.

out of curiosity do you know why the naming of svTestScan?

dsoInfo.initialRound,
)

case class GetDecodedDsoInfo(headers: List[HttpHeader])

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.

Not a huge fan of the decoded naming, it tells us nothing other that a code was involved?

@@ -1,5 +1,6 @@
joinWithKeyOnboarding:
sponsorApiUrl: "https://sv.sv-2.TARGET_HOSTNAME"
sponsorScanUrl: "https://scan.sv-2.TARGET_HOSTNAME"

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.

Lets make sure we check the docs as well to ensure they still make sense and cover this addition


- joinWithKeyOnboarding:
- sponsorApiUrl: https://sv.sv-2.whatever.global.canton.network.digitalasset.com
- sponsorScanUrl: https://scan.sv-2.whatever.global.canton.network.digitalasset.com

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 do we still update the internal docs?

_onboarding {
type = "join-with-key"
sv-client.admin-api.url = "{{ .Values.joinWithKeyOnboarding.sponsorApiUrl }}"
scan-client.admin-api.url = "{{ required "joinWithKeyOnboarding.sponsorScanUrl is required" .Values.joinWithKeyOnboarding.sponsorScanUrl }}"

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 the require here? we cover that through the schema right?

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