Skip to content

Release 3.0.0: modernize the build and add the full management API#80

Open
bartes wants to merge 7 commits into
developfrom
modernize-and-3.0.0-api
Open

Release 3.0.0: modernize the build and add the full management API#80
bartes wants to merge 7 commits into
developfrom
modernize-and-3.0.0-api

Conversation

@bartes

@bartes bartes commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Releases Castle.Sdk 3.0.0: modernizes the build/test matrix and adds the full management API surface alongside the existing scoring endpoints.

API

  • Add Lists API: CreateList, GetAllLists, GetList, UpdateList, DeleteList, QueryLists.
  • Add List items API: CreateListItem, GetListItem, UpdateListItem, QueryListItems, CountListItems, ArchiveListItem, UnarchiveListItem, CreateBatchListItems.
  • Add Privacy API: RequestUserData, DeleteUserData (POST / DELETE /v1/privacy/users).
  • Add Events API (enterprise): EventsSchema, QueryEvents, GroupEvents.
  • Add webhook signature verification: Castle.Webhook.Verify(body, signature) and Castle.Webhook.Verify(body, signature, apiSecret) validating the X-Castle-Signature header (HMAC-SHA256, Base64); adds CastleWebhookVerificationException.

Build & tooling

  • Target net10.0, net8.0, netstandard2.0 and net48; drop the net461 and netcoreapp3.1 configurations.
  • Remove the Sentry dependency; runtime/platform information is resolved via System.Runtime.InteropServices.RuntimeInformation. Bump Newtonsoft.Json to 13.0.3.
  • Add GitHub Actions workflows to build, test (all target frameworks, including net48) and pack. Retain AppVeyor for Coveralls coverage reporting (it explicitly installs the .NET 8.0 and 10.0 SDKs on the VS2022 image) and remove the CircleCI config; add an .editorconfig and bin/fetch-nupkg.sh.

Breaking changes

  • Remove the legacy Authenticate and Track endpoints (and the Verdict response). Use Risk, Filter and Log.
  • Remove device-management endpoints: GetDevice, GetDevicesForUser, ApproveDevice, ReportDevice, ArchiveDevices (and the Device, DeviceList, User models).
  • Remove impersonation endpoints: ImpersonateStart, ImpersonateEnd (and their request models).
  • Remove client-id extraction: Context.FromHttpRequest no longer reads the X-Castle-Client-ID header or __cid cookie; RequestContext.ClientId and DeviceItem.IsCurrentDevice are removed. The default request context is headers, ip and library.

bartes added 4 commits June 10, 2026 11:40
- Target net10.0, net8.0, netstandard2.0 and net48; drop net461 and netcoreapp3.1.
- Remove the Sentry dependency; resolve platform info via RuntimeInformation.
- Bump Newtonsoft.Json to 13.0.3 and modernize the test stack.
- Multi-target the test project (net48;net8.0;net10.0), guard Core vs System.Web
  test files by framework, and add a real net48 FromHttpRequest(HttpRequestBase) test.
- Replace AppVeyor and CircleCI with GitHub Actions (Windows test+pack, Linux test,
  dotnet format lint); add .editorconfig.
- Use cross-framework APIs in tests so the net48 build compiles: char Split,
  ToDictionary instead of the Dictionary(IEnumerable) ctor, and Cast<Match>()
  on MatchCollection.
- Remove the dotnet format CI job (keep .editorconfig); a repo-wide format pass
  is better handled separately.
…nupkg

- Add bin/fetch-nupkg.sh: download the nupkg artifact built by the Test
  workflow's Windows job, selecting the run by release tag, commit SHA, or
  branch; pass --push to publish it to NuGet (key via NUGET_API_KEY).
- Keep the top-level bin/ tracked in .gitignore while build-output bin/ dirs
  stay ignored.
- Document fetching and publishing the package in RELEASING.md.
…ve legacy endpoints (3.0.0)

Adds the Lists, List items, Privacy and Events (enterprise) API surface to
CastleClient, plus Castle.Webhook.Verify for X-Castle-Signature validation.

Removes the legacy Authenticate/Track endpoints, device management,
impersonation, and client-id extraction (X-Castle-Client-ID/__cid and
RequestContext.ClientId).
bartes added 3 commits June 10, 2026 20:10
Keep .appveyor.yml so AppVeyor continues to build, pack and upload
coverage to Coveralls in parallel with the GitHub Actions workflows.

Explicitly install the .NET 8.0 and 10.0 SDKs on the VS2022 image so the
net10.0 target builds regardless of the image's preinstalled SDK.
The Tests project now multi-targets (net48;net8.0;net10.0), so Coverlet
writes per-framework reports (coverage.<tfm>.opencover.xml) instead of a
single coverage.opencover.xml. Point the Coveralls upload at the net10.0
report so coverage publishing succeeds.
Add a [JsonExtensionData] AdditionalData dictionary to ActionRequest and
every response model (RiskResponse, ScoreItem, DeviceItem, DeviceContext,
Policy, Location, UserAgent, ListResponse, ListItemResponse, EventsResponse,
EventsSchemaResponse, BatchListItemsResponse, CountResponse) so fields the
API adds are captured rather than discarded.

Implement IHasJson on RiskResponse, BatchListItemsResponse, and CountResponse,
exposing the full raw payload via Internal alongside the existing list and
event responses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants