feat: enforce DDS token access through common grants

This commit is contained in:
devmrko
2026-06-30 13:20:00 +09:00
parent 3a07788e5c
commit a5e70bcff1
19 changed files with 509 additions and 68 deletions

View File

@@ -56,4 +56,19 @@ class DdsPropertiesTest {
assertEquals("dds_demo_my_role", properties.users().get("my").dataRole());
assertTrue(properties.users().get("my").mapped());
}
@Test
void bindsTokenTechnicalUserSeparatelyFromApplicationUsers() {
var source = new MapConfigurationPropertySource(Map.of(
"dds.token.username", "dds_demo_token",
"dds.token.password", "secret"
));
var properties = new Binder(source)
.bind("dds", Bindable.of(DdsProperties.class))
.orElseThrow(() -> new AssertionError("dds token properties did not bind"));
assertEquals("dds_demo_token", properties.token().username());
assertTrue(properties.token().configured());
}
}