A lightweight Java security framework behind one facade — NS.
One release ships all eight engines: a masking log engine, field-level
crypto (AES-GCM, RSA-OAEP, HMAC, PBKDF2), unique ids
(ULID, UUIDv7, SNOWFLAKE), input validation, output sanitising,
feature flags, signed tokens
and a common utility toolbox — plus a key store module — same facade, same calls,
your code doesn't change as the framework grows.
ns-secure is a unified security facade for the JVM. Application code talks to a single entry
point — NS — and never to a provider directly. Which engine answers
is decided by the operation, the schema's type, and what is on your
classpath: implementations register through java.util.ServiceLoader,
so adding a module is the only wiring there is.
Every schema is a versioned JSON resource with a declared kind — LOG,
GENERATE, the CRYPTO/ENCRYPT
family, VALIDATE, SANITIZE,
FLAG, TOKEN and COMMON.
The log engine masks events deny-by-default; the id engine
fills empty id fields with ULIDs, UUIDv7s or custom-patterned keys; the crypto
engine encrypts, hashes or drops individual fields, binding every ciphertext to its
<schema>/<field> context so values can't be transplanted.
Together they cover the pipeline: validate input at the edge,
sanitize it at the output edge, gate it behind flags,
prove identity with tokens — and reach for 189 bounded common
utilities without adding a single dependency.
Around the engines, the same facade offers a plain-message logger that scrubs stack traces and a
per-thread NSLogContext for trace/span/request correlation —
all Java 8+, all with zero third-party dependencies outside the log module's logback-core.
// one facade, every operation:
NS.use(NSOp.LOG, LOGIN_SCHEMA, event); // masked log line
NS.use(NSOp.GENERATE, ORDER_CREATE, order); // fill empty id fields
NS.use(NSOp.CRYPTO, CUSTOMER_WRITE, record); // field-level encrypt
NS.use(NSOp.VERIFY, attempt, storedHash); // constant-time check
String id = NS.use(NSOp.ID); // one ULID
// plain messages — scrubbed, stack traces included
NS.log(OrderController.class).info("Order {} shipped", id);
Map<String,Object> v = NS.use(NSOp.VALIDATE, CREATE, body);
NSDecision f = NS.use(NSOp.FLAG, NEW_CHECKOUT, userId);
NSDecision t = NS.use(NSOp.TOKEN, ACCESS, bearerToken);
Map<String,Object> r = NS.use(NSOp.SANITIZE, EXPORT, row);
String cut = NS.use(NSOp.COMMON, TRUNCATE, text);
NS facade, NSOp, typed NSSchema (LOG / GENERATE / CRYPTO), NSLevel, NSLogContext, SPIs & registry, internal JSON. Zero deps.
Schema-driven masking engine + logback-core appenders (console, rolling file, TCP, Splunk HEC). Discovered via META-INF/services.
Field-level crypto: AES-GCM, ChaCha20-Poly1305, RSA-OAEP, HMAC-SHA256, PBKDF2, legacy AES-CBC. Key refs, not keys, in schemas.
ULID, UUIDv7, UUIDv4, SNOWFLAKE, RANDOM, NUMERIC, PATTERN — coordination-free, with uniqueness-check support.
Six-stage input pipeline: 23 types, conditions, cross-field rules, tenant overrides — errors never echo a value.
Output sanitising for 11 contexts — HTML, CSV, log line, file name, shell — with pattern rules and value-free reports.
Feature flags: kill switch, deterministic sticky rollout, fail-closed default, method guards.
Key store by key id — secrets and RSA/EC pairs, cached with refresh-ahead and stale-if-error, previous keys kept for zero-downtime rotation.
Signed tokens (HS/RS/ES): the type pins algorithm, issuer, audience and TTL — alg:none impossible.
189 bounded utilities behind NSOp.COMMON: strings, dates, money, checks, safe I/O, resilience, randomness.
The ns-secure umbrella artifact
pulls all modules in one dependency — or depend on a single engine to keep the classpath minimal.
Eight capabilities that turn "don't log PII" from a code-review hope into an enforced pipeline property.
Each event type is a versioned JSON schema: name, level, message and a per-path rule map. Validated and compiled at class-init — bad schemas fail fast.
A field with no rule is suppressed (unlisted policy: SUPPRESS, REDACT or ALLOW).
Forgot to classify it? It never leaves the process.
a.b, list[*].x, list[0],
**.iban, metrics.**. The most specific path wins;
ties resolve to the stronger strategy.
EMAIL, CARD (Luhn-checked), SSN, PHONE, IP, DOB, CREDENTIAL rules plus
REG_EXP: customs. Allowed text is still scrubbed for secrets.
PSEUDONYM_RULE emits keyed tokens — correlate a user's events
without ever logging the identity. Secret via env:/sysprop: ref.
Events below logging.level are not written; AUDIT always is.
Per-level policies can force a strategy or tighten unlisted at ERROR.
NSLogContext.with("traceId", …) attaches correlation IDs to every
line — allowlisted keys only, since context values are not masked.
STDOUT by default; drop in ns-secure-logback.xml for console,
rolling file, async, TCP and Splunk HEC appenders — logback-core only, no slf4j needed.
NS.use(NSOp.CRYPTO, …) encrypts, hashes or drops each field per
its rule's algo. Ciphertexts are AEAD-bound to
schema/field — they can't be transplanted.
NS.use(NSOp.GENERATE, …) fills only empty id fields — ULID,
UUIDv7, SNOWFLAKE, patterned keys — with an optional uniqueness callback against your store.
Click any stage to see what happens inside it. Every op — LOG, GENERATE, CRYPTO, VALIDATE, SANITIZE, FLAG, TOKEN, COMMON — walks the same five stages; the worked example below is LOG. Data only moves left-to-right: there is no path that skips the engine's rules.
NS.use(NSOp.GENERATE, schema, record)NS.use(NSOp.CRYPTO, schema, record)VALIDATE, SANITIZE, FLAG, TOKEN and COMMON run the identical pipeline — facade → SPI → compiled schema → engine → fresh result map. TOKEN adds one early step: the signature is verified on the raw segments before any claim JSON is parsed.
Every commit is scanned by an external static-analysis platform, and every release re-runs a matrix of the ways real applications consume the library.
Architecture & engineering: Nishith Singh
Analysed on every push by SonarCloud (SonarSource) — an independent, industry-standard static analysis platform. The project passes its quality gate with the top rating in every category.
All conditions met on the latest analysis of 0.2.0-beta.3.
0 open security issues and 0 security hotspots left to review.
0 open issues across the codebase; technical debt under 5%.
A release matrix replays behavior-driven scenarios — the ways real applications consume the library — before every publish, not just unit tests.
Identical masked output on every JVM tested — including Java 8 bytecode verification.
1.5M mixed operations plus 10k live schema swaps; 800k concurrent ULIDs; 40k concurrent crypto round-trips.
| Test layer | Volume | Result |
|---|---|---|
| Automated functional suite | 5,000,000 scenarios | 0 mismatches |
| Adversarial security suite | 5,000,513 scenarios | 0 findings |
| Billion-scenario soak (all 8 engines) | 1,100,000,000 scenarios | 0 violations |
| Consumer integration (published jar) | 3 engines, auto-wired | pass |
| Dependency + SAST security scan | 1 dep + 17 rule categories | 0 vulnerabilities |
| Independent analysis (SonarCloud) | every commit | Quality Gate Passed, all-A |
| Rule | Strategy | Matches |
|---|---|---|
CREDENTIAL_RULE | REDACT | tokens — ghp_, xox, sk, AKIA, JWT eyJ |
CARD_RULE | LAST4 | 13–19 digit numbers, Luhn-validated |
SSN_RULE | LAST4 | ddd-dd-dddd |
EMAIL_RULE | PARTIAL | RFC-shaped addresses |
PHONE_RULE | LAST4 | international / local phone shapes |
IP_RULE | PRESERVE_FORMAT | IPv4 dotted quads |
DOB_RULE | REDACT | yyyy-MM-dd |
PSEUDONYM_RULE | PSEUDONYM | any value → stable keyed token |
REDACT_RULE | REDACT | any value |
ALLOW_RULE | NONE | passes — still scrubbed by content floor |
ALLOW_RAW | NONE | passes — exempt even from content floor |
REG_EXP:<re> | REDACT | your own pattern, inline in the schema |
Pattern rules only apply when the value actually matches; a non-matching field falls through
to the next rule or the unlisted policy.
Ties between equally specific paths resolve to the stronger strategy.
Per-level policies can force a strategy globally — e.g.
"DEBUG": {"forceStrategy": "REDACT"} turns even verbose
debug output into fully redacted lines.
Logging is only the first NSOp. The same typed-schema
pattern drives field-level cryptography and unique-id generation — and input
validation, output sanitising, feature flags, signed tokens and a common toolbox. Pick the artifact,
the classpath discovers the engine.
The schema's top-level type sets the direction —
ENCRYPT/DECRYPT for symmetric,
SEAL/OPEN for public-key — and each rule's
algo says what happens to that field. Keys live in
keyRef references, never in code or schemas.
| Algo | Kind | Use |
|---|---|---|
AES-GCM | reversible | default AEAD field encryption |
ChaCha20-Poly1305 | reversible | AEAD on Java 11+ |
RSA-OAEP | reversible | SEAL/OPEN hybrid, per-rule keyRef |
AES-CBC | reversible | legacy interop — requires "legacy": true |
HMAC-SHA256 | irreversible | "searchable": true → blind index |
PBKDF2 | irreversible | passwords; VERIFY re-derives from stored salt+cost |
PLAIN / DROP | none | pass through / remove the field |
Every value is AEAD-bound to <schema>/<field> — a ciphertext
copied into another field or schema fails to decrypt.
env:NAME (Base64/PEM), file:/path,
file:/ks.p12#alias — plus custom vault:/kms:
schemes via NSKeys.register(). New keys with NSKeys.generate().
NS.use(NSOp.VERIFY, attempt, stored) re-derives PBKDF2 with its own
salt and cost; everything else compares in constant time.
{
"name": "customer", "type": "ENCRYPT",
"keyRef": "env:NS_SECURE_KEY", "strict": true,
"rules": {
"ssn": { "algo": "AES-GCM" },
"payload": { "algo": "RSA-OAEP", "keyRef": "vault:payments-pub" },
"email": { "algo": "HMAC-SHA256", "searchable": true },
"password": { "algo": "PBKDF2" },
"consentId": { "algo": "PLAIN" },
"notes": { "algo": "DROP" }
}
}
// same rules, direction flips with the schema type
NS.use(NSOp.CRYPTO, CUSTOMER_W, data); // ENCRYPT
NS.use(NSOp.CRYPTO, CUSTOMER_R, row); // DECRYPT — tokens & hashes stay as-is
{
"name": "order.create", "type": "GENERATE",
"rules": {
"orderId": "ULID",
"publicRef": "UUID4",
"correlationId": "UUID7",
"otp": "NUMERIC:6",
"apiKey": { "type": "RANDOM", "alphabet": "base62",
"bits": 256, "prefix": "sk_live_" },
"licenseKey": { "type": "PATTERN",
"regex": "[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}" }
}
}
// fills only missing / null / "" fields — idempotent
NS.use(NSOp.GENERATE, ORDER_CREATE, order);
// regenerate on collision; the DB stays the authority
NS.use(NSOp.GENERATE, ORDER_CREATE, order,
(field, v) -> repo.exists(field, v));
A "type": "GENERATE" schema names which fields get ids and in what format.
Nested paths and items[*].id arrays work; everything except
SNOWFLAKE is coordination-free — any node mints alone, no shared state.
| Type | Shape |
|---|---|
ULID · UUID7 | time-ordered, sort-friendly |
UUID4 | random UUID |
SNOWFLAKE | 64-bit, needs a unique nodeId per instance |
RANDOM | alphabet · bits/length · prefix · case · "groups": "4-4-4" |
NUMERIC:n | digits, e.g. 6-digit OTP |
PATTERN | generates to a regex — license-key shapes |
Presets for the common cases: API_KEY, PUBLIC_ID,
SORT_KEY, HUMAN_CODE, OTP.
Shorthands: RANDOM:<bytes>[:prefix], NUMERIC:<len>,
REG_EXP:<regex>.
The engine warns at schema-compile time when a key-like field has under 64 bits of entropy — collision and guessing risk flagged before production, not after.
Each one is an NSSchema plus NS.use(op, schema, data). All shipped in 0.2.0-beta.3.
NSOp.LOG{ "fields": { "card": "CARD_RULE" } }
NS.log(schema).info("card", raw);
// → "4111 **** 1111" on every sinkSchema-declared masking on every sink — file, socket, Splunk HEC. Deny-by-default fields, content floor, per-level policies.
NSOp.GENERATE{ "kind": "ULID", "field": "orderId",
"onlyIfEmpty": true }
// sortable, collision-safe, no coordinationULID, UUIDv7, SNOWFLAKE and secure-random ids, minted at the schema's word. Fills only empty fields — replay-safe.
NSOp.CRYPTO{ "field": "ssn", "alg": "AES_GCM",
"keyRef": "ns-keys:card-key" }
// envelope carries key fingerprint — rotation-safeAEAD at field level, HMAC, PBKDF2 password verify, deterministic encryption for search indexes. Keys resolved by reference, never inlined.
NSOp.VALIDATE{ "type": "VALIDATE",
"rules": {
"email": { "type": "EMAIL", "required": true },
"age": { "type": "INT", "min": 18 } } }
// {valid, errors|data} — messages never echo a valueSix stages — shape, types, conditions, cross-field, tenant overrides, external checks. 23 built-in types, safe regexes, injected clock, fail-closed.
NSOp.SANITIZE{ "type": "SANITIZE",
"rules": { "bio": "TEXT_ONLY",
"phone": { "pattern": { "keep": "[0-9+]" } } } }
// {data, changed, dropped} — report has no values11 output contexts — HTML, attribute, JS, JSON, URL, CSS, SQL, CSV, shell, file name, log line. Encode once at the output edge.
NSOp.FLAG{ "key": "new-checkout", "on": true,
"default": false, "rollout": 25 }
// NSDecision d = NS.use(FLAG, flag, userId)
// sticky bucket per user — same answer every callKill switch, deterministic percentage rollout, fail-closed
default, messages, and NSFlag.THROW / supplier guards for whole methods.
NSOp.TOKEN{ "key": "access-token", "alg": "HS256",
"keyId": "access-signing-key", "issuer": "api",
"audience": "orders", "ttl": "15m" }
// alg pinned by the type — alg:none impossibleHS/RS/ES issue + verify with decision codes. The key store resolves by id through a refresh-ahead cache, keeps previous keys for rotation, and derives public keys.
NSOp.COMMON — 189 bounded utilitiesNSSchema CUT = NSSchema.fromJson("{\"op\":\"strings.truncate\",\"max\":200}");
String s = NS.use(NSOp.COMMON, CUT, comment); // settings in schema, value in data
long days = NS.use(NSOp.COMMON, BIZ_DAYS, Map.of("a", d1, "b", d2));One door for the toolbox: strings, collections, dates, numbers and
money in minor units, maps, encoding, require* checks, safe I/O (path
escapes refused, every read capped), resilience (retry, circuit breaker, bounded pools), secure random
and environment access. Errors name the parameter, never the value.
Eight browser-side simulations, one per engine:
A browser-side simulation of NSDefaultLogService — same rules, same deny-by-default.
Edit the schema or the event, then run it. Notice that password has no rule — it never appears.
Try it: remove a rule from the schema and watch the field disappear entirely; add
"department": "ALLOW_RULE" to keep it; change
requestBody to ALLOW_RAW to bypass the content floor
(the card number comes through — exactly why it's opt-in).
A browser-side simulation of the id engine.
Only empty fields (missing / null / "") get values — existing ids survive,
so correlationId and lines[1].lineId stay as they are.
Try it: change apiKey's bits to 24 — the engine warns
that the keyspace is too small for unattended generation; run twice and note ULIDs keep ordering.
A browser-side simulation of the crypto engine (deterministic stand-ins, not real AES/PBKDF2). Note the AES-GCM envelope changes every run — fresh nonce — while HMAC tokens and the PBKDF2 hash are stable for the same input.
Try it: cvv has no rule and strict is true —
the strict error names the field but never its value. Remove it (or set strict:false)
and note notes is dropped entirely. On DECRYPT the tokens and hash stay as-is —
only reversible algos come back.
A browser-side simulation of the validation engine.
Errors come back as {field, code, message} — the rejected value is never echoed.
cvv isn't declared and strict is on, so it counts as an
UNKNOWN_FIELD error too.
Try it: fix the fields and watch data come back with coerced types;
make card a real Luhn number (4111111111111111);
set "strict": false and cvv passes through instead of erroring.
A browser-side simulation of the sanitize engine. Each field declares the context it will be rendered into; the report lists field names and counts only.
Try it: the CSV formula gets neutralised, the script tag is escaped not deleted, the log line can't split,
the javascript: URL is dropped, and the path traversal becomes a plain file name.
Swap a context to TEXT_ONLY to strip all markup instead of escaping it.
A browser-side simulation of the flag engine.
The bucket is deterministic — the same unitId lands on the same side of
the rollout percentage every run, on every node.
Try it: change unitId and the answer may flip — but the same id always gives the
same answer. Set "on": false for a kill switch, or raise
rollout to 100 to let everyone in.
A browser-side simulation of the token engine (stand-in
signature, not real HS256). Issue, then verify — and watch what a single changed character does.
The algorithm is pinned by the type, so a token can't ask for alg:none.
Try it: every run also verifies a tampered copy — one character changed in the signature flips the decision to
BAD_SIGNATURE. Change audience in the type and the same
token now fails as AUDIENCE.
A browser-side simulation of a few
strings.* and encoding.* ops — the library ships 189.
The schema holds the op's settings; the data supplies the value.
Try it: strings.truncate with {"op":"strings.truncate","max":12},
strings.toConstantCase, strings.mask,
strings.maskEmail, encoding.base64Encode,
encoding.urlEncode, numbers.bytes (pass a JSON number).
There is no file watcher: the application swaps in a new NSSchema
or registers a new engine, and the next call uses it. Schemas and loggers already in flight pick it up
immediately; a broken replacement is rejected while the previous good one keeps working — verified with 200 live
swaps under 8-thread load: zero errors, zero unmasked data.
| What | Live? | How |
|---|---|---|
| Log rules — paths, masking, level-scoped | Yes | NSSchema.fromJson() → swap into an AtomicReference; bad JSON / unknown rule throws, old schema stays |
| Log config — level floor, service, mask char, message rules | Yes | NSServiceRegistry.register(NSLogService, new NSDefaultLogService(NSLogSettings.fromJson(json), sink)) |
| Outputs & per-logger levels — ns-secure-logback.xml | Yes | New engine with NSLogbackSink.fromXml()/fromUrl(), then close() the old one to flush files/sockets |
| Auto reload on file change | No | Not built in — trigger a reload yourself (admin endpoint, file timestamp check, Spring Cloud refresh, ConfigMap watch) |
| Id formats — length, alphabet, pattern, prefix | Yes | Swap the GENERATE schema |
| Snowflake node id | Yes | register(new NSDefaultIdService(NSIdSettings.withNodeId(n))) — register before loading SNOWFLAKE schemas |
| Crypto policy — algo per field, keyRef | Yes | Swap the ENCRYPT/DECRYPT schema pair (same name) |
| Keys in file / vault | Yes | Cached with refresh-ahead — a replaced key goes live within the TTL, and a source outage keeps serving the last good key (stale-if-error) |
| Keys in env vars | No | A JVM can't change its own env — rotate env: keys with a restart, or use file:/vault: where live rotation matters |
| Data from the previous key | Yes | Built-in keyring — keyRef: "ns-keys:<keyId>" shares the token key store; decrypt picks the right current/previous key from the envelope's key fingerprint |
| Validation & sanitize rules | Yes | Swap the VALIDATE/SANITIZE schema — a bad rule or regex is rejected while the old schema keeps serving |
| Feature flags — on/off, rollout % | Yes | Swap the flag schema — flags are read per call, so a kill switch takes effect immediately on that instance (per-pod; redeploy to change all pods) |
| Token signing keys | Yes | Rotate by key id: the key store keeps previous keys for verify while issue switches to the new one — zero downtime |
// hold schemas in a swappable reference
private static final AtomicReference<NSSchema> ORDER =
new AtomicReference<>(NSSchema.fromResource("/schemas/order.json"));
// POST /admin/schema reload — next call uses new rules
ORDER.set(NSSchema.fromJson(newJson)); // throws on a bad edit
// change engine settings live
NSServiceRegistry.register(NSLogService.class,
new NSDefaultLogService(
NSLogSettings.fromJson(newSettingsJson), // level, maskChar, service
NSLogbackSink.fromXml(newLogbackXml))); // new outputs
// rotate a key in the secrets store — live within the cache TTL
// (env: keys can't change inside a running JVM)
Typical production pattern: your ops UI or a scheduled job re-reads the schema/config source and calls
set()/register() — the framework makes the swap atomic, you decide the trigger.
dependencies {
// umbrella: facade + all 8 engines + key store
implementation 'io.github.nsprism:ns-secure:0.2.0-beta.3'
// or just the engines you need:
// 'io.github.nsprism:ns-secure-log:0.2.0-beta.3'
// 'io.github.nsprism:ns-secure-crypto:0.2.0-beta.3'
// 'io.github.nsprism:ns-secure-id:0.2.0-beta.3'
// also: -validation -sanitize -flag -keys -token -common
}
<dependency>
<groupId>io.github.nsprism</groupId>
<artifactId>ns-secure</artifactId>
<version>0.2.0-beta.3</version>
</dependency>
{
"logging": {
"service": "claims-api",
"level": "INFO",
"unlisted": "SUPPRESS",
"contentRules": ["CREDENTIAL_RULE", "CARD_RULE", "SSN_RULE"],
"levelPolicy": {
"DEBUG": { "forceStrategy": "REDACT" },
"ERROR": { "unlisted": "REDACT" }
}
},
"pseudonym": { "secretRef": "env:NS_SECURE_PEPPER" }
}
<!-- classpath root: console + rolling file + async TCP + Splunk HEC -->
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="io.github.nsprism.nssecure.log.logback.NSJsonEncoder"/>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/app.json</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>logs/app.%d.%i.json.gz</fileNamePattern>
<maxFileSize>10MB</maxFileSize><maxHistory>14</maxHistory>
</rollingPolicy>
<encoder class="io.github.nsprism.nssecure.log.logback.NSJsonEncoder"/>
</appender>
<appender name="SPLUNK" class="io.github.nsprism.nssecure.log.logback.NSSplunkHecAppender">
<url>${SPLUNK_HEC_URL}</url><token>${SPLUNK_HEC_TOKEN}</token>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE"/><appender-ref ref="FILE"/>
<appender-ref ref="SPLUNK"/>
</root>
</configuration>
No ns-secure.json? Defaults are already safe: INFO floor,
SUPPRESS unlisted, credentials/cards/SSNs scrubbed, per-JVM pseudonym key.
// 1 — declare the schema once (classpath resource)
private static final NSSchema LOGIN =
NSSchema.fromResource("/ns-schemas/auth-login.json");
// 2 — build the event
Map<String, Object> event = new HashMap<>();
event.put("userId", principal.getId());
event.put("sessionToken", token);
event.put("user", user); // nested maps & lists are walked
// 3 — emit; returns the masked payload actually written
NS.use(NSOp.LOG, LOGIN, event);
The difference between a masking library and a security control is what happens when someone makes a mistake. ns-secure is designed around the mistakes.
GDPR, PCI-DSS and HIPAA all care about PII in logs. Deny-by-default means an undeclared field — the classic leak vector — is physically absent from output. Auditors see a policy file, not a promise.
AUDIT level events bypass the level floor unconditionally —
security-relevant records are written even when a service is tuned to ERROR.
Unknown config keys, bad rules, malformed paths and missing secrets all throw at class-initialisation or startup. You cannot deploy a silently-partial policy.
With ns.secure.env=prod, switching scrubbing off is refused
unless allowUnscrubbedInProduction=true — an explicit,
reviewable opt-out.
Core has zero third-party dependencies — even JSON parsing is internal. One small jar to vet, no transitive surprises in your SBOM.
Pseudonymised IDs are stable per secret, so dashboards can still group a user's session — while the raw identity never leaves the service boundary.
JSON lines to stdout work with any collector; the optional logback config adds async, rolling files, TCP and Splunk HEC without pulling slf4j or a logging framework.
HSM-backed crypto, KMS-resolved secrets, a custom log engine — all are SPI implementations. Register them on the classpath; the facade and every call site stay unchanged.
Back to the framework family, or grab the coordinates and start masking.