AtlasNuc 1.0.5
See the version list below for details.
dotnet add package AtlasNuc --version 1.0.5
NuGet\Install-Package AtlasNuc -Version 1.0.5
<PackageReference Include="AtlasNuc" Version="1.0.5" />
<PackageVersion Include="AtlasNuc" Version="1.0.5" />
<PackageReference Include="AtlasNuc" />
paket add AtlasNuc --version 1.0.5
#r "nuget: AtlasNuc, 1.0.5"
#:package AtlasNuc@1.0.5
#addin nuget:?package=AtlasNuc&version=1.0.5
#tool nuget:?package=AtlasNuc&version=1.0.5
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(includesActorNameandEventTimeUtcfor actor identity and timestamp)AuditContextAuditQueryRequestUserType,ResultStatusAuditActionCodes(baseline/common examples)
Shared authorization artifacts live under Authorization:
Contracts/IUserCategoryAccessorContracts/ApiErrorResponseFilters/AdminUserFilter
Action Code Strategy (Generic + Reusable)
Do not rely on a single global enum/list for every service action.
Use this model:
AtlasCorekeeps only common baseline action codes.- Each service defines its own local action catalog.
- All action codes follow one naming convention.
Naming Convention
Use:
<Domain>.<Subdomain>.<Action>
Examples:
Customer.Transfer.InitiatedAdmin.User.DisabledSystem.Integration.CallLoan.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:
PageNumberPageSize
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:
AuditIngressEnvelopeAuditIngressHeadersAuditIngressOptionsAuditIngressValidationCodeAuditIngressValidationResult
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:
- Payload can be deserialized to
AuditIngressEnvelope schemaVersionmatches expected version- Required headers are present and valid
- Required
AuditEventDtofields are present
When validation fails, reject-route with deterministic code using AuditIngressValidationCode (for example: reject.payload-invalid-json).
Rollout Guidance
- Add
AtlasNuc1.0.4in producer and consumer services. - Start with
AllowLegacyPayload=trueonly during migration. - Disable legacy mode after all producers publish
AuditIngressEnvelopewith required headers.
| Product | Versions 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. |
-
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 |