fix!: 재리뷰가 찾은 결함과 색인에서 빠졌던 발견 5건을 고친다
문제: 성숙도 리뷰 수정을 다시 읽은 재리뷰(Critical 0, 회귀 0)가 Important 27건·Minor 41건을 찾았다. 수정이 새로 만든 결함이 많았다. @SystemInvoked가 권한 규칙의 탈출구가 됐고, 데모 계정 거부가 정확히 prod일 때만 걸렸고, outbox 순서 번호가 업그레이드 때 뒤로 갔고, GraphQL union 아래 복잡도가 0이었고, 서블릿 오류 응답이 success:true로 나갔고, 호출자 deadline이 breaker를 열었다. 원래 리뷰 색인이 06 영역 발견 5건(06-10~14)을 빠뜨려 그동안 처리되지 않았다. 방법: 영역별 7묶음이 test-driven-development 절차로 실패 테스트를 먼저 쓰고 고쳤다. 결정은 재리뷰 README 4절에 적었다: 순서 번호는 V21이 기록한 전역 floor부터, 데모 계정은 local·test·demo 허용 목록, @SystemInvoked bean은 기동 실패, complete 단계 실패는 IDEMPOTENCY_COMPLETION_UNKNOWN(결과 불명), 캐시 조건부 쓰기는 별도 SCRIPT lane, strict lane 정책은 build cache 입력, 끝나지 않는 재시도 행은 원인 코드·지표·PARKED 절차. 레지스트리가 선언만 하고 아무 코드도 내보내지 않던 redis.capability.* 지표 6개는 빼고 runbook을 실제 지표(redis.lane.*) 기준으로 고쳤다. 위험·한계: V21을 V22 없이 직접 고쳤다(어느 배포에도 아직 없음). 이 브랜치의 V21을 적용한 개발 DB는 다시 만들어야 한다. 서블릿 오류 디스패치를 보안 체인이 허용한다. 발행·저장소 포트 시그니처가 바뀌어 파생 서비스 코드가 깨진다. prod에서 fixture-로 시작하는 설정값은 기동을 막는다. httpclient failure-injection lane의 main 단계 중복 실행은 이전 결정대로 남겼다. 실제 CI runner 실행은 확인하지 못했다. 검증: ci, mainCheck, :integrationCheck, -p optional-platforms ci integrationCheck performanceCheck, :performanceCheck, :releaseCheck (-PgitRevision), verify-compose-profile-contracts(18 lane) 통과. 첫 실행의 실패 2건(FindSecBugs 1, sample 동시 생성 테스트의 v4 event id)은 고친 뒤 ci·integrationCheck·mainCheck를 다시 돌려 통과했다. Refs: docs/reviews/2026-11-03-rereview/README.md 3·4·6·7절 BREAKING CHANGE: outbox 발행 포트와 저장소 포트 시그니처, 순서 번호 첫 값(V21 floor 다음), 샘플 데모 계정 프로필 허용 목록, 새 오류 코드 IDEMPOTENCY_COMPLETION_UNKNOWN, prod의 fixture- 값 거부, 기동 rule은 static·의존 없음이어야 한다.
This commit is contained in:
@@ -87,7 +87,9 @@ configurations, Redis as one 376-line class.
|
||||
this leaf. `runtime/startup/` keeps only `StartupFailureExceptionReporter`.
|
||||
- **An environment-only guard is a `StartupRule` bean** (`support.startup`): it returns violations,
|
||||
and the one `StartupRuleRunner` raises them before any other singleton exists (declare it with a
|
||||
parameterless `static` `@Bean` method). A guard that needs another bean stays a bean. A
|
||||
`static` `@Bean` method that takes only the `Environment`, the bean factory or an `ObjectProvider`
|
||||
of static `RequiredProductionSecrets`; the runner fails the boot naming any other bean a rule
|
||||
creates). A guard that needs another bean stays a bean. A
|
||||
capability's production secrets are the capability's: its module contributes a
|
||||
`RequiredProductionSecrets` bean, and `SecretSourceValidator` checks the names without knowing
|
||||
which roles exist.
|
||||
|
||||
@@ -129,7 +129,11 @@ README의 "startup" 절에 있다.
|
||||
### SecretSourceValidator
|
||||
- **prod 에서 깨지면 부팅 자체를 거부하는 fail-fast 가드다.** 두 가지 prod 불변식을 context refresh
|
||||
완료 전에 강제한다. (1) `__LOCAL_DEV_` 접두사를 가진 dev/local 가짜 자격증명 값이 prod 프로파일에
|
||||
도달하는 것은 잘못 로드된 사고이므로 부팅을 중단시킨다. (2) 레지스트리에서 `secret` +
|
||||
도달하는 것은 잘못 로드된 사고이므로 부팅을 중단시킨다. `fixture-` 접두사 값도 같다. 이 저장소가
|
||||
lane용으로 적어 둔 공개 비밀번호(`infra/redis-sdk/acl`의 Redis ACL fixture, compose lane의
|
||||
`REDIS_LANE_*`)라서, lane 환경이나 lane ACL 파일을 베낀 배포가 그대로 운영에 뜨는 것을 막는다
|
||||
(review 2026-11-03 RR-07-04). 비밀이 아닌 설정값이라도 prod에서 `fixture-`로 시작하면 거부되니 이름을
|
||||
바꾼다. 실패 메시지는 변수 이름만 적고 값은 적지 않는다. (2) 레지스트리에서 `secret` +
|
||||
`prod_default: null`로 분류된 모든 키는 prod 에서 비어 있지 않게 주입돼야 한다 — 빈 시크릿으로
|
||||
부팅하는 것은 금지다. dev/local 프로파일은 두 검사를 건너뛴다(`__LOCAL_DEV_*`가 의도된 로컬
|
||||
폴백이므로).
|
||||
|
||||
@@ -122,10 +122,11 @@ sourceSets {
|
||||
}
|
||||
|
||||
// Every capability a service can select — the commented runtimeOnly lines below — listed once.
|
||||
// Two consumers read it: the whole-repository ArchUnit import (spec §7: the architecture suite sees
|
||||
// Three consumers read it — the environment contract's metadata classpath (verifyEnvKeys, below)
|
||||
// and these two: the whole-repository ArchUnit import (spec §7: the architecture suite sees
|
||||
// every module of this build and the sample, the shipped runtime only the selected ones; the
|
||||
// optional-platforms build is held by its own Gradle direction gate instead) and the qualification artifact the
|
||||
// Compose lanes boot (qualificationBootJar, below). Neither reaches `bootJar`, `test` or
|
||||
// Compose lanes boot (qualificationBootJar, below). None of them reaches `bootJar`, `test` or
|
||||
// `systemTest`, because a capability on a classpath is switched on there by its mere presence.
|
||||
// A new capability leaf is added here and as a commented line below; nowhere else.
|
||||
def capabilityProjects = [
|
||||
@@ -479,6 +480,12 @@ def qualificationClasspath = compositionRuntimeClasspath('qualificationRuntimeCl
|
||||
dependencies {
|
||||
capabilityProjects.each { qualificationRuntimeClasspath project(it) }
|
||||
}
|
||||
// The environment contract reads every selectable capability's configuration metadata from this
|
||||
// classpath, so a module that ships typed settings is checked because it can be selected, and the
|
||||
// task names no leaf (review 2026-11-03 RR-06-10).
|
||||
tasks.named('verifyEnvKeys') {
|
||||
metadataClasspath.from(qualificationClasspath)
|
||||
}
|
||||
def qualificationBootJar = tasks.register('qualificationBootJar', org.springframework.boot.gradle.tasks.bundling.BootJar) {
|
||||
group = 'build'
|
||||
description = 'Assembles the Compose qualification jar: the default composition plus every capability.'
|
||||
|
||||
+42
@@ -1,5 +1,7 @@
|
||||
package dev.caskeleton.bootstrap.architecture;
|
||||
|
||||
import static com.tngtech.archunit.core.domain.AccessTarget.Predicates.declaredIn;
|
||||
import static com.tngtech.archunit.core.domain.JavaCall.Predicates.target;
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes;
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.methods;
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
|
||||
@@ -20,6 +22,8 @@ import com.tngtech.archunit.lang.ArchRule;
|
||||
import com.tngtech.archunit.lang.ConditionEvents;
|
||||
import com.tngtech.archunit.lang.SimpleConditionEvent;
|
||||
import dev.caskeleton.application.capability.UseCaseCapability;
|
||||
import dev.caskeleton.application.messaging.event.IntegrationEventDraft;
|
||||
import dev.caskeleton.application.messaging.event.IntegrationEventDrafts;
|
||||
import dev.caskeleton.application.security.RequiresPermission;
|
||||
import dev.caskeleton.application.security.SystemInvoked;
|
||||
import dev.caskeleton.application.usecase.CommandUseCase;
|
||||
@@ -442,6 +446,44 @@ class ApplicationBoundaryArchitectureTest {
|
||||
+ "Authentication, so the gate would be decoration")
|
||||
.allowEmptyShould(true);
|
||||
|
||||
/**
|
||||
* A {@link SystemInvoked} use case is a write with no permission check, so no transport may reach
|
||||
* it. A bean of one fails startup ({@code PermissionEnforcementGuard}); this closes the other
|
||||
* path, an inbound adapter that constructs or calls one itself (review 2026-11-03 RR-01-02).
|
||||
*/
|
||||
@ArchTest
|
||||
static final ArchRule INBOUND_ADAPTERS_DO_NOT_REACH_SYSTEM_INVOKED_USE_CASES =
|
||||
noClasses()
|
||||
.that()
|
||||
.resideInAPackage("..adapter.inbound..")
|
||||
.should()
|
||||
.dependOnClassesThat()
|
||||
.areAnnotatedWith(SystemInvoked.class)
|
||||
.as(
|
||||
"INBOUND_ADAPTERS_DO_NOT_REACH_SYSTEM_INVOKED_USE_CASES: a @SystemInvoked use case "
|
||||
+ "declares no permission because only the system calls it; an inbound adapter "
|
||||
+ "that reaches it runs a write with no authorization check. Its composition "
|
||||
+ "constructs it and hands it to the scheduler that calls it.")
|
||||
.allowEmptyShould(true);
|
||||
|
||||
/**
|
||||
* {@link IntegrationEventDrafts} is where contract id, version, destination and correlation are
|
||||
* decided for every feature. A feature that calls the ten-field draft constructor itself restates
|
||||
* those rules, which is the drift review 2026-11-01 01-09 removed (RR-01-03).
|
||||
*/
|
||||
@ArchTest
|
||||
static final ArchRule INTEGRATION_EVENT_DRAFTS_ARE_BUILT_BY_THE_SHARED_HELPER =
|
||||
noClasses()
|
||||
.that()
|
||||
.doNotBelongToAnyOf(IntegrationEventDrafts.class, IntegrationEventDraft.class)
|
||||
.should()
|
||||
.callConstructorWhere(target(declaredIn(IntegrationEventDraft.class)))
|
||||
.as(
|
||||
"INTEGRATION_EVENT_DRAFTS_ARE_BUILT_BY_THE_SHARED_HELPER: production code builds an "
|
||||
+ "IntegrationEventDraft only through IntegrationEventDrafts.draft(...), which "
|
||||
+ "owns the contract fields, the correlation fallback and the single-tenant scope")
|
||||
.allowEmptyShould(true);
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule APPLICATION_AND_DOMAIN_DO_NOT_DEPEND_ON_SPRING_SECURITY =
|
||||
noClasses()
|
||||
|
||||
+2
@@ -114,9 +114,11 @@ class ArchRuleDiscoveryContractTest {
|
||||
"IDENTIFIER_ADAPTER_DOES_NOT_DEPEND_ON_OTHER_ADAPTERS_OR_BOOTSTRAP",
|
||||
"INBOUND_ADAPTERS_DEPEND_ON_PORTS_NOT_APPLICATION_SERVICES",
|
||||
"INBOUND_ADAPTERS_DO_NOT_DEPEND_ON_OUTBOUND_ADAPTERS",
|
||||
"INBOUND_ADAPTERS_DO_NOT_REACH_SYSTEM_INVOKED_USE_CASES",
|
||||
"INBOUND_PORT_IMPLEMENTATIONS_DECLARE_A_CAPABILITY",
|
||||
"INBOUND_PORT_IMPLEMENTATIONS_DECLARE_CAPABILITY",
|
||||
"INBOUND_PORT_IMPLEMENTATIONS_END_WITH_USE_CASE",
|
||||
"INTEGRATION_EVENT_DRAFTS_ARE_BUILT_BY_THE_SHARED_HELPER",
|
||||
"MANAGEMENT_SECURITY_DOES_NOT_DEPEND_ON_HEALTH_INTERNALS",
|
||||
"MAPPERS_DO_NOT_DEPEND_ON_WEB_OR_APPLICATION_BOUNDARIES",
|
||||
"MESSAGING_OUTBOUND_PUBLIC_INSTANCE_METHODS_DO_NOT_LEAK_ADAPTER_TYPES_THROUGH_GENERICS",
|
||||
|
||||
+32
@@ -8,16 +8,19 @@ import com.tngtech.archunit.lang.EvaluationResult;
|
||||
import dev.caskeleton.application.architecture.violations.ApplicationDiagnosticFrameworkViolation;
|
||||
import dev.caskeleton.bootstrap.architecture.allowed.application.CleanProjectionQueryPort;
|
||||
import dev.caskeleton.bootstrap.architecture.fixtures.application.RootWriteTransactionBoundaryUseCase;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.adapter.inbound.web.controller.SystemInvokedCallingControllerFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.adapter.outbound.RawExternalResponseFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.adapter.outbound.messaging.GenericTypeLeakingAdapterFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.BulkWriteWithoutWriteAccessUseCase;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.FixtureRepository;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.GenericLeakQueryPort;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.HandBuiltIntegrationEventDraftFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.JakartaValidationApplicationFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.MissingTransactionBoundaryUseCase;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.OutboundWithoutPermissionUseCase;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.RawLeakQueryPort;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.ReadOnlyRepositoryWriteUseCase;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.SystemInvokedFixtureUseCase;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.domain.AnnotatedPublicNoArgValueObjectFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.domain.JakartaValidationDomainFixture;
|
||||
import dev.caskeleton.bootstrap.architecture.violations.domain.entity.FakeDomainEntity;
|
||||
@@ -154,6 +157,35 @@ class ArchitectureViolationFixtureTest {
|
||||
new ClassFileImporter()
|
||||
.importPackages("dev.caskeleton.bootstrap.architecture.violations.secrets");
|
||||
|
||||
// Review 2026-11-03 RR-01-02: the controller and the use case it reaches, and nothing else, so
|
||||
// the rule is proven on the one dependency it forbids.
|
||||
private static final JavaClasses SYSTEM_INVOKED_FROM_TRANSPORT_FIXTURE_ONLY =
|
||||
new ClassFileImporter()
|
||||
.importClasses(
|
||||
SystemInvokedCallingControllerFixture.class, SystemInvokedFixtureUseCase.class);
|
||||
|
||||
// Review 2026-11-03 RR-01-03: one class that builds the draft by hand.
|
||||
private static final JavaClasses HAND_BUILT_DRAFT_FIXTURE_ONLY =
|
||||
new ClassFileImporter().importClasses(HandBuiltIntegrationEventDraftFixture.class);
|
||||
|
||||
@Test
|
||||
void anInboundAdapterThatCallsASystemInvokedUseCaseIsCaught() {
|
||||
EvaluationResult result =
|
||||
ApplicationBoundaryArchitectureTest.INBOUND_ADAPTERS_DO_NOT_REACH_SYSTEM_INVOKED_USE_CASES
|
||||
.evaluate(SYSTEM_INVOKED_FROM_TRANSPORT_FIXTURE_ONLY);
|
||||
|
||||
assertThat(result.hasViolation()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void aFeatureThatBuildsAnIntegrationEventDraftByHandIsCaught() {
|
||||
EvaluationResult result =
|
||||
ApplicationBoundaryArchitectureTest.INTEGRATION_EVENT_DRAFTS_ARE_BUILT_BY_THE_SHARED_HELPER
|
||||
.evaluate(HAND_BUILT_DRAFT_FIXTURE_ONLY);
|
||||
|
||||
assertThat(result.hasViolation()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void noRefreshScopeAnywhereCatchesRefreshScopeAnnotation() {
|
||||
EvaluationResult result =
|
||||
|
||||
+24
@@ -6,6 +6,7 @@ import com.tngtech.archunit.core.domain.JavaClasses;
|
||||
import com.tngtech.archunit.core.importer.ClassFileImporter;
|
||||
import dev.caskeleton.adapter.outbound.persistence.testkit.arch.JpaArchitectureRules;
|
||||
import jakarta.persistence.Entity;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -101,6 +102,29 @@ class JpaProductionArchitectureTest {
|
||||
JpaArchitectureRules.associationsAreMappedFromOneSideOnly().check(productionClasses);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("알림·파일 서버 저장소 leaf의 엔티티는 그 leaf 밖의 운영 코드가 쓰지 않는다")
|
||||
void capabilityPersistenceEntitiesAreUsedOnlyInsideTheirLeaf() {
|
||||
// given: both leaves' entities are in the import, so the rule cannot pass by finding nothing
|
||||
List<String> leaves =
|
||||
List.of(
|
||||
"dev.caskeleton.adapter.outbound.persistence.notification",
|
||||
"dev.caskeleton.adapter.outbound.persistence.fileserver");
|
||||
assertThat(leaves)
|
||||
.allSatisfy(
|
||||
leaf ->
|
||||
assertThat(productionClasses.stream())
|
||||
.anyMatch(
|
||||
type ->
|
||||
type.getPackageName().startsWith(leaf)
|
||||
&& type.isAnnotatedWith(Entity.class)));
|
||||
|
||||
// then
|
||||
leaves.forEach(
|
||||
leaf ->
|
||||
JpaArchitectureRules.entitiesAreUsedOnlyInsideTheirLeaf(leaf).check(productionClasses));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("no entity uses two audit mechanisms at once")
|
||||
void noEntityUsesTwoAuditMechanismsAtOnce() {
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package dev.caskeleton.bootstrap.architecture.violations.adapter.inbound.web.controller;
|
||||
|
||||
import dev.caskeleton.bootstrap.architecture.violations.application.SystemInvokedFixtureUseCase;
|
||||
|
||||
/**
|
||||
* Negative fixture for {@code INBOUND_ADAPTERS_DO_NOT_REACH_SYSTEM_INVOKED_USE_CASES}: an inbound
|
||||
* adapter that calls a {@code @SystemInvoked} use case, a write with no permission gate, straight
|
||||
* from a transport (review 2026-11-03 RR-01-02).
|
||||
*/
|
||||
public class SystemInvokedCallingControllerFixture {
|
||||
|
||||
private final SystemInvokedFixtureUseCase useCase = new SystemInvokedFixtureUseCase();
|
||||
|
||||
public void trigger() {
|
||||
useCase.handle();
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package dev.caskeleton.bootstrap.architecture.violations.application;
|
||||
|
||||
import dev.caskeleton.application.messaging.contract.ContractId;
|
||||
import dev.caskeleton.application.messaging.contract.IntegrationPayload;
|
||||
import dev.caskeleton.application.messaging.contract.LogicalDestinationId;
|
||||
import dev.caskeleton.application.messaging.event.AggregateIdentity;
|
||||
import dev.caskeleton.application.messaging.event.AggregateOrder;
|
||||
import dev.caskeleton.application.messaging.event.EventId;
|
||||
import dev.caskeleton.application.messaging.event.IntegrationEventDraft;
|
||||
import java.time.Instant;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Negative fixture for {@code INTEGRATION_EVENT_DRAFTS_ARE_BUILT_BY_THE_SHARED_HELPER}: a feature
|
||||
* that assembles the ten-field draft itself and so restates the correlation and tenant rules {@code
|
||||
* IntegrationEventDrafts} owns (review 2026-11-01 01-09, 2026-11-03 RR-01-03).
|
||||
*/
|
||||
public final class HandBuiltIntegrationEventDraftFixture {
|
||||
|
||||
private HandBuiltIntegrationEventDraftFixture() {}
|
||||
|
||||
public static <P extends IntegrationPayload> IntegrationEventDraft<P> draft(
|
||||
EventId eventId,
|
||||
ContractId contractId,
|
||||
LogicalDestinationId destination,
|
||||
AggregateIdentity aggregate,
|
||||
P payload) {
|
||||
return new IntegrationEventDraft<>(
|
||||
eventId,
|
||||
contractId,
|
||||
1,
|
||||
destination,
|
||||
aggregate,
|
||||
AggregateOrder.first(),
|
||||
Instant.EPOCH,
|
||||
eventId.value(),
|
||||
Optional.empty(),
|
||||
payload);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package dev.caskeleton.bootstrap.architecture.violations.application;
|
||||
|
||||
import dev.caskeleton.application.security.SystemInvoked;
|
||||
|
||||
/**
|
||||
* A use case only the system calls. Not a violation on its own: it is what {@code
|
||||
* SystemInvokedCallingControllerFixture} reaches, the transport path {@code
|
||||
* INBOUND_ADAPTERS_DO_NOT_REACH_SYSTEM_INVOKED_USE_CASES} forbids.
|
||||
*/
|
||||
@SystemInvoked(reason = "fixture: a scheduler calls it")
|
||||
public final class SystemInvokedFixtureUseCase {
|
||||
|
||||
public void handle() {
|
||||
// fixture
|
||||
}
|
||||
}
|
||||
+46
-11
@@ -6,8 +6,10 @@ import dev.caskeleton.adapter.outbound.support.startup.StartupPhase;
|
||||
import dev.caskeleton.adapter.outbound.support.startup.StartupRule;
|
||||
import dev.caskeleton.application.secret.SecretSourcePort;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
@@ -32,6 +34,25 @@ public final class SecretSourceValidator implements StartupRule {
|
||||
/** Prefix marking a dev/local fake credential; forbidden to reach the prod profile. */
|
||||
static final String LOCAL_DEV_SENTINEL_PREFIX = "__LOCAL_DEV_";
|
||||
|
||||
/**
|
||||
* Prefix of the passwords this repository writes down for its lanes: the Redis ACL fixtures in
|
||||
* {@code infra/redis-sdk/acl} and the Compose lanes' {@code REDIS_LANE_*} values that connect
|
||||
* with them. They are public — anyone who can read the repository has them — so under {@code
|
||||
* prod} they are refused like the sentinel (review 2026-11-03 RR-07-04). A deployment that copied
|
||||
* a lane's environment — which is also what an application needs to authenticate against a Redis
|
||||
* that loaded the lane ACL file — would start with credentials it does not own; this is the one
|
||||
* place that sees every value before anything connects. It cannot see a Redis server that loaded
|
||||
* that file while the application uses real passwords; the ACL README says why no deployment
|
||||
* loads it.
|
||||
*/
|
||||
static final String REPOSITORY_FIXTURE_PREFIX = "fixture-";
|
||||
|
||||
/** Values that are public by construction and so can never be a production secret. */
|
||||
private static final Map<String, String> PUBLIC_CREDENTIAL_PREFIXES =
|
||||
Map.of(
|
||||
LOCAL_DEV_SENTINEL_PREFIX, "sentinel credential",
|
||||
REPOSITORY_FIXTURE_PREFIX, "repository fixture password (public, infra/redis-sdk/acl)");
|
||||
|
||||
/**
|
||||
* Secret keys that must be injected under the {@code prod} profile whatever the deployment
|
||||
* selected. The relational credential is not one of them: persistence-jpa contributes it while it
|
||||
@@ -68,7 +89,8 @@ public final class SecretSourceValidator implements StartupRule {
|
||||
@Override
|
||||
public String remedy() {
|
||||
return "inject real non-blank secrets from the secret manager / mounted environment; "
|
||||
+ "local/dev sentinel credentials are forbidden in prod.";
|
||||
+ "local/dev sentinel credentials and the repository's fixture-* passwords are forbidden"
|
||||
+ " in prod.";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,31 +99,44 @@ public final class SecretSourceValidator implements StartupRule {
|
||||
return List.of();
|
||||
}
|
||||
List<String> violations = new ArrayList<>();
|
||||
collectLocalDevSentinelViolations(environment, violations);
|
||||
collectPublicCredentialViolations(environment, violations);
|
||||
collectMissingSecretViolations(environment, violations);
|
||||
return violations;
|
||||
}
|
||||
|
||||
private static void collectLocalDevSentinelViolations(
|
||||
/**
|
||||
* Names every property whose value is public by construction. Every property source is read, the
|
||||
* process environment included, because a credential reference ({@code
|
||||
* secret://<account>@environment/<VARIABLE>}) may point at any variable name. The value itself is
|
||||
* never put in the message.
|
||||
*/
|
||||
private static void collectPublicCredentialViolations(
|
||||
Environment environment, List<String> violations) {
|
||||
if (!(environment instanceof ConfigurableEnvironment configurable)) {
|
||||
return;
|
||||
}
|
||||
Set<String> offenders = new LinkedHashSet<>();
|
||||
Map<String, String> offenders = new LinkedHashMap<>();
|
||||
for (PropertySource<?> source : configurable.getPropertySources()) {
|
||||
if (source instanceof EnumerablePropertySource<?> enumerable) {
|
||||
for (String name : enumerable.getPropertyNames()) {
|
||||
Object value = enumerable.getProperty(name);
|
||||
if (value instanceof String text && text.startsWith(LOCAL_DEV_SENTINEL_PREFIX)) {
|
||||
offenders.add(name);
|
||||
if (enumerable.getProperty(name) instanceof String text) {
|
||||
PUBLIC_CREDENTIAL_PREFIXES.keySet().stream()
|
||||
.filter(text::startsWith)
|
||||
.findFirst()
|
||||
.ifPresent(prefix -> offenders.putIfAbsent(name, prefix));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String offender : offenders) {
|
||||
violations.add(
|
||||
"'" + LOCAL_DEV_SENTINEL_PREFIX + "' sentinel credential is configured for " + offender);
|
||||
}
|
||||
offenders.forEach(
|
||||
(offender, prefix) ->
|
||||
violations.add(
|
||||
"'"
|
||||
+ prefix
|
||||
+ "' "
|
||||
+ PUBLIC_CREDENTIAL_PREFIXES.get(prefix)
|
||||
+ " is configured for "
|
||||
+ offender));
|
||||
}
|
||||
|
||||
private void collectMissingSecretViolations(Environment environment, List<String> violations) {
|
||||
|
||||
@@ -111,8 +111,9 @@ logging:
|
||||
# DEBUG here prints SQL once JPA/jdbc is wired in
|
||||
org.hibernate.SQL: ${APP_LOG_LEVEL_SQL:INFO}
|
||||
|
||||
# Module-scoped knobs. Each block is bound into a *Settings @ConfigurationProperties
|
||||
# record in the corresponding module, which is where allowed-value validation lives.
|
||||
# Module-scoped knobs, each read and validated by the module that owns it (a settings record bound
|
||||
# by StrictSettingsBinder, which refuses an unknown key). `app.logging` has no settings record:
|
||||
# logback-spring.xml reads it (<springProperty>) and LoggingConfigurationRule validates it.
|
||||
app:
|
||||
logging:
|
||||
file:
|
||||
|
||||
@@ -19,7 +19,8 @@ app:
|
||||
async:
|
||||
# feature-background-job-async-contract D7 — @Async ThreadPoolTaskExecutor pool sizing.
|
||||
# Registry SSOT: docs/registries/env-keys.yaml (APP_ASYNC_EXECUTOR_* rows 1337-1377).
|
||||
# Bound into AsyncExecutorSettings @ConfigurationProperties(prefix = "app.async.executor").
|
||||
# Bound into the AsyncExecutorSettings record by StrictSettingsBinder (prefix "app.async.executor"),
|
||||
# which refuses an unknown key under the prefix instead of ignoring it.
|
||||
# Bounded queue is mandatory (D7) — an unbounded queue makes max-size unreachable.
|
||||
executor:
|
||||
# int >= 1 (positive_int). Always-alive worker count.
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ class BootstrapCapabilityReachabilitySystemTest {
|
||||
try (ConfigurableApplicationContext context =
|
||||
ShippedCompositionHarness.shippedComposition("local")
|
||||
.run(ShippedCompositionHarness.allOffArguments())) {
|
||||
assertThat(context.containsBean("outboxLeaderElection")).isFalse();
|
||||
assertThat(context.containsBean("outboxSettings")).isFalse();
|
||||
assertThat(context.containsBean("distributedLockProvider")).isFalse();
|
||||
assertThat(context.getBeansOfType(IdempotencyExecutor.class)).isEmpty();
|
||||
assertThat(
|
||||
|
||||
+19
-2
@@ -8,6 +8,7 @@ import dev.caskeleton.bootstrap.contract.support.RepositoryContractResources;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -15,6 +16,7 @@ import java.util.regex.Pattern;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.convert.DurationStyle;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
@@ -407,7 +409,13 @@ class DeveloperExperienceContractTest {
|
||||
// given
|
||||
Map<?, ?> app =
|
||||
requireMap(requireMap(parseYamlMap(read("docker-compose.yml")), "services"), "app");
|
||||
int webDrainSeconds = 30;
|
||||
// The web drain is the value this service runs with — APP_SERVER_SHUTDOWN_TIMEOUT's fallback in
|
||||
// the same Compose service — not a number copied here, so a changed default changes the sum
|
||||
// (review 2026-11-03 RR-06-08).
|
||||
long webDrainSeconds =
|
||||
composeFallback(
|
||||
requireString(requireMap(app, "environment"), "APP_SERVER_SHUTDOWN_TIMEOUT"))
|
||||
.toSeconds();
|
||||
int preStopSeconds = 5;
|
||||
int marginSeconds = 5;
|
||||
|
||||
@@ -417,7 +425,7 @@ class DeveloperExperienceContractTest {
|
||||
// then
|
||||
// Spring finishes the lifecycle phase (the web server's graceful drain) before it destroys the
|
||||
// async executor, which then waits for its queue: the two run one after the other (07-07).
|
||||
assertThat(Integer.parseInt(grace.replace("s", "")))
|
||||
assertThat(Long.parseLong(grace.replace("s", "")))
|
||||
.isGreaterThanOrEqualTo(
|
||||
webDrainSeconds
|
||||
+ AsyncExecutorConfig.AWAIT_TERMINATION_SECONDS
|
||||
@@ -621,6 +629,15 @@ class DeveloperExperienceContractTest {
|
||||
return (List<?>) value;
|
||||
}
|
||||
|
||||
/** The fallback of a Compose interpolation {@code ${NAME:-30s}}, as a duration. */
|
||||
private static Duration composeFallback(String interpolation) {
|
||||
Matcher fallback = Pattern.compile("^\\$\\{[A-Z0-9_]+:-([^}]+)}$").matcher(interpolation);
|
||||
assertThat(fallback.matches())
|
||||
.as("a ${NAME:-default} interpolation: " + interpolation)
|
||||
.isTrue();
|
||||
return DurationStyle.detectAndParse(fallback.group(1));
|
||||
}
|
||||
|
||||
private static List<String> requireStringList(Map<?, ?> owner, String key) {
|
||||
List<?> values = requireList(owner, key);
|
||||
assertThat(values).allMatch(String.class::isInstance);
|
||||
|
||||
+108
-2
@@ -4,12 +4,21 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import dev.caskeleton.bootstrap.contract.support.RepositoryContractResources;
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -19,8 +28,10 @@ import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
|
||||
/**
|
||||
* The sample keeps the default composition's runtime defaults, so a number measured on the sample —
|
||||
* thread count, pool wait — says something about the composition a service ships (09-08). It reads
|
||||
* two configuration files, so it runs in the pull-request {@code repository-contract} lane (08-03).
|
||||
* thread count, pool wait — says something about the composition a service ships (09-08), and it
|
||||
* carries only settings something on its classpath reads. It reads configuration files, build
|
||||
* scripts and production sources, so it runs in the pull-request {@code repository-contract} lane
|
||||
* (08-03).
|
||||
*/
|
||||
@Tag("repository-contract")
|
||||
class SampleRuntimeDefaultsContractTest {
|
||||
@@ -69,6 +80,101 @@ class SampleRuntimeDefaultsContractTest {
|
||||
assertThat(connectionTimeout).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("샘플 application.yml의 app.* 설정 묶음은 샘플 classpath에 있는 모듈 코드가 읽는다")
|
||||
void everySampleAppSettingGroupIsReadByAModuleOnTheSampleClasspath() throws IOException {
|
||||
// given
|
||||
Set<String> groups = new TreeSet<>();
|
||||
for (Object document : loadAll("src/sample-portfolio/src/main/resources/application.yml")) {
|
||||
if (document instanceof Map<?, ?> map && map.get("app") instanceof Map<?, ?> app) {
|
||||
app.keySet().forEach(key -> groups.add(String.valueOf(key)));
|
||||
}
|
||||
}
|
||||
Set<Path> classpath = sampleRuntimeModules();
|
||||
|
||||
// when
|
||||
Set<String> unread = new TreeSet<>();
|
||||
for (String group : groups) {
|
||||
Pattern reader = Pattern.compile("app\\." + Pattern.quote(group) + "[\".}]");
|
||||
if (classpath.stream().noneMatch(module -> anyMainSourceMatches(module, reader))) {
|
||||
unread.add("app." + group);
|
||||
}
|
||||
}
|
||||
|
||||
// then
|
||||
// The sample is copied first. A block nothing on its classpath reads — the HTTP client's
|
||||
// timeouts with no HTTP client module, a messaging broker with no messaging module — is a
|
||||
// setting the copier believes is in force and is not (review 2026-11-03 RR-06-06, 09-08).
|
||||
assertThat(unread)
|
||||
.as("app.* groups in the sample's application.yml that nothing reads")
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
/** The source directories of the sample and every project its production configurations reach. */
|
||||
private static Set<Path> sampleRuntimeModules() throws IOException {
|
||||
String registry =
|
||||
Files.readString(REPOSITORY_ROOT.resolve("src/config/architecture/modules.json"));
|
||||
Map<String, String> sourceOf = new LinkedHashMap<>();
|
||||
Matcher module =
|
||||
Pattern.compile("\"gradle_path\":\\s*\"([^\"]+)\",\\s*\"source_path\":\\s*\"([^\"]+)\"")
|
||||
.matcher(registry);
|
||||
while (module.find()) {
|
||||
sourceOf.put(module.group(1), module.group(2));
|
||||
}
|
||||
sourceOf.put(":sample-portfolio", "src/sample-portfolio");
|
||||
Pattern edge =
|
||||
Pattern.compile(
|
||||
"(?m)^\\s*(?:api|implementation|runtimeOnly)\\s*\\(?\\s*project\\(\\s*['\"](:[^'\"]+)['\"]");
|
||||
Set<Path> reached = new LinkedHashSet<>();
|
||||
Deque<String> pending = new ArrayDeque<>(List.of(":sample-portfolio"));
|
||||
Set<String> seen = new LinkedHashSet<>();
|
||||
while (!pending.isEmpty()) {
|
||||
String path = pending.pop();
|
||||
String source = sourceOf.get(path);
|
||||
if (!seen.add(path) || source == null) {
|
||||
continue;
|
||||
}
|
||||
Path directory = REPOSITORY_ROOT.resolve(source);
|
||||
reached.add(directory);
|
||||
Matcher dependency = edge.matcher(Files.readString(directory.resolve("build.gradle")));
|
||||
while (dependency.find()) {
|
||||
pending.add(dependency.group(1));
|
||||
}
|
||||
}
|
||||
return reached;
|
||||
}
|
||||
|
||||
private static boolean anyMainSourceMatches(Path module, Pattern reader) {
|
||||
Path sources = module.resolve("src/main/java");
|
||||
if (!Files.isDirectory(sources)) {
|
||||
return false;
|
||||
}
|
||||
try (Stream<Path> files = Files.walk(sources)) {
|
||||
return files
|
||||
.filter(file -> file.toString().endsWith(".java"))
|
||||
.anyMatch(
|
||||
file -> {
|
||||
try {
|
||||
return reader.matcher(Files.readString(file)).find();
|
||||
} catch (IOException failure) {
|
||||
throw new UncheckedIOException(failure);
|
||||
}
|
||||
});
|
||||
} catch (IOException failure) {
|
||||
throw new UncheckedIOException(failure);
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Object> loadAll(String relative) throws IOException {
|
||||
LoaderOptions options = new LoaderOptions();
|
||||
options.setMaxAliasesForCollections(0);
|
||||
List<Object> documents = new ArrayList<>();
|
||||
new Yaml(new SafeConstructor(options))
|
||||
.loadAll(Files.readString(REPOSITORY_ROOT.resolve(relative)))
|
||||
.forEach(documents::add);
|
||||
return documents;
|
||||
}
|
||||
|
||||
private static String defaultOf(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
|
||||
+44
-3
@@ -3,24 +3,28 @@ package dev.caskeleton.bootstrap.contract.outbox;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import dev.caskeleton.application.outbox.OutboxEventStatus;
|
||||
import dev.caskeleton.application.outbox.OutboxRelayResult;
|
||||
import dev.caskeleton.bootstrap.contract.support.RepositoryContractResources;
|
||||
import dev.caskeleton.shared.error.OperationalError;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
/**
|
||||
* Contract test — {@link OutboxEventStatus} 5 values ↔ {@code metrics.yaml} {@code
|
||||
* outbox.pending.size} allowed_values, and {@code OUTBOX_*} 2 error codes ↔ {@code
|
||||
* error-codes.yaml} category/retryable.
|
||||
* Contract test — {@link OutboxEventStatus} values ↔ {@code metrics.yaml} {@code
|
||||
* outbox.pending.size} allowed_values, {@link OutboxRelayResult.Outcome} values ↔ {@code
|
||||
* outbox.publisher.published.total} {@code outcome} allowed_values, and {@code OUTBOX_*} 2 error
|
||||
* codes ↔ {@code error-codes.yaml} category/retryable.
|
||||
*/
|
||||
@Tag("document-contract")
|
||||
class OutboxStatusRegistryContractTest {
|
||||
@@ -79,6 +83,43 @@ class OutboxStatusRegistryContractTest {
|
||||
.containsExactlyInAnyOrderElementsOf(registryStatuses);
|
||||
}
|
||||
|
||||
/**
|
||||
* The relay counts every cycle outcome under {@code outcome}; the registry is what a dashboard or
|
||||
* an alert reads the allowed values from. {@code RELEASED} was counted and not registered, and
|
||||
* {@code IN_FLIGHT}, which no cycle produces, was registered (re-review 2026-11-03 RR-05-06).
|
||||
*/
|
||||
@Test
|
||||
@DisplayName("relay 회차 결과 값과 metrics.yaml의 published.total outcome 허용 값이 같다")
|
||||
void relayOutcomesMatchMetricsYamlPublishedTotalOutcomeAllowedValues() {
|
||||
// given
|
||||
Set<String> enumOutcomes =
|
||||
Arrays.stream(OutboxRelayResult.Outcome.values())
|
||||
.map(Enum::name)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// when
|
||||
List<String> registered = allowedValues("outbox.publisher.published.total", "outcome");
|
||||
|
||||
// then
|
||||
assertThat(registered).containsExactlyInAnyOrderElementsOf(enumOutcomes);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static List<String> allowedValues(String metric, String tag) {
|
||||
List<Map<String, Object>> metrics = (List<Map<String, Object>>) metricsRoot.get("metrics");
|
||||
Map<String, Object> row =
|
||||
metrics.stream()
|
||||
.filter(m -> metric.equals(m.get("name")))
|
||||
.findFirst()
|
||||
.orElseThrow(() -> new AssertionError(metric + " must exist in metrics.yaml"));
|
||||
return ((List<Map<String, Object>>) row.get("tags"))
|
||||
.stream()
|
||||
.filter(t -> tag.equals(t.get("name")))
|
||||
.findFirst()
|
||||
.map(t -> (List<String>) t.get("allowed_values"))
|
||||
.orElseThrow(() -> new AssertionError(metric + " must have a '" + tag + "' tag"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void outboxErrorCodesMatchRegistryCategoryAndRetryable() {
|
||||
Map<String, Map<String, Object>> codeIndex =
|
||||
|
||||
+2
-1
@@ -68,7 +68,8 @@ class ErrorDetailExposureSafetyValidatorTest {
|
||||
static class ValidatorConfig {
|
||||
|
||||
@Bean
|
||||
ErrorDetailExposureSafetyValidator errorDetailExposureSafetyValidator(Environment environment) {
|
||||
static ErrorDetailExposureSafetyValidator errorDetailExposureSafetyValidator(
|
||||
Environment environment) {
|
||||
return new ErrorDetailExposureSafetyValidator();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ class RuntimeNumericBoundsValidatorTest {
|
||||
@Configuration
|
||||
static class ValidatorConfig {
|
||||
@Bean
|
||||
RuntimeNumericBoundsValidator runtimeNumericBoundsValidator(Environment environment) {
|
||||
static RuntimeNumericBoundsValidator runtimeNumericBoundsValidator(Environment environment) {
|
||||
return new RuntimeNumericBoundsValidator();
|
||||
}
|
||||
}
|
||||
|
||||
+47
@@ -103,6 +103,53 @@ class SecretSourceValidatorTest {
|
||||
.run(context -> assertThat(context).hasNotFailed());
|
||||
}
|
||||
|
||||
// ---- repository fixture passwords (review 2026-11-03 RR-07-04) --------------------------
|
||||
|
||||
@Test
|
||||
@DisplayName("prod에서 비밀값이 저장소 fixture 비밀번호(fixture-)면 그 변수를 짚어 기동을 거부한다")
|
||||
void prodProfileWithARepositoryFixturePasswordFailsStartup() {
|
||||
// given
|
||||
ApplicationContextRunner prodWithLaneFixture =
|
||||
runner
|
||||
.withInitializer(ctx -> ctx.getEnvironment().setActiveProfiles("prod"))
|
||||
.withPropertyValues(allRequiredSecretsPresent())
|
||||
// The Compose Redis lanes' value: a public password from infra/redis-sdk/acl, which a
|
||||
// deployment that copied the lane's environment would carry into production.
|
||||
.withPropertyValues("REDIS_LANE_APPLICATION_PASSWORD=fixture-application");
|
||||
|
||||
// when
|
||||
prodWithLaneFixture.run(
|
||||
context -> {
|
||||
// then
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context.getStartupFailure())
|
||||
.isInstanceOfSatisfying(
|
||||
StartupFailureException.class,
|
||||
e ->
|
||||
assertThat(e.errorCode())
|
||||
.isEqualTo(StartupErrorCode.STARTUP_VALIDATION_FAILED))
|
||||
.hasStackTraceContaining("fixture-")
|
||||
.hasStackTraceContaining("REDIS_LANE_APPLICATION_PASSWORD");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("prod가 아니면 저장소 fixture 비밀번호(fixture-)로도 기동한다")
|
||||
void nonProdProfileWithARepositoryFixturePasswordStarts() {
|
||||
// given
|
||||
ApplicationContextRunner localWithLaneFixture =
|
||||
runner
|
||||
.withInitializer(ctx -> ctx.getEnvironment().setActiveProfiles("local"))
|
||||
.withPropertyValues("REDIS_LANE_APPLICATION_PASSWORD=fixture-application");
|
||||
|
||||
// when
|
||||
localWithLaneFixture.run(
|
||||
context -> {
|
||||
// then
|
||||
assertThat(context).hasNotFailed();
|
||||
});
|
||||
}
|
||||
|
||||
// ---- required-secret presence guard (§테스트 계약) -----------------------
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user