AtlasNuc 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package AtlasNuc --version 1.0.5
                    
NuGet\Install-Package AtlasNuc -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AtlasNuc" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AtlasNuc" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="AtlasNuc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AtlasNuc --version 1.0.5
                    
#r "nuget: AtlasNuc, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AtlasNuc@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AtlasNuc&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=AtlasNuc&version=1.0.5
                    
Install as a Cake Tool

AtlasCore

Shared contracts for Atlas platform services.

Purpose

AtlasCore provides reusable, service-agnostic audit contracts so all services can publish and query audit events in a consistent format.

Current shared contracts live under Audit/Contracts:

  • AuditEventDto (includes ActorName and EventTimeUtc for actor identity and timestamp)
  • AuditContext
  • AuditQueryRequest
  • UserType, ResultStatus
  • AuditActionCodes (baseline/common examples)

Shared authorization artifacts live under Authorization:

  • Contracts/IUserCategoryAccessor
  • Contracts/ApiErrorResponse
  • Filters/AdminUserFilter

Action Code Strategy (Generic + Reusable)

Do not rely on a single global enum/list for every service action.

Use this model:

  1. AtlasCore keeps only common baseline action codes.
  2. Each service defines its own local action catalog.
  3. All action codes follow one naming convention.

Naming Convention

Use:

<Domain>.<Subdomain>.<Action>

Examples:

  • Customer.Transfer.Initiated
  • Admin.User.Disabled
  • System.Integration.Call
  • Loan.Application.Approved

Rules:

  • PascalCase segments
  • Dot-separated hierarchy
  • Stable codes (append new, avoid renaming old)

Example: Service-Owned Action Catalog

namespace AtlasDigitalBank.Service.Audit;

public static class DigitalBankAuditActions
{
    public const string CustomerTransferInitiated = "Customer.Transfer.Initiated";
    public const string CustomerTransferCompleted = "Customer.Transfer.Completed";
    public const string AdminFeatureToggled = "Admin.Feature.Toggled";
    public const string LoanApplicationApproved = "Loan.Application.Approved";
}

Example: Publishing an Audit Event

using AtlasCore.Audit.Contracts;

var evt = new AuditEventDto
{
    UserType = UserType.Customer,
    UserId = customerId,
    ServiceName = "AtlasDigitalBank",
    ActionCode = DigitalBankAuditActions.CustomerTransferInitiated,
    ResultStatus = ResultStatus.Success,
    TargetType = "Wallet",
    TargetId = walletId,
    Context = new AuditContext
    {
        Channel = "API",
        CorrelationId = correlationId,
        AppVersion = appVersion
    }
};

Example: Querying with ATLAS Pagination Style

AuditQueryRequest follows the ATLAS request pattern:

  • PageNumber
  • PageSize
var query = new AuditQueryRequest
{
    UserType = UserType.Admin,
    ServiceName = "AtlasDigitalBank",
    FromUtc = DateTime.UtcNow.AddDays(-7),
    ToUtc = DateTime.UtcNow,
    PageNumber = 1,
    PageSize = 50
};

API Response Pattern

For consistency with existing ATLAS API style, list endpoints should return:

  • list payload in Result
  • total records in top-level Count

This avoids embedding custom paged wrapper objects in shared contracts.

Shared Admin Authorization Filter

AdminUserFilter is now reusable from AtlasCore.Authorization.Filters and checks that the current user category is AdminUser.

To use it in a service:

using AtlasCore.Authorization.Contracts;
using AtlasCore.Authorization.Filters;

public sealed class AuthUserCategoryAccessor : IUserCategoryAccessor
{
    private readonly IAuthUser _authUser;

    public AuthUserCategoryAccessor(IAuthUser authUser)
    {
        _authUser = authUser;
    }

    public string? UserCategory => _authUser.UserCategory;
}
services.AddScoped<IUserCategoryAccessor, AuthUserCategoryAccessor>();
services.AddScoped<AdminUserFilter>();

RabbitMQ Ingress Contract (Shared)

Use the shared messaging contracts under AtlasCore.Audit.Messaging to standardize producer and consumer behavior across services.

Shared types:

  • AuditIngressEnvelope
  • AuditIngressHeaders
  • AuditIngressOptions
  • AuditIngressValidationCode
  • AuditIngressValidationResult

Producer Example

using System.Text;
using System.Text.Json;
using AtlasCore.Audit.Contracts;
using AtlasCore.Audit.Messaging;

var evt = new AuditEventDto
{
    EventId = Guid.NewGuid().ToString("N"),
    EventTimeUtc = DateTime.UtcNow,
    UserType = UserType.Customer,
    UserId = "cus-001",
    ServiceName = "ATLAS",
    ActionCode = "Transfer.Initiated",
    ResultStatus = ResultStatus.Success
};

var envelope = new AuditIngressEnvelope
{
    SchemaVersion = "1.0",
    Event = evt
};

var body = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(envelope));
var props = channel.CreateBasicProperties();
props.Persistent = true;
props.MessageId = evt.EventId;
props.Headers = new Dictionary<string, object>
{
    [AuditIngressHeaders.EventType] = Encoding.UTF8.GetBytes(AuditIngressHeaders.DefaultEventType),
    [AuditIngressHeaders.ServiceName] = Encoding.UTF8.GetBytes(evt.ServiceName),
    [AuditIngressHeaders.SchemaVersion] = Encoding.UTF8.GetBytes(envelope.SchemaVersion)
};

channel.BasicPublish("atlas_audit_exchange", "atlas.customer.transfer", props, body);

Consumer Behavior

Consumers should validate:

  1. Payload can be deserialized to AuditIngressEnvelope
  2. schemaVersion matches expected version
  3. Required headers are present and valid
  4. Required AuditEventDto fields are present

When validation fails, reject-route with deterministic code using AuditIngressValidationCode (for example: reject.payload-invalid-json).

Rollout Guidance

  1. Add AtlasNuc 1.0.4 in producer and consumer services.
  2. Start with AllowLegacyPayload=true only during migration.
  3. Disable legacy mode after all producers publish AuditIngressEnvelope with required headers.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.26 218 6/18/2026
1.0.25 356 6/18/2026
1.0.24 465 6/14/2026
1.0.23 311 6/14/2026
1.0.22 261 6/14/2026
1.0.21 260 6/14/2026
1.0.20 253 6/13/2026
1.0.19 250 6/12/2026
1.0.18 266 6/12/2026
1.0.17 249 6/12/2026
1.0.16 329 6/12/2026
1.0.14 337 6/1/2026
1.0.13 267 6/1/2026
1.0.12 268 6/1/2026
1.0.11 252 6/1/2026
1.0.10 289 4/28/2026
1.0.9 346 4/22/2026
1.0.7 257 4/18/2026
1.0.6 249 4/18/2026
1.0.5 300 4/15/2026
Loading failed